shaka-player 4.6.3 → 4.6.5
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/CHANGELOG.md +21 -0
- package/demo/common/asset.js +0 -1
- package/demo/common/assets.js +0 -1
- package/dist/demo.compiled.debug.map +1 -1
- package/dist/demo.compiled.map +1 -1
- package/dist/deps.js +5 -5
- package/dist/locales.js +33 -33
- package/dist/receiver.compiled.debug.map +1 -1
- package/dist/receiver.compiled.map +1 -1
- 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.externs.js +5 -2
- package/dist/shaka-player.compiled.debug.js +172 -171
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.externs.js +5 -2
- package/dist/shaka-player.compiled.js +227 -224
- 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.externs.js +5 -2
- package/dist/shaka-player.ui.debug.js +196 -195
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.externs.js +5 -2
- package/dist/shaka-player.ui.js +223 -220
- package/dist/shaka-player.ui.map +3 -3
- package/docs/tutorials/ui.md +3 -1
- package/lib/ads/client_side_ad_manager.js +4 -0
- package/lib/ads/media_tailor_ad_manager.js +5 -0
- package/lib/ads/server_side_ad_manager.js +4 -0
- package/lib/hls/hls_parser.js +17 -5
- package/lib/media/drm_engine.js +0 -3
- package/lib/media/media_source_engine.js +1 -1
- package/lib/media/streaming_engine.js +3 -2
- package/lib/media/video_wrapper.js +4 -3
- package/lib/net/networking_utils.js +12 -3
- package/lib/player.js +5 -7
- package/lib/text/simple_text_displayer.js +8 -7
- package/lib/text/text_utils.js +39 -13
- package/lib/text/ui_text_displayer.js +20 -11
- package/lib/text/web_vtt_generator.js +1 -1
- package/lib/util/ts_parser.js +12 -8
- package/package.json +1 -1
- package/test/media/drm_engine_unit.js +27 -0
- package/test/player_unit.js +31 -0
- package/test/test/util/layout_tests.js +2 -1
- package/test/text/simple_text_displayer_unit.js +1 -1
- package/test/text/web_vtt_generator_unit.js +3 -3
- package/test/transmuxer/transmuxer_integration.js +3 -3
- package/ui/volume_bar.js +10 -6
package/dist/shaka-player.ui.js
CHANGED
|
@@ -124,7 +124,7 @@ a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}M("shaka.te
|
|
|
124
124
|
xd.prototype.tickAfter=xd.prototype.S;xd.prototype.tickNow=xd.prototype.Ma;function yd(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function zd(a){return""!=Ad().canPlayType(a)}function Bd(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function Cd(){return Dd("Xbox One")}function Ed(){return Dd("Tizen")}function Fd(){return Dd("Tizen 3")}function Gd(){return Dd("Tizen 2")}function Hd(){return Dd("Web0S")&&Dd("Chrome/38.0.2125.122 Safari/537.36")}
|
|
125
125
|
function Id(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Ed()&&!Dd("PC=EOS")&&!Dd("VirginMedia")&&!Dd("SOPOpenBrowser")&&!Jd()&&!Dd("AFT")}function Jd(){return Dd("PlayStation 4")}function Kd(){if(!Id())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function Dd(a){return(navigator.userAgent||"").includes(a)}
|
|
126
126
|
function Ad(){if(Ld)return Ld;Md||(Md=new xd(function(){Ld=null}));(Ld=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Ld=document.createElement("video"));Md.S(1);return Ld}var Md=null,Ld=null;function Od(){}
|
|
127
|
-
function Pd(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Qd(e,b,c);if(d.length){b=new bb;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 x=[],z={};v=t(v);for(var y=v.next();!y.done;z={ed:z.ed},y=v.next())z.ed=y.value,y=d.filter(function(
|
|
127
|
+
function Pd(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Qd(e,b,c);if(d.length){b=new bb;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 x=[],z={};v=t(v);for(var y=v.next();!y.done;z={ed:z.ed},y=v.next())z.ed=y.value,y=d.filter(function(A){return function(B){return A.ed.decodingInfos[0][B]}}(z)).length,y>u?(u=y,x=[z.ed]):y==u&&x.push(z.ed);f.push.apply(f,w(x))});e=f}c=new Set;b=new Set;var g=t(e);for(e=g.next();!e.done;e=
|
|
128
128
|
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=hd(m.codecs),r=hd(g.codecs);n==r&&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,
|
|
129
129
|
v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=hc();var q=[];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=hd(m.codecs),r=hd(g.codecs),n!==r))continue;g.width>m.width||g.height>m.height?(l.push(g),q.push(g.id)):g.width==m.width&&g.height==m.height&&(n=hd(m.codecs),r=hd(g.codecs),n==r&&g.bandwidth<m.bandwidth&&(l.push(g),q.push(g.id)))}else l.push(g),
|
|
130
130
|
q.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&&!q.includes(u.id)?!1:!0})}
|
|
@@ -135,8 +135,8 @@ function Ud(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return D(h,Xd(b.va
|
|
|
135
135
|
gd(l.mimeType,m,f.ra);if(!fc(n))return!1;l.codecs=m}if(l=k.audio){m=$d(l.codecs);n=gd(l.mimeType,m,f.W);if(!fc(n))return!1;l.codecs=m}(l=k.decodingInfos.some(function(q){return!q.supported||d&&(q=q.keySystemAccess)&&q.keySystem!=d?!1:!0}))||Za(Yd(k));return l});F(h)})}
|
|
136
136
|
function ae(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=ae(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
|
|
137
137
|
function be(a,b){var c,d,e;return K(function(f){switch(f.g){case 1:c=ae(b);ta(f,2);d=ce;if(d[c]){a.decodingInfos.push(d[c]);f.F(4);break}return D(f,navigator.mediaCapabilities.decodingInfo(b),5);case 5:e=f.h,d[c]=e,a.decodingInfos.push(e);case 4:va(f,0);break;case 2:wa(f),JSON.stringify(b),F(f)}})}
|
|
138
|
-
function Xd(a,b,c,d){var e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,
|
|
139
|
-
be(n,v),9);case 9:u=q.next();
|
|
138
|
+
function Xd(a,b,c,d){var e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A,B;return K(function(C){switch(C.g){case 1:if(e=a.some(function(E){return E.decodingInfos.length}))return C.return();f={};g=t(d);h=g.next();case 2:if(h.done){C.F(4);break}f.Je=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){C.F(7);break}n=m.value;r=de(n,b,c).filter(function(E){return function(H){return(H.keySystemConfiguration&&H.keySystemConfiguration.keySystem)===E.Je}}(f));q=t(r);u=q.next();case 8:if(u.done){C.F(10);break}v=u.value;return D(C,
|
|
139
|
+
be(n,v),9);case 9:u=q.next();C.F(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();C.F(5);break;case 7:if(k)return C.return();f={Je:f.Je};h=g.next();C.F(2);break;case 4:x=t(a),m=x.next();case 12:if(m.done){C.F(0);break}z=m.value;y=de(z,b,c).filter(function(E){E=E.keySystemConfiguration&&E.keySystemConfiguration.keySystem;return!E||!d.includes(E)});A=t(y);u=A.next();case 15:if(u.done){m=x.next();C.F(12);break}B=u.value;return D(C,be(z,B),16);case 16:u=A.next(),C.F(15)}})}
|
|
140
140
|
function de(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Ib("video",g);f=Zd(f);g=Ib("audio",g);g=$d(g);g=gd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Zd(f);f=gd(e.mimeType,f,"video");c.video={contentType:f,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":c.video.transferFunction=
|
|
141
141
|
"srgb";break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=$d(d.codecs),f=gd(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,
|
|
142
142
|
[]);f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=t(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=t(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var r=new Set,q=t(h.initData),u=q.next();!u.done;u=q.next())r.add(u.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
|
|
@@ -173,19 +173,19 @@ function Ge(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(fu
|
|
|
173
173
|
function Je(a,b,c,d,e,f,g,h){this.s=a;this.u=b;this.g=c;this.h=d;this.j=e;this.i=void 0===f?"":f;this.l=void 0===g?"reload":g;this.m=void 0===h?!1:h}
|
|
174
174
|
Je.prototype.create=function(a){var b=[];b=Ke(a,this.s);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Le(b,this.u);a.length&&(b=a);this.j&&(a=Me(b,this.j),a.length&&(b=a));this.h&&(a=Pe(b,this.h),a.length&&(b=a));this.g&&(a=Qe(b,this.g),a.length&&(b=a));this.i&&(a=Re(b,this.i),a.length&&(b=a));return new Ee(b[0],b,!("smooth"==this.l&&hc()),this.m)};function Ke(a,b){b=Pb(b);var c=Xb(b,a.map(function(d){return Wb(d)}));return c?a.filter(function(d){return c==Wb(d)}):[]}
|
|
175
175
|
function Le(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Re(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Qe(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}
|
|
176
|
-
function Pe(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})}function Me(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})};function Se(){this.g=Te;this.h=(new Map).set(Te,2).set(Ue,1)}function
|
|
176
|
+
function Pe(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})}function Me(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})};function Se(){this.g=Te;this.h=(new Map).set(Te,2).set(Ue,1)}function Ve(a,b,c){a.h.set(Te,c).set(Ue,b)}var Ue=0,Te=1;function Xe(a,b){var c=Ye();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.s=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
|
|
177
177
|
function Ze(a){var b,c;return K(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new P(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.s);return D(d,new Promise(function(e){(new xd(e)).S(c/1E3)}),2)}a.h*=a.m;F(d)})}function Ye(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function $e(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}$e.prototype.resolve=function(){};$e.prototype.reject=function(){};function af(a,b){this.promise=a;this.i=b;this.g=!1}function bf(a){return new af(Promise.reject(a),function(){return Promise.resolve()})}function cf(){var a=Promise.reject(new P(2,7,7001));a.catch(function(){});return new af(a,function(){return Promise.resolve()})}function df(a){return new af(Promise.resolve(a),function(){return Promise.resolve()})}function ef(a){return new af(a,function(){return a.catch(function(){})})}af.prototype.abort=function(){this.g=!0;return this.i()};
|
|
178
178
|
function ff(a){return new af(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}af.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
179
|
-
af.prototype.
|
|
180
|
-
function gf(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}M("shaka.util.AbortableOperation",af);af.prototype.chain=af.prototype.
|
|
179
|
+
af.prototype.Ca=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=gf(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new $e,g=new P(2,7,7001);this.promise.then(c(!0),c(!1));return new af(f,function(){return d()})};
|
|
180
|
+
function gf(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}M("shaka.util.AbortableOperation",af);af.prototype.chain=af.prototype.Ca;af.prototype["finally"]=af.prototype.finally;af.all=ff;af.prototype.abort=af.prototype.abort;af.notAbortable=ef;af.completed=df;af.aborted=cf;af.failed=bf;function hf(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&&d.buffer.constructor==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 jf(a){var b={},c;for(c in a)b[c]=a[c];return b};function kf(){this.g=[]}function lf(a,b){a.g.push(b.finally(function(){xc(a.g,b)}))}kf.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function mf(a,b,c,d,e){cb.call(this);this.i=!1;this.m=new kf;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.u=c||null;this.C=d||null;this.D=e||null;this.s=!1}pa(mf,cb);p=mf.prototype;p.dg=function(a){this.s=a};function nf(a,b,c,d){c=c||of;var e=pf[a];if(!e||c>=e.priority)pf[a]={priority:c,xe:b,Mi:void 0===d?!1:d}}p.Ni=function(a){this.g.add(a)};p.ej=function(a){this.g.delete(a)};p.Bh=function(){this.g.clear()};p.Oi=function(a){this.h.add(a)};p.fj=function(a){this.h.delete(a)};
|
|
181
181
|
p.Ch=function(){this.h.clear()};function qf(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}p.destroy=function(){this.i=!0;this.g.clear();this.h.clear();cb.prototype.release.call(this);return this.m.destroy()};
|
|
182
|
-
p.request=function(a,b,c){var d=this,e=new rf;if(this.i){var f=Promise.reject(new P(2,7,7001));f.catch(function(){});return new sf(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?hf(b.retryParameters):Ye();b.uris=hf(b.uris);f=tf(this,a,b,c);var g=f.
|
|
183
|
-
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.
|
|
184
|
-
function tf(a,b,c,d){function e(h){f=f.
|
|
185
|
-
function uf(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.D&&a.D(b,d,c.uris[f],c.uris[f-1]);var k=new kb(c.uris[f]),l=k.qb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),nb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=pf[l])?l.xe:null;if(!n)return bf(new P(2,1,1E3,k));var r=l.Mi,q=null,u=null,v=!1,x=!1,z;return ef(Ze(e)).
|
|
186
|
-
m=!0,h.g=H)},function(
|
|
187
|
-
|
|
188
|
-
function vf(a,b,c,d){var e=df(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Le:f.Le},g=a.next())f.Le=g.value,e=e.
|
|
182
|
+
p.request=function(a,b,c){var d=this,e=new rf;if(this.i){var f=Promise.reject(new P(2,7,7001));f.catch(function(){});return new sf(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?hf(b.retryParameters):Ye();b.uris=hf(b.uris);f=tf(this,a,b,c);var g=f.Ca(function(){return uf(d,a,b,c,new Xe(b.retryParameters,!1),0,null,e)}),h=g.Ca(function(r){return vf(d,a,r,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
|
|
183
|
+
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Ca(function(r){var q=Date.now()-m,u=r.response;u.timeMs+=l;u.timeMs+=q;r.pi||!d.l||u.fromCache||"HEAD"==b.method||a!=wf||d.l(u.timeMs,u.data.byteLength,xf(c));return u},function(r){r&&(r.severity=2);throw r;});f=new sf(n.promise,function(){return n.abort()},e);lf(this.m,f);return f};
|
|
184
|
+
function tf(a,b,c,d){function e(h){f=f.Ca(function(){c.body&&(c.body=oc(c.body));return h(b,c,d)})}var f=df(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.Ca(void 0,function(h){if(h instanceof P&&7001==h.code)throw h;throw new P(2,1,1006,h);})}
|
|
185
|
+
function uf(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.D&&a.D(b,d,c.uris[f],c.uris[f-1]);var k=new kb(c.uris[f]),l=k.qb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),nb(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=pf[l])?l.xe:null;if(!n)return bf(new P(2,1,1E3,k));var r=l.Mi,q=null,u=null,v=!1,x=!1,z;return ef(Ze(e)).Ca(function(){if(a.i)return cf();z=Date.now();var y=n(c.uris[f],c,b,function(C,E,H){q&&q.stop();u&&u.S(B/1E3);a.l&&b==wf&&(a.l(C,E,xf(d)),
|
|
186
|
+
m=!0,h.g=H)},function(C){a.j&&a.j(C,c,b);x=!0});if(!r)return y;var A=c.retryParameters.connectionTimeout;A&&(q=new xd(function(){v=!0;y.abort()}),q.S(A/1E3));var B=c.retryParameters.stallTimeout;B&&(u=new xd(function(){v=!0;y.abort()}));return y}).Ca(function(y){q&&q.stop();u&&u.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-z);var A={response:y,pi:m};!x&&a.j&&a.j(y.headers,c,b);return A},function(y){q&&q.stop();u&&u.stop();if(a.u){var A=null,B=0;y instanceof P&&(A=y,1001==y.code&&(B=y.data[1]));a.u(c,
|
|
187
|
+
A,B,v)}if(a.i)return cf();v&&(y=new P(1,1,1003,c.uris[f],b));if(y instanceof P){if(7001==y.code)throw y;if(1010==y.code)throw g;if(1==y.severity)return A=(new Map).set("error",y),A=new O("retry",A),a.dispatchEvent(A),f=(f+1)%c.uris.length,uf(a,b,c,d,e,f,y,h)}throw y;})}
|
|
188
|
+
function vf(a,b,c,d){var e=df(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Le:f.Le},g=a.next())f.Le=g.value,e=e.Ca(function(h){return function(){var k=c.response;k.data&&(k.data=oc(k.data));return h.Le(b,k,d)}}(f));return e.Ca(function(){return c},function(h){var k=2;if(h instanceof P){if(7001==h.code)throw h;k=h.severity}throw new P(k,1,1007,h);})}function xf(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.G&&!b.D)return!1}return!0}M("shaka.net.NetworkingEngine",mf);
|
|
189
189
|
mf.prototype.request=mf.prototype.request;mf.prototype.destroy=mf.prototype.destroy;mf.makeRequest=qf;mf.defaultRetryParameters=function(){return Ye()};mf.prototype.clearAllResponseFilters=mf.prototype.Ch;mf.prototype.unregisterResponseFilter=mf.prototype.fj;mf.prototype.registerResponseFilter=mf.prototype.Oi;mf.prototype.clearAllRequestFilters=mf.prototype.Bh;mf.prototype.unregisterRequestFilter=mf.prototype.ej;mf.prototype.registerRequestFilter=mf.prototype.Ni;mf.unregisterScheme=function(a){delete pf[a]};
|
|
190
190
|
mf.registerScheme=nf;mf.prototype.setForceHTTPS=mf.prototype.dg;function rf(){this.g=0}mf.NumBytesRemainingClass=rf;function sf(a,b,c){af.call(this,a,b);this.h=c}pa(sf,af);mf.PendingRequest=sf;var wf=1;mf.RequestType={MANIFEST:0,SEGMENT:wf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};mf.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var of=3;mf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:of};var pf={};function yf(a){this.g=!1;this.h=new $e;this.i=a}yf.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function zf(a,b){if(a.g){if(b instanceof P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function Af(){this.g=new bb}p=Af.prototype;p.release=function(){this.Kb();this.g=null};p.o=function(a,b,c,d){this.g&&(a=new Bf(a,b,c,d),this.g.push(b,a))};p.ka=function(a,b,c,d){function e(g){f.bc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};p.bc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.bc(),this.g.remove(b,e))}};
|
|
191
191
|
p.Kb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,w(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.bc();this.g.g={}}};M("shaka.util.EventManager",Af);Af.prototype.removeAll=Af.prototype.Kb;Af.prototype.unlisten=Af.prototype.bc;Af.prototype.listenOnce=Af.prototype.ka;Af.prototype.listen=Af.prototype.o;Af.prototype.release=Af.prototype.release;function Bf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=Cf(a,d);this.target.addEventListener(b,c,this.g)}
|
|
@@ -196,13 +196,13 @@ function Kf(a){if(!a)return"";a=nc(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.suba
|
|
|
196
196
|
function Lf(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new P(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=rc(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Mf.value()(d)}
|
|
197
197
|
function Nf(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=nc(a);if(239==c[0]&&187==c[1]&&191==c[2])return Kf(c);if(254==c[0]&&255==c[1])return Lf(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Lf(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Lf(a,!1);if(0==c[1]&&0==c[3])return Lf(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Kf(a);throw new P(2,2,2003);}
|
|
198
198
|
function Of(a){if(window.TextEncoder&&!Jd()){var b=new TextEncoder;return oc(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return oc(b)}function Pf(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}M("shaka.util.StringUtils",Jf);Jf.resetFromCharCode=function(){Mf.g=void 0};Jf.toUTF16=Pf;Jf.toUTF8=Of;Jf.fromBytesAutoDetect=Nf;Jf.fromUTF16=Lf;
|
|
199
|
-
Jf.fromUTF8=Kf;var Mf=new Ff(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Ob:65536};0<b.Ob;b={Ob:b.Ob},b.Ob/=2)if(a(b.Ob))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ob)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ob));return e}}(b);return null});function Qf(a,b){this.h=rc(a);this.i=b==Rf;this.g=0}p=Qf.prototype;p.ua=function(){return this.g<this.h.byteLength};p.
|
|
199
|
+
Jf.fromUTF8=Kf;var Mf=new Ff(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Ob:65536};0<b.Ob;b={Ob:b.Ob},b.Ob/=2)if(a(b.Ob))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ob)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ob));return e}}(b);return null});function Qf(a,b){this.h=rc(a);this.i=b==Rf;this.g=0}p=Qf.prototype;p.ua=function(){return this.g<this.h.byteLength};p.Da=function(){return this.g};p.getLength=function(){return this.h.byteLength};p.oa=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Sf();}};p.Ra=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Sf();}};p.N=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Sf();}};
|
|
200
200
|
p.Xg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Sf();}};p.Nc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Sf();}if(2097151<b)throw new P(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};p.Jb=function(a){if(this.g+a>this.h.byteLength)throw Sf();var b=nc(this.h,this.g,a);this.g+=a;return b};
|
|
201
201
|
p.skip=function(a){if(this.g+a>this.h.byteLength)throw Sf();this.g+=a};p.Wi=function(a){if(this.g<a)throw Sf();this.g-=a};p.seek=function(a){if(0>a||a>this.h.byteLength)throw Sf();this.g=a};p.yd=function(){for(var a=this.g;this.ua()&&0!=this.h.getUint8(this.g);)this.g+=1;a=nc(this.h,a,this.g-a);this.g+=1;return Kf(a)};function Sf(){return new P(2,3,3E3)}M("shaka.util.DataViewReader",Qf);Qf.prototype.readTerminatedString=Qf.prototype.yd;Qf.prototype.seek=Qf.prototype.seek;Qf.prototype.rewind=Qf.prototype.Wi;
|
|
202
|
-
Qf.prototype.skip=Qf.prototype.skip;Qf.prototype.readBytes=Qf.prototype.Jb;Qf.prototype.readUint64=Qf.prototype.Nc;Qf.prototype.readInt32=Qf.prototype.Xg;Qf.prototype.readUint32=Qf.prototype.N;Qf.prototype.readUint16=Qf.prototype.Ra;Qf.prototype.readUint8=Qf.prototype.oa;Qf.prototype.getLength=Qf.prototype.getLength;Qf.prototype.getPosition=Qf.prototype.
|
|
203
|
-
p.wd=function(a,b,c,d){var e=b.
|
|
204
|
-
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.
|
|
205
|
-
function bg(a){return function(b){a(b.reader.Jb(b.reader.getLength()-b.reader.
|
|
202
|
+
Qf.prototype.skip=Qf.prototype.skip;Qf.prototype.readBytes=Qf.prototype.Jb;Qf.prototype.readUint64=Qf.prototype.Nc;Qf.prototype.readInt32=Qf.prototype.Xg;Qf.prototype.readUint32=Qf.prototype.N;Qf.prototype.readUint16=Qf.prototype.Ra;Qf.prototype.readUint8=Qf.prototype.oa;Qf.prototype.getLength=Qf.prototype.getLength;Qf.prototype.getPosition=Qf.prototype.Da;Qf.prototype.hasMoreData=Qf.prototype.ua;var Rf=1;Qf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Rf};function Tf(){this.i=[];this.h=[];this.g=!1}p=Tf.prototype;p.box=function(a,b){a=Uf(a);this.i[a]=Vf;this.h[a]=b;return this};p.V=function(a,b){a=Uf(a);this.i[a]=Wf;this.h[a]=b;return this};p.stop=function(){this.g=!0};p.parse=function(a,b,c){a=new Qf(a,0);for(this.g=!1;a.ua()&&!this.g;)this.wd(0,a,b,c)};
|
|
203
|
+
p.wd=function(a,b,c,d){var e=b.Da();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.N(),g=b.N(),h=Xf(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Da()+8>b.getLength()){this.g=!0;return}f=b.Nc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Wf){if(d&&b.Da()+4>b.getLength()){this.g=!0;return}n=b.N();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.Da(),b=0<d?b.Jb(d):new Uint8Array(0),b=new Qf(b,0),l({name:h,parser:this,
|
|
204
|
+
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Da(),b.getLength()-b.Da()))}};function Yf(a){for(var b=Zf(a);a.reader.ua()&&!a.parser.g;)a.parser.wd(a.start+b,a.reader,a.partialOkay)}function $f(a){for(var b=Zf(a),c=a.reader.N(),d=0;d<c&&(a.parser.wd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function ag(a){var b=Zf(a);for(a.reader.skip(78);a.reader.ua()&&!a.parser.g;)a.parser.wd(a.start+b,a.reader,a.partialOkay)}
|
|
205
|
+
function bg(a){return function(b){a(b.reader.Jb(b.reader.getLength()-b.reader.Da()))}}function Uf(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Xf(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Zf(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",Tf);Tf.headerSize=Zf;Tf.typeToString=Xf;Tf.allData=bg;Tf.visualSampleEntry=ag;Tf.sampleDescription=$f;Tf.children=Yf;Tf.prototype.parseNext=Tf.prototype.wd;
|
|
206
206
|
Tf.prototype.parse=Tf.prototype.parse;Tf.prototype.stop=Tf.prototype.stop;Tf.prototype.fullBox=Tf.prototype.V;Tf.prototype.box=Tf.prototype.box;var Vf=0,Wf=1;function cg(){}function dg(a){a=nc(a);a=Mf.value()(a);return btoa(a)}function eg(a,b){b=void 0==b?!0:b;a=dg(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function fg(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function gg(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
|
|
207
207
|
function ig(a){var b=nc(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function jg(){for(var a=Ga.apply(0,arguments),b=0,c=t(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,d instanceof Uint8Array?b.set(d,c):b.set(nc(d),c),c+=d.byteLength;return b}M("shaka.util.Uint8ArrayUtils",cg);cg.concat=jg;cg.toHex=ig;cg.fromHex=gg;cg.fromBase64=fg;
|
|
208
208
|
cg.toBase64=eg;cg.toStandardBase64=dg;function kg(a){var b=this;this.g=[];this.h=[];this.data=[];(new Tf).box("moov",Yf).box("moof",Yf).V("pssh",function(c){if(!(1<c.version)){var d=nc(c.reader.h,-12,c.size);b.data.push(d);b.g.push(ig(c.reader.Jb(16)));if(0<c.version){d=c.reader.N();for(var e=0;e<d;e++){var f=ig(c.reader.Jb(16));b.h.push(f)}}}}).parse(a)}
|
|
@@ -217,8 +217,8 @@ var Gg=new Ff(function(){if("undefined"!==typeof trustedTypes){var a=trustedType
|
|
|
217
217
|
p.destroy=function(){return this.j.destroy()};function Lg(a){return K(function(b){switch(b.g){case 1:return a.D.release(),a.D=null,a.l.reject(),a.ea.stop(),a.ea=null,a.U.stop(),a.U=null,D(b,Mg(a),2);case 2:if(!a.m){b.F(3);break}ta(b,4);return D(b,a.m.setMediaKeys(null),6);case 6:va(b,5);break;case 4:wa(b);case 5:a.m=null;case 3:a.g=null,a.I.clear(),a.u=null,a.C=new Map,a.h=null,a.s=function(){},a.G=null,a.Z=!1,a.H=null,F(b)}})}p.configure=function(a){this.h=a};
|
|
218
218
|
function Ng(a,b,c){a.ha=!0;a.C=new Map;a.M=c;return Og(a,b)}function Pg(a,b,c){a.C=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.C.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.C.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.M=0<a.C.size;return Og(a,b)}
|
|
219
219
|
function Qg(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Rg(a,g,[])}
|
|
220
|
-
function Og(a,b){var c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y;return K(function(
|
|
221
|
-
v.next())x=q.value,Vg(x,Gf(a.h.servers),Gf(a.h.advanced||{}),a.h.keySystemsMapping);return D(
|
|
220
|
+
function Og(a,b){var c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y;return K(function(A){if(1==A.g){if(c=Sg(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(B){return B.video&&B.video.drmInfos.length||B.audio&&B.audio.drmInfos.length?!0:!1});g||(h=Gf(a.h.servers),Tg(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Ug(m),r=t(n),q=r.next();!q.done;q=r.next())u=q.value,k.add(u);v=t(k);for(q=v.next();!q.done;q=
|
|
221
|
+
v.next())x=q.value,Vg(x,Gf(a.h.servers),Gf(a.h.advanced||{}),a.h.keySystemsMapping);return D(A,Xd(b,a.M,a.Z,a.h.preferredKeySystems),2)}z=g||Object.keys(a.h.servers).length;if(!z)return a.$=!0,A.return(Promise.resolve());y=Rg(a,void 0,b);return A.return(g?y:y.catch(function(){}))})}
|
|
222
222
|
function Wg(a){var b;return K(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.H){c.F(2);break}return D(c,a.H,3);case 3:return zf(a.j),c.return();case 2:return ta(c,4),a.H=a.m.setMediaKeys(a.u),D(c,a.H,6);case 6:va(c,5);break;case 4:b=wa(c),a.s(new P(2,6,6003,b.message));case 5:zf(a.j),F(c)}})}function Xg(a,b){return K(function(c){if(1==c.g)return D(c,Wg(a),2);Yg(a,b.initDataType,nc(b.initData));F(c)})}
|
|
223
223
|
p.yc=function(a){var b=this;return K(function(c){if(1==c.g){if(!b.u)return b.D.ka(a,"encrypted",function(){b.s(new P(2,6,6010))}),c.return();b.m=a;b.D.ka(b.m,"play",function(){for(var d=t(b.L),e=d.next();!e.done;e=d.next())Zg(b,e.value);b.P=!0;b.L=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.D.o(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Mg(b)});b.K=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.K||"com.apple.fps"!==b.g.keySystem||
|
|
224
224
|
b.C.size?D(c,Wg(b),2):c.F(2)}$g(b).catch(function(){});b.K||b.C.size||b.h.parseInbandPsshEnabled||b.D.o(b.m,"encrypted",function(d){return Xg(b,d)});F(c)})};
|
|
@@ -227,10 +227,10 @@ ta(g,6);return D(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:va(
|
|
|
227
227
|
function $g(a){var b,c,d,e,f;return K(function(g){if(1==g.g){if(!a.C.size)return g.F(2);a.C.forEach(function(h,k){ch(a,k,h)});return D(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&dh(a))return g.return(a.l);a.l=new $e;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,Yg(a,f.initDataType,f.initData);c.length||a.l.resolve();return g.return(a.l)})}
|
|
228
228
|
function Yg(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(lc(c,e.value.initData)&&a.h.ignoreDuplicateInitData)return;0<a.i.size&&eh(a)&&(a.l.resolve(),a.l=new $e,a.l.catch(function(){}));fh(a,b,c,a.g.sessionType)}}function gh(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function hh(a){a=a.i.keys();a=db(a,function(b){return b.sessionId});return Array.from(a)}
|
|
229
229
|
p.tf=function(){var a=this,b=this.i.keys();b=db(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};p.md=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};p.Zd=function(){return Hf(this.xa)};
|
|
230
|
-
function Rg(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z;return K(function(y){switch(y.g){case 1:d=new Map;if(c.length){e=ih(a,c,d);y.F(2);break}return D(y,jh(a,b),3);case 3:e=y.h;case 2:f=e;if(!f)throw new P(2,6,6001);zf(a.j);ta(y,4);a.I.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.I.add(n.contentType.toLowerCase());r=t(k);for(m=r.next();!m.done;m=r.next())q=m.value,a.I.add(q.contentType.toLowerCase());if(c.length){var
|
|
231
|
-
f.keySystem;var
|
|
232
|
-
|
|
233
|
-
|
|
230
|
+
function Rg(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z;return K(function(y){switch(y.g){case 1:d=new Map;if(c.length){e=ih(a,c,d);y.F(2);break}return D(y,jh(a,b),3);case 3:e=y.h;case 2:f=e;if(!f)throw new P(2,6,6001);zf(a.j);ta(y,4);a.I.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.I.add(n.contentType.toLowerCase());r=t(k);for(m=r.next();!m.done;m=r.next())q=m.value,a.I.add(q.contentType.toLowerCase());if(c.length){var A=
|
|
231
|
+
f.keySystem;var B=d.get(f.keySystem);var C=[],E=[],H=[],G=[],I=new Set;kh(B,C,H,E,G,I);var J=a.M?"persistent-license":"temporary";A={keySystem:A,licenseServerUri:C[0],distinctiveIdentifierRequired:B[0].distinctiveIdentifierRequired,persistentStateRequired:B[0].persistentStateRequired,sessionType:B[0].sessionType||J,audioRobustness:B[0].audioRobustness||"",videoRobustness:B[0].videoRobustness||"",serverCertificate:H[0],serverCertificateUri:E[0],initData:G,keyIds:I};B=t(B);for(C=B.next();!C.done;C=
|
|
232
|
+
B.next())C=C.value,C.distinctiveIdentifierRequired&&(A.distinctiveIdentifierRequired=C.distinctiveIdentifierRequired),C.persistentStateRequired&&(A.persistentStateRequired=C.persistentStateRequired);B=A}else B=f.keySystem,A=b.get(f.keySystem),C=[],E=[],H=[],G=[],I=new Set,kh(A.drmInfos,C,H,E,G,I),B={keySystem:B,licenseServerUri:C[0],distinctiveIdentifierRequired:"required"==A.distinctiveIdentifier,persistentStateRequired:"required"==A.persistentState,sessionType:A.sessionTypes[0]||"temporary",audioRobustness:(A.audioCapabilities?
|
|
233
|
+
A.audioCapabilities[0].robustness:"")||"",videoRobustness:(A.videoCapabilities?A.videoCapabilities[0].robustness:"")||"",serverCertificate:H[0],serverCertificateUri:E[0],initData:G,keyIds:I};a.g=B;if(!a.g.licenseServerUri)throw new P(2,6,6012,a.g.keySystem);return D(y,f.createMediaKeys(),6);case 6:u=y.h;zf(a.j);a.u=u;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.u)){y.F(7);break}ta(y,8);return D(y,a.u.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),10);case 10:v=y.h;if("usable"!=v)throw new P(2,
|
|
234
234
|
6,6018);zf(a.j);va(y,7,4);break;case 8:x=wa(y,4);if(x instanceof P)throw x;throw new P(2,6,6019,x.message);case 7:return a.$=!0,D(y,ah(a),11);case 11:zf(a.j);va(y,0);break;case 4:z=wa(y);zf(a.j,z);a.g=null;a.I.clear();if(z instanceof P)throw z;throw new P(2,6,6002,z.message);}})}
|
|
235
235
|
function ih(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Ug(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new P(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Ke:d.Ke},e=a.next())for(d.Ke=e.value,f=t(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
|
|
236
236
|
l.Ke}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
|
|
@@ -309,14 +309,14 @@ function oi(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8A
|
|
|
309
309
|
p.Li=function(a){Ae("TsParser","Please use parseNalus function instead.");return this.Rf(a)};
|
|
310
310
|
p.Rf=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;"hvc"==this.m&&(e=2);for(var f=0,g=[],h=-1,k=0,l,m=0;m<d;++m){var n=a[m];if(n){if(2<=f&&1==n){b&&!g.length&&-1==h&&(n=m-(3<f?3:f),0!=n&&(n=a.subarray(0,n),b.data=jg(b.data,n),b.na=jg(b.na,n)));0<=h?(f=m-((3<f?3:f)+1),g.push({data:a.subarray(h+e,f+1),na:a.subarray(h,f+1),type:k,time:c})):b&&!g.length&&(h=m-f,0<h&&(h=a.subarray(0,h),b.data=jg(b.data,h),b.na=jg(b.na,h)));if(m>=d-e)return g;m++;h=m;k="hvc"==this.m?a[m]>>1&63:
|
|
311
311
|
a[m]&31}f=0}else f++;m>=d-1&&0<=h&&0<=f&&(l={data:a.subarray(h+e,d),na:a.subarray(h,d),type:k,time:c})}l&&g.push(l);!g.length&&b&&(b.data=jg(b.data,a),b.na=jg(b.na,a));return g};p.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())(c=oi(c.value))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Sh(c.data),dts:c.dts,pts:c.pts});return a};
|
|
312
|
-
p.hc=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){
|
|
313
|
-
p.Fc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){
|
|
314
|
-
(this.g=this.g.sort(function(
|
|
312
|
+
p.hc=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=c.value,e=oi(d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=jg(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
|
|
313
|
+
p.Fc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=d.value,f=oi(e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=jg(d.data,e),this.g.push(d))}if(a){var g;c=t(this.g);for(d=c.next();!d.done;d=c.next())d=d.value,d.Zb=this.Rf(d,g),d.Zb.length&&(g=d.Zb[d.Zb.length-
|
|
314
|
+
1]);this.g=this.g.filter(function(h){return h.Zb.length})}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if("audio"==a){a=null;var b=this.hc();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Fc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.kd=function(){return{audio:this.s,video:this.m}};
|
|
315
315
|
p.ce=function(){for(var a=[],b=t(this.Fc()),c=b.next();!c.done;c=b.next())a.push.apply(a,w(c.value.Zb));return a};p.ni=function(){Ae("TsParser","Please use getVideoInfo function instead.");var a=this.zf();return{height:a.height,width:a.width}};p.zf=function(){return"hvc"==this.m?pi(this):qi(this)};
|
|
316
316
|
function qi(a){var b={height:null,width:null,sa:null};a=a.ce();if(!a.length)return b;a=a.find(function(r){return 7==r.type});if(!a)return b;a=new ci(a.data);var c=ji(a),d=ji(a),e=ji(a);hi(a);if(ri.includes(c)){var f=R(a);3===f&&ei(a,1);hi(a);hi(a);ei(a,1);if(S(a)){f=3!==f?8:12;for(var g=0;g<f;g++)S(a)&&(6>g?ki(a,16):ki(a,64))}}hi(a);f=R(a);if(0===f)R(a);else if(1===f)for(ei(a,1),hi(a),hi(a),f=R(a),g=0;g<f;g++)hi(a);hi(a);ei(a,1);f=R(a);g=R(a);var h=fi(a,1);0===h&&ei(a,1);ei(a,1);var k=0,l=0,m=0,n=
|
|
317
317
|
0;S(a)&&(k=R(a),l=R(a),m=R(a),n=R(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.sa="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
|
|
318
|
-
function pi(a){var b={height:null,width:null,sa:null};a=a.ce();if(!a.length)return b;a=a.find(function(
|
|
319
|
-
R(c),z+=R(c),y+=R(c),
|
|
318
|
+
function pi(a){var b={height:null,width:null,sa:null};a=a.ce();if(!a.length)return b;a=a.find(function(B){return 33==B.type});if(!a)return b;var c=new ci(a.na,!0);ji(c);ji(c);fi(c,4);var d=fi(c,3);S(c);var e=fi(c,2),f=fi(c,1),g=fi(c,5),h=fi(c,32);a=ji(c);for(var k=ji(c),l=ji(c),m=ji(c),n=ji(c),r=ji(c),q=ji(c),u=[],v=[],x=0;x<d;x++)u.push(S(c)),v.push(S(c));if(0<d)for(x=d;8>x;x++)fi(c,2);for(x=0;x<d;x++)u[x]&&fi(c,88),v[x]&&ji(c);R(c);d=R(c);3==d&&fi(c,1);u=R(c);v=R(c);var z=x=0,y=0,A=0;S(c)&&(x+=
|
|
319
|
+
R(c),z+=R(c),y+=R(c),A+=R(c));b.width=String(u-(x+z)*(1===d||2===d?2:1));b.height=String(v-(y+A)*(1===d?2:1));c=function(B){for(var C=0,E=0;32>E;E++)C|=(B>>E&1)<<31-E;return C>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+q;r&&(e+="."+r.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());a&&(e+="."+a.toString(16).toUpperCase());
|
|
320
320
|
b.sa=e;return b}function si(a){return 0>ni(a)?!1:!0}function ni(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}M("shaka.util.TsParser",mi);mi.syncOffset=ni;mi.probe=si;mi.prototype.getVideoInfo=mi.prototype.zf;mi.prototype.getVideoResolution=mi.prototype.ni;mi.prototype.getVideoNalus=mi.prototype.ce;mi.prototype.getCodecs=mi.prototype.kd;mi.prototype.getStartTime=mi.prototype.getStartTime;mi.prototype.getVideoData=mi.prototype.Fc;
|
|
321
321
|
mi.prototype.getAudioData=mi.prototype.hc;mi.prototype.getMetadata=mi.prototype.getMetadata;mi.prototype.parseNalus=mi.prototype.Rf;mi.prototype.parseAvcNalus=mi.prototype.Li;mi.prototype.parse=mi.prototype.parse;mi.prototype.clearData=mi.prototype.clearData;mi.Timescale=9E4;var ri=[100,110,122,244,44,83,86,118,128,138,139,134];function ti(a,b,c){this.g=null;this.s=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Ua("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,Ae("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Ua("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Ua("Could not find LCEVC Library on this page"),
|
|
322
322
|
a=!1):(this.h.SupportObject.SupportStatus||Ua(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function ui(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
@@ -332,9 +332,9 @@ function Mi(a,b){a.D||!Object.keys(a.g).length?a=null:b==Lb?a=a.h.g:(a=Ni(a,b),a
|
|
|
332
332
|
p.Eb=function(){var a={total:this.D?[]:Lh(this.i.buffered),audio:this.D?[]:Lh(Ni(this,"audio")),video:this.D?[]:Lh(Ni(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Ni(a,b){try{return a.g[b].buffered}catch(c){return null}}
|
|
333
333
|
function Qi(a,b,c,d,e,f){var g=null,h=nc(c);if(ed.includes(e))f=Sh(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.qa([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.g&&d.g.timescale){var k=d.g.timescale;if(!isNaN(k)){var l=0,m=!1;(new Tf).box("moof",Yf).box("traf",Yf).V("tfdt",function(n){l=Wh(n.reader,n.version).baseMediaDecodeTime/
|
|
334
334
|
k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!si(h)||(h=(new mi).parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.qa(h,f,d?d.endTime:null));return g}
|
|
335
|
-
function Ri(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,r,q,u,v,x,z,y,
|
|
336
|
-
case 6:if(!a.g[b])return
|
|
337
|
-
if(!a.m[b]){
|
|
335
|
+
function Ri(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,r,q,u,v,x,z,y,A,B;return K(function(C){switch(C.g){case 1:m=Mb;if(b!=m.ya){C.F(2);break}if(!a.C){C.F(3);break}return D(C,a.za,4);case 4:n=C.h,a.h.u=n;case 3:return D(C,od(a.h,c,d?d.startTime:null,d?d.endTime:null,d?d.aa()[0]:null),5);case 5:return C.return();case 2:if(l||!a.s){C.F(6);break}return D(C,Ri(a,m.W,c,d,e,f,g,h,k,!0),7);case 7:return D(C,Ri(a,m.ra,c,d,e,f,g,h,k,!0),8);case 8:return C.return();
|
|
336
|
+
case 6:if(!a.g[b])return C.return();r=a.g[b].timestampOffset;q=a.I[b];a.m[b]&&(q=a.m[b].getOriginalMimeType());d&&(u=Qi(a,b,c,d,q,r),null!=u&&(v=d.startTime-u,x=Math.abs(r-v),(.001<=x||g||h)&&(!k||0<v||!r)&&(r=v,a.xa&&(Si(a,b,function(){return Ti(a,b)}),Si(a,b,function(){return Ui(a,b,r)}))),z=b==m.ra||!(m.ra in a.g),a.C&&z&&a.za.resolve(r)));f&&b==m.ra&&(a.h||Ii(a,"application/cea-608",a.C,!1),a.J||(y=q.split(";",1)[0],a.J=new tc(y)),d?(A=a.J.i(c),A.length&&sd(a.h,A,d.startTime,d.endTime,r)):a.J.init(c));
|
|
337
|
+
if(!a.m[b]){C.F(9);break}return D(C,a.m[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=C.h;case 9:return c=Vi(a,c,d?d.startTime:null,b),d&&a.C&&b!=m.ya&&(g||h)&&(B=d.startTime,Si(a,b,function(){return Ti(a,b)}),Si(a,b,function(){return Ui(a,b,B)})),D(C,Si(a,b,function(){var E=c;if("video"==b&&a.P){var H=a.P;H.g&&H.g.appendBuffer(E,"video",H.s,-r)}a.g[b].appendBuffer(E)}),11);case 11:F(C)}})}function Wi(a,b){var c=Oi(a,"video")||0;qd(a.h,b,c)}function Xi(a){a.h&&qd(a.h,"",0)}
|
|
338
338
|
p.remove=function(a,b,c){var d=this,e;return K(function(f){return 1==f.g?(e=Mb,a==e.ya?D(f,d.h.remove(b,c),0):D(f,Si(d,a,function(){return Yi(d,a,b,c)}),4)):d.s?D(f,Si(d,e.W,function(){return Yi(d,e.W,b,c)}),0):f.F(0)})};function Zi(a,b){var c;return K(function(d){return 1==d.g?(c=Mb,b==c.ya?a.h?D(d,a.h.remove(0,Infinity),0):d.return():D(d,Si(a,b,function(){return Yi(a,b,0,a.l.duration)}),4)):a.s?D(d,Si(a,c.W,function(){return Yi(a,c.W,0,a.l.duration)}),0):d.F(0)})}
|
|
339
339
|
p.flush=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=Mb,a==c.ya?d.return():D(d,Si(b,a,function(){b.i.currentTime-=.001;Ki(b,a)}),2)):b.s?D(d,Si(b,c.W,function(){var e=c.W;b.i.currentTime-=.001;Ki(b,e)}),0):d.F(0)})};
|
|
340
340
|
function $i(a,b,c,d,e,f,g,h){var k,l,m;return K(function(n){if(1==n.g){k=Mb;if(b==k.ya)return f||(a.h.u=c),pd(a.h,d,e),n.return();l=[];return D(n,aj(a,b,g,h),2)}m=n.h;m||(l.push(Si(a,b,function(){return Ti(a,b)})),a.s&&l.push(Si(a,k.W,function(){return Ti(a,k.W)})));f||(l.push(Si(a,b,function(){return Ui(a,b,c)})),a.s&&l.push(Si(a,k.W,function(){return Ui(a,k.W,c)})));l.push(Si(a,b,function(){a.g[b].appendWindowStart=0;a.g[b].appendWindowEnd=e;a.g[b].appendWindowStart=d;Ki(a,b)}));a.s&&l.push(Si(a,
|
|
@@ -344,8 +344,8 @@ function Ti(a,b){var c=a.g[b].appendWindowStart,d=a.g[b].appendWindowEnd;a.g[b].
|
|
|
344
344
|
function cj(a,b){var c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:zf(a.K);c=[];d={};for(e in a.g)d.Xc=new $e,f={start:function(m){return function(){return m.Xc.resolve()}}(d),p:d.Xc},a.j[e].push(f),c.push(d.Xc),1==a.j[e].length&&f.start(),d={Xc:d.Xc};ta(l,2);return D(l,Promise.all(c),4);case 4:va(l,3);break;case 2:throw g=wa(l),g;case 3:return ta(l,5,6),D(l,b(),6);case 6:xa(l);for(h in a.g)dj(a,h);ya(l,0);break;case 5:throw k=wa(l),new P(2,3,3015,k,a.i.error||"No error in the media element");
|
|
345
345
|
}})}function dj(a,b){a.j[b].shift();ej(a,b)}function ej(a,b){var c=a.j[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new P(2,3,3017,b)):c.p.reject(new P(2,3,3015,d,a.i.error||"No error in the media element")),dj(a,b)}}function Vi(a,b,c,d){var e=a.ea[d];a.G.insertFakeEncryptionInInit&&null==c&&e&&(Ed()||Cd()||Dd("SOPOpenBrowser"))&&"mp4"==a.I[d].split(";")[0].split("/")[1]&&(b=zh(b));return b}
|
|
346
346
|
function fj(a,b,c,d){return Si(a,b,function(){b!==Lb&&(hc()&&(a.m[b]&&(a.m[b].destroy(),delete a.m[b]),d&&(a.m[b]=d),a.g[b].changeType(c+a.G.sourceBufferExtraFeatures),a.I[b]=c),Ki(a,b))})}
|
|
347
|
-
function gj(a,b){var c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,
|
|
348
|
-
4);case 4:return a.m={},a.g={},x=a.l.duration,a.L=new $e,a.l=Ei(a,a.L),D(I,a.L,5);case 5:a.l.duration=x;z=new $e;y=a.l.sourceBuffers;
|
|
347
|
+
function gj(a,b){var c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A,B,C,E,H,G;return K(function(I){switch(I.g){case 1:c=Mb;a.D=!0;a.s=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.Z&&(a.i.autoplay=!1);ua(I,2);a.u.Kb();g=[];for(h in a.m)g.push(a.m[h].destroy());for(k in a.j)for(l=a.j[k],m=l[0],a.j[k]=l.slice(0,1),m&&g.push(m.p.catch(ud)),n=t(l.slice(1)),r=n.next();!r.done;r=n.next())q=r.value,q.p.reject(new P(2,7,7003,void 0));for(u in a.g){v=a.g[u];try{a.l.removeSourceBuffer(v)}catch(J){}}return D(I,Promise.all(g),
|
|
348
|
+
4);case 4:return a.m={},a.g={},x=a.l.duration,a.L=new $e,a.l=Ei(a,a.L),D(I,a.L,5);case 5:a.l.duration=x;z=new $e;y=a.l.sourceBuffers;A=b.size;B=0;a.u.o(y,"addsourcebuffer",function(){B++;B===A&&z.resolve()});C=t(b.keys());for(E=C.next();!E.done;E=C.next())H=E.value,G=b.get(H),Hi(a,H,G,G.codecs),a.s?(a.j[c.W]=[],a.j[c.ra]=[]):a.j[H]=[];a.i.currentTime=d;return D(I,z,2);case 2:xa(I),a.D=!1,zf(a.K),a.u.ka(a.i,"canplay",function(){zf(a.K);a.i.autoplay=e;f||a.i.play()}),ya(I,0)}})}
|
|
349
349
|
function hj(a,b){return cj(a,function(){return gj(a,b)})}
|
|
350
350
|
function aj(a,b,c,d){var e,f,g,h,k,l,m,n,r,q,u;return K(function(v){if(1==v.g){if(b==Lb)return v.return(!1);e=id(kd(a.I[b]))[0];f=jd(a.I[b]);h=dd(c.mimeType,c.codecs);k=a.G.forceTransmux;if(!fc(h)||!a.C&&ed.includes(h))k=!0;l=fd(c.mimeType,c.codecs);k&&(m=Yc(l))&&(g=m(),h=g.convertCodecs(b,l));n=kd(h);r=id(n)[0];q=jd(h);if(e===r&&f===q)return v.return(!1);u=!0;if(a.s||n.split(",").length&&g&&!a.m[b])u=!1;if(u&&"smooth"===a.G.codecSwitchingStrategy&&hc())return D(v,fj(a,b,h,g),3);g&&g.destroy();return D(v,
|
|
351
351
|
hj(a,d),3)}return v.return(!0)})}function ij(a,b,c){if(b==Lb)var d=!1;else{d=id(kd(a.I[b]))[0];var e=jd(a.I[b]),f=dd(c.mimeType,c.codecs),g=a.G.forceTransmux;if(!fc(f)||!a.C&&ed.includes(f))g=!0;c=fd(c.mimeType,c.codecs);g&&(g=Yc(c))&&(g=g(),f=g.convertCodecs(b,c),g.destroy());b=id(kd(f))[0];f=jd(f);d=d!==b||e!==f}return d?"smooth"!==a.G.codecSwitchingStrategy||!hc()||a.s:!1}var Gi=window.URL.createObjectURL,Ji="sequence";function jj(a,b,c){this.i=a;this.m=b;this.u=this.j=Infinity;this.g=1;this.h=this.l=null;this.s=0;this.G=!0;this.H=0;this.C=void 0===c?!0:c;this.I=0;this.D=!1}p=jj.prototype;p.getDuration=function(){return this.j};p.$h=function(){return this.g};p.hh=function(a){this.i=a};p.bb=function(a){this.j=a};p.ci=function(){return this.i};p.dh=function(a){this.s=a};p.Oc=function(a){this.G=a};p.Ce=function(a){this.u=a};p.eh=function(a){this.m=a};p.Sh=function(){return this.m};
|
|
@@ -398,17 +398,17 @@ wa(h),D(h,Ak(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.h.values()
|
|
|
398
398
|
function zk(a,b){if(Bk(b))return Wi(a.g.Y,b.stream.originalId||""),null;b.type==Lb&&Xi(a.g.Y);if(!a.g.Y.$&&b.type!=Lb)return a.i.updateIntervalSeconds/2;var c=a.g.ae(),d=b.Pa?b.Pa.endTime:c,e=Pi(a.g.Y,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.C,g=a.m.presentationTimeline.getDuration()-d,h=Oi(a.g.Y,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.h.get(Lb))&&Bk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/
|
|
399
399
|
2;e=Ck(a,b,c,h);if(!e)return a.i.updateIntervalSeconds;f=Infinity;g=Array.from(a.h.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Bk(h)||h.ba&&!h.ba.current()||(f=Math.min(f,h.Pa?h.Pa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;b.Ga&&b.ba&&(d=e.g,!d||b.Pa&&Eh(d,b.Jc)||bk(b.Ga,d),Yj(b.Ga,e));Dk(a,b,c,e).catch(function(){});return null}
|
|
400
400
|
function Ck(a,b,c,d){if(b.ba)return b.ba.current();if(b.Pa||d)return c=b.Pa?b.Pa.endTime:d,b.Kf=!0,b.ba=b.stream.segmentIndex.ic(c),b.ba&&b.ba.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ba=b.stream.segmentIndex.ic(d),e=b.ba&&b.ba.next().value);e||(b.ba=b.stream.segmentIndex.ic(c),e=b.ba&&b.ba.next().value);return e}
|
|
401
|
-
function Dk(a,b,c,d){var e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,
|
|
402
|
-
ta(J,2);n=Fk(n,
|
|
403
|
-
|
|
404
|
-
|
|
401
|
+
function Dk(a,b,c,d){var e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A;return K(function(B){switch(B.g){case 1:e=Mb;f=b.stream;g=b.ba;b.Qa=!0;ta(B,2);if(2==d.kc())throw new P(1,1,1011);return D(B,Ek(a,b,d),4);case 4:zf(a.l);if(a.u)return B.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.u))return n=new Uint8Array(0),q=r=!1,v=function(C){var E,H,G,I;return K(function(J){switch(J.g){case 1:if(r)return J.return();q=!0;zf(a.l);if(a.u)return J.return();
|
|
402
|
+
ta(J,2);n=Fk(n,C);E=!1;H=0;(new Tf).box("mdat",function(L){H=L.size+L.start;E=!0}).parse(n,!1,!0);if(!E){J.F(4);break}G=n.subarray(0,H);n=n.subarray(H);return D(J,Gk(a,b,c,f,d,G,!0),5);case 5:b.Ga&&b.ba&&Yj(b.Ga,d,!0);case 4:va(J,0);break;case 2:u=I=wa(J),F(J)}})},D(B,Hk(a,b,d,v),9);l=Hk(a,b,d);return D(B,l,7);case 7:m=B.h;zf(a.l);if(a.u)return B.return();zf(a.l);return b.Mb?(b.Qa=!1,ok(a,b,0),B.return()):D(B,Gk(a,b,c,f,d,m),6);case 9:x=B.h;if(u)throw u;if(q){B.F(10);break}r=!0;zf(a.l);return a.u?
|
|
403
|
+
B.return():b.Mb?(b.Qa=!1,ok(a,b,0),B.return()):D(B,Gk(a,b,c,f,d,x),10);case 10:b.Ga&&b.ba&&Yj(b.Ga,d,!0);case 6:zf(a.l);if(a.u)return B.return();b.Pa=d;g.next();b.Qa=!1;b.Vf=!1;z=a.g.Y.Eb();y=z[b.type];$a(JSON.stringify(y));b.Mb||a.g.Pf(d.startTime,d.endTime,b.type);ok(a,b,0);va(B,0);break;case 2:A=wa(B);zf(a.l,A);if(a.u)return B.return();b.Qa=!1;if(7001==A.code)b.Qa=!1,ik(b),ok(a,b,0),B.F(0);else if(b.type==e.ya&&a.i.ignoreTextStreamFailures)a.h.delete(e.ya),B.F(0);else if(3017==A.code)Ik(a,b,A),
|
|
404
|
+
B.F(0);else return b.pd=!0,A.severity=2,D(B,Ak(a,b,A),0)}})}function Jk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return d=b,d.cryptoKey?h.F(2):D(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=nc(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h.return(window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function Fk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
|
|
405
405
|
function Ik(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.Vf})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.pd=!0;a.u=!0;a.g.onError(c);return}b.Vf=!0}ok(a,b,4)}
|
|
406
|
-
function Ek(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v;return K(function(x){if(1==x.g){d=Mb;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=id(b.stream.codecs)[0];k=jd(b.stream.mimeType);l=c.timestampOffset;if(l==b.Gf&&f==b.Ef&&g==b.Df&&h==b.Ff&&k==b.Pg)return x.F(2);if(m=b.Ff&&b.Pg&&ij(a.g.Y,b.type,b.stream))n=null,b.type===d.ra?n=a.h.get(d.W):b.type===d.W&&(n=a.h.get(d.ra)),n&&(n.Jc=null,wk(a,n),jk(n).catch(function(){}));r=function(){var z,y,
|
|
407
|
-
new Map,a.j.audio&&z.set(d.W,a.j.audio),a.j.video&&z.set(d.ra,a.j.video),ta(
|
|
408
|
-
2),D(H,q,4);case 4:return z=H.h,zf(a.l),y=null,
|
|
409
|
-
0<b.stream.closedCaptions.size,D(H,a.g.wg(b.type,z),5);case 5:return D(H,Ri(a.g.Y,b.type,z,null,b.stream,
|
|
410
|
-
function Gk(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,r;return K(function(q){switch(q.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes;m=a.i.parsePrftBox&&!a.G;if(l||m)k=new Tf;l&&k.V("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var x=u.reader.yd();var z=u.reader.yd();var y=u.reader.N();var
|
|
411
|
-
y+e.timestampOffset,
|
|
406
|
+
function Ek(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v;return K(function(x){if(1==x.g){d=Mb;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=id(b.stream.codecs)[0];k=jd(b.stream.mimeType);l=c.timestampOffset;if(l==b.Gf&&f==b.Ef&&g==b.Df&&h==b.Ff&&k==b.Pg)return x.F(2);if(m=b.Ff&&b.Pg&&ij(a.g.Y,b.type,b.stream))n=null,b.type===d.ra?n=a.h.get(d.W):b.type===d.W&&(n=a.h.get(d.ra)),n&&(n.Jc=null,wk(a,n),jk(n).catch(function(){}));r=function(){var z,y,A,B;return K(function(C){if(1==C.g)return z=
|
|
407
|
+
new Map,a.j.audio&&z.set(d.W,a.j.audio),a.j.video&&z.set(d.ra,a.j.video),ta(C,2),b.Ef=f,b.Df=g,b.Ff=h,b.Pg=k,b.Gf=l,y=a.m.sequenceMode||"HLS"==a.m.type,D(C,$i(a.g.Y,b.type,l,f,g,y,b.stream,z),4);if(2!=C.g)return m&&(A=null,b.type===d.ra?A=a.h.get(d.W):b.type===d.W&&(A=a.h.get(d.ra)),A&&(A.Mb=!1,A.Qa=!1,wk(a,A))),va(C,0);B=wa(C);b.Ef=null;b.Df=null;b.Ff=null;b.Gf=null;throw B;})};return D(x,r(),2)}Eh(c.g,b.Jc)||(b.Jc=c.g,c.m&&c.g&&(q=Hk(a,b,c.g),u=function(){var z,y,A,B,C,E;return K(function(H){switch(H.g){case 1:return ta(H,
|
|
408
|
+
2),D(H,q,4);case 4:return z=H.h,zf(a.l),y=null,A=new Map,B=new Tf,B.box("moov",Yf).box("trak",Yf).box("mdia",Yf).V("mdhd",function(G){y=Xh(G.reader,G.version).timescale}).box("hdlr",function(G){G=G.reader;G.skip(8);G=G.Jb(4);var I=String.fromCharCode(G[0]);I+=String.fromCharCode(G[1]);I+=String.fromCharCode(G[2]);I+=String.fromCharCode(G[3]);switch(I){case "soun":A.set(d.W,y);break;case "vide":A.set(d.ra,y)}y=null}).parse(z),A.has(b.type)?c.g.timescale=A.get(b.type):null!=y&&(c.g.timescale=y),C=b.stream.closedCaptions&&
|
|
409
|
+
0<b.stream.closedCaptions.size,D(H,a.g.wg(b.type,z),5);case 5:return D(H,Ri(a.g.Y,b.type,z,null,b.stream,C),6);case 6:va(H,0);break;case 2:throw E=wa(H),b.Jc=null,E;}})},a.g.Ii(c.startTime,c.g),e.push(u())));a.m.sequenceMode&&(v=b.Pa?b.Pa.l:null,c.l!=v||b.Kf)&&(b.Kf=!1,e.push(bj(a.g.Y,b.type,c.startTime)));return D(x,Promise.all(e),0)})}
|
|
410
|
+
function Gk(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,r;return K(function(q){switch(q.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes;m=a.i.parsePrftBox&&!a.G;if(l||m)k=new Tf;l&&k.V("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var x=u.reader.yd();var z=u.reader.yd();var y=u.reader.N();var A=u.reader.N();var B=u.reader.N();var C=u.reader.N();var E=e.startTime+A/y}else y=u.reader.N(),E=u.reader.Nc()/
|
|
411
|
+
y+e.timestampOffset,A=E-e.startTime,B=u.reader.N(),C=u.reader.N(),x=u.reader.yd(),z=u.reader.yd();u=u.reader.Jb(u.reader.getLength()-u.reader.Da());if(v&&v.includes(x)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==x?a.g.Ji():(v=(new Map).set("detail",{startTime:E,endTime:E+B/y,schemeIdUri:x,value:z,timescale:y,presentationTimeDelta:A,eventDuration:B,id:C,messageData:u}),v=new O("emsg",v),v.cancelable=!0,a.g.onEvent(v),v.defaultPrevented||"https://aomedia.org/emsg/ID3"!=x&&"https://developer.apple.com/streaming/emsg-id3"!=
|
|
412
412
|
x||(x=Sh(u),x.length&&e&&a.g.Ki([{cueTime:e.startTime,data:u,frames:x,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.V("prft",function(u){if(!a.G&&e.g.timescale){var v=u.reader,x=u.version;v.N();u=v.N();var z=v.N();u=1E3*u+z/Math.pow(2,32)*1E3;0===x?v=v.N():(x=v.N(),v=v.N(),v=x*Math.pow(2,32)+v);u=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+u)).getTime();v=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-v/e.g.timescale*1E3)});v=new O("prft",v);a.g.onEvent(v);
|
|
413
413
|
a.G=!0}});(l||m)&&k.parse(f);return D(q,Kk(a,b,c),2);case 2:return zf(a.l),n=b.Cd,b.Cd=!1,r=b.ug,b.ug=!1,D(q,a.g.wg(b.type,f),3);case 3:return D(q,Ri(a.g.Y,b.type,f,e,d,h,n,r,g),4);case 4:zf(a.l),F(q)}})}function Kk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=Mi(a.g.Y,b.type);if(null==e)return h.return();f=c-e;g=f-d;return.01>=g?h.return():D(h,a.g.Y.remove(b.type,e,e+g),2)}zf(a.l);F(h)})}
|
|
414
414
|
function Bk(a){return a&&a.type==Lb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
@@ -416,11 +416,13 @@ function Hk(a,b,c,d){var e,f,g,h,k;return K(function(l){switch(l.g){case 1:if(c
|
|
|
416
416
|
function xk(a,b,c,d){var e=b instanceof Fh?b:void 0,f=e?1:0;b=fk(b.aa(),b.cb,b.Ja,a.i.retryParameters,d);return a.g.rc.request(wf,b,{type:f,stream:c,segment:e})}
|
|
417
417
|
function uk(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.Mb=!1,b.Ee=!1,b.Ud=0,b.gd=!0,b.Pa=null,b.Jc=null,b.ba=null,b.Ga&&ck(b.Ga),d?(e=a.g.ae(),f=a.g.Y.getDuration(),D(g,a.g.Y.remove(b.type,e+d,f),3)):D(g,Zi(a.g.Y,b.type),4);if(3!=g.g)return zf(a.l),c?D(g,a.g.Y.flush(b.type),3):g.F(3);zf(a.l);b.gd=!1;b.endOfStream=!1;b.Qa||b.xb||ok(a,b,0);F(g)})}
|
|
418
418
|
function ok(a,b,c){var d=b.type;if(d!=Lb||a.h.has(d))b.xb=(new wd(function(){var e;return K(function(f){if(1==f.g)return ta(f,2),D(f,yk(a,b),4);if(2!=f.g)return va(f,0);e=wa(f);if(a.g)a.g.onError(e);F(f)})})).S(c)}function ik(a){null!=a.xb&&(a.xb.stop(),a.xb=null)}function jk(a){return K(function(b){return a.$a?D(b,a.$a.abort(),0):b.F(0)})}
|
|
419
|
-
function Ak(a,b,c){var d;return K(function(e){if(1==e.g)return D(e,Ze(a.I),2);zf(a.l);d=0===a.i.maxDisabledTime&&1011==c.code?1:a.i.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.Ze(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.i.failureCallback(c);F(e)})};function Lk(a,b,c){var d,e,f,g;return K(function(
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
419
|
+
function Ak(a,b,c){var d;return K(function(e){if(1==e.g)return D(e,Ze(a.I),2);zf(a.l);d=0===a.i.maxDisabledTime&&1011==c.code?1:a.i.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.Ze(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.i.failureCallback(c);F(e)})};function Lk(a,b,c){var d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:var n=(new kb(a)).Ta.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Mk[d])return m.return(e);f=0;g=qf([a],c);ta(m,2);g.method="HEAD";return D(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];va(m,3);break;case 2:k=wa(m);if(!k||1002!=k.code){m.F(3);break}g.method="GET";return D(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?e.toLowerCase().split(";").shift():
|
|
420
|
+
"")}})}
|
|
421
|
+
var Mk={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function Nk(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Nk(g,a)}).join("");var c=[],d=700<=a.fontWeight,e="italic"==a.fontStyle,f=a.textDecoration.includes("underline");d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Ok(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Ok(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);h=k.next().value;k=k.next().value;
|
|
422
|
+
return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
|
|
423
|
+
function Ok(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
|
|
424
|
+
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function Pk(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,w(Pk(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Nk(d,b);c.push(e)}return c};function Qk(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,d.mode="disabled",d.label==b&&(this.g=d);this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}p=Qk.prototype;p.remove=function(a,b){if(!this.g)return!1;Rk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
425
|
+
p.append=function(a){var b=Pk(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=t(b);for(var e=b.next();!e.done;d={wc:d.wc},e=b.next())d.wc=e.value,a.some(function(f){return function(g){return g.startTime==f.wc.startTime&&g.endTime==f.wc.endTime&&g.text==f.wc.payload?!0:!1}}(d))||(e=Sk(d.wc))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
|
|
424
426
|
c.indexOf(g)});a=t(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};p.destroy=function(){this.g&&(Rk(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};p.isTextVisible=function(){return"showing"==this.g.mode};p.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
|
|
425
427
|
function Sk(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
|
|
426
428
|
function Rk(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}M("shaka.text.SimpleTextDisplayer",Qk);Qk.prototype.setTextVisibility=Qk.prototype.setTextVisibility;Qk.prototype.isTextVisible=Qk.prototype.isTextVisible;Qk.prototype.destroy=Qk.prototype.destroy;Qk.prototype.append=Qk.prototype.append;Qk.prototype.remove=Qk.prototype.remove;/*
|
|
@@ -429,23 +431,23 @@ function Rk(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t
|
|
|
429
431
|
Copyright 2023 Google LLC
|
|
430
432
|
SPDX-License-Identifier: Apache-2.0
|
|
431
433
|
*/
|
|
432
|
-
function Tk(){}p=Tk.prototype;p.remove=function(){};p.append=function(){};p.destroy=function(){};p.isTextVisible=function(){return!1};p.setTextVisibility=function(){};M("shaka.text.StubTextDisplayer",Tk);Tk.prototype.setTextVisibility=Tk.prototype.setTextVisibility;Tk.prototype.isTextVisible=Tk.prototype.isTextVisible;Tk.prototype.destroy=Tk.prototype.destroy;Tk.prototype.append=Tk.prototype.append;Tk.prototype.remove=Tk.prototype.remove;function Uk(){}function U(a){return document.createElement(a)}function Vk(){var a=document.createElement("button");a.setAttribute("type","button");return a}function Wk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Uk);Uk.removeAllChildren=Wk;function Xk(a,b){var c=this;this.
|
|
433
|
-
c.D,e=d.videoWidth;d=d.videoHeight;e&&d?c.
|
|
434
|
-
p.destroy=function(){this.
|
|
434
|
+
function Tk(){}p=Tk.prototype;p.remove=function(){};p.append=function(){};p.destroy=function(){};p.isTextVisible=function(){return!1};p.setTextVisibility=function(){};M("shaka.text.StubTextDisplayer",Tk);Tk.prototype.setTextVisibility=Tk.prototype.setTextVisibility;Tk.prototype.isTextVisible=Tk.prototype.isTextVisible;Tk.prototype.destroy=Tk.prototype.destroy;Tk.prototype.append=Tk.prototype.append;Tk.prototype.remove=Tk.prototype.remove;function Uk(){}function U(a){return document.createElement(a)}function Vk(){var a=document.createElement("button");a.setAttribute("type","button");return a}function Wk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Uk);Uk.removeAllChildren=Wk;function Xk(a,b){var c=this;this.m=!1;this.i=[];this.D=a;this.u=b;this.j=null;this.g=U("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.u.appendChild(this.g);this.G=(new xd(function(){Yk(c)})).wa(.25);this.h=new Map;this.l=new Af;this.l.o(document,"fullscreenchange",function(){Yk(c,!0)});this.l.o(this.D,"resize",function(){var d=
|
|
435
|
+
c.D,e=d.videoWidth;d=d.videoHeight;e&&d?c.j=e/d:c.j=null});this.s=null;"ResizeObserver"in window&&(this.s=new ResizeObserver(function(){Yk(c,!0)}),this.s.observe(this.g));this.C=new Map}p=Xk.prototype;p.append=function(a){var b=[].concat(w(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={Id:c.Id},d=a.next())c.Id=d.value,b.some(function(e){return function(f){return Mc(f,e.Id)}}(c))||this.i.push(c.Id);Yk(this)};
|
|
436
|
+
p.destroy=function(){this.u.removeChild(this.g);this.g=null;this.m=!1;this.i=[];this.G&&this.G.stop();this.h.clear();this.l&&(this.l.release(),this.l=null);this.s&&(this.s.disconnect(),this.s=null)};p.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});Yk(this,c>this.i.length);return!0};p.isTextVisible=function(){return this.m};p.setTextVisibility=function(a){this.m=a};
|
|
435
437
|
function Zk(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
436
438
|
function $k(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.ph:null;l&&(g.push(l.Ye),l.zd&&g.push(l.zd),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?Zk(a,n)||(f=!0):(al(a,k,e),l=a.h.get(k),n=l.ph,f=!0));0<k.nestedCues.length&&n&&$k(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(r,q){return r.startTime!=
|
|
437
|
-
q.startTime?r.startTime-q.startTime:r.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.zd?(c.appendChild(d.zd),d.zd.appendChild(d.Ye)):c.appendChild(d.Ye)}}function Yk(a,b){if(a.g){var c=a.D.currentTime;if(!a.
|
|
438
|
-
function al(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=U(e);"br"!=e&&bl(a,f,b,c,d);c=null;if(b.region&&b.region.id){c=b.region;e=a.
|
|
439
|
-
Tc?"%":"px";h.id="shaka-text-region---"+g;h.classList.add("shaka-text-region");h.style.position="absolute";2===c.heightUnits&&2===c.widthUnits?(h.style.height=5.33*c.height+"%",h.style.width=c.width*e+"%"):(h.style.height=c.height+k,h.style.width=c.width+l);2===c.viewportAnchorUnits?(k=c.viewportAnchorY/75*100,l=c.viewportAnchorX/(a.
|
|
440
|
-
c.height/100+m,h.style.left=c.viewportAnchorX-c.regionAnchorX*c.width/100+m);h.style.display="flex";h.style.flexDirection="column";h.style.alignItems="center";h.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.
|
|
439
|
+
q.startTime?r.startTime-q.startTime:r.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.zd?(c.appendChild(d.zd),d.zd.appendChild(d.Ye)):c.appendChild(d.Ye)}}function Yk(a,b){if(a.g){var c=a.D.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.C.values());for(var d=b.next();!d.done;d=b.next())Wk(d.value);Wk(a.g);a.h.clear();a.C.clear()}if(a.m){b=new Map;d=t(a.h.keys());for(var e=d.next();!e.done;e=d.next())e=e.value,b.set(e,a.h.get(e));$k(a,a.i,a.g,c,[])}}}
|
|
440
|
+
function al(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=U(e);"br"!=e&&bl(a,f,b,c,d);c=null;if(b.region&&b.region.id){c=b.region;e=a.j===4/3?2.5:1.9;var g=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==Tc?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==Tc?"%":"px");if(a.C.has(g))c=a.C.get(g);else{var h=U("span"),k=c.heightUnits==Tc?"%":"px",l=c.widthUnits==Tc?"%":"px",m=c.viewportAnchorUnits==
|
|
441
|
+
Tc?"%":"px";h.id="shaka-text-region---"+g;h.classList.add("shaka-text-region");h.style.position="absolute";2===c.heightUnits&&2===c.widthUnits?(h.style.height=5.33*c.height+"%",h.style.width=c.width*e+"%"):(h.style.height=c.height+k,h.style.width=c.width+l);2===c.viewportAnchorUnits?(k=c.viewportAnchorY/75*100,l=c.viewportAnchorX/(a.j===4/3?160:210)*100,k-=c.regionAnchorY*c.height*5.33/100,l-=c.regionAnchorX*c.width*e/100,h.style.top=k+"%",h.style.left=l+"%"):(h.style.top=c.viewportAnchorY-c.regionAnchorY*
|
|
442
|
+
c.height/100+m,h.style.left=c.viewportAnchorX-c.regionAnchorX*c.width/100+m);h.style.display="flex";h.style.flexDirection="column";h.style.alignItems="center";h.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.C.set(g,h);c=h}}e=f;d&&(e=U("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.h.set(b,{Ye:f,ph:e,zd:c})}
|
|
441
443
|
function cl(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Cc?c:"left"===a||"start"===a&&b===Ec||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Ec?"line-right":"center"}
|
|
442
|
-
function bl(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=dl(c.linePadding,c,a.
|
|
444
|
+
function bl(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=dl(c.linePadding,c,a.u);f.paddingRight=dl(c.linePadding,c,a.u);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
|
|
443
445
|
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=U("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=el(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=el(d,function(m){return m.fontFamily}))&&(l.style.fontFamily=b);k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?
|
|
444
|
-
f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=dl(c.fontSize,c,a.
|
|
445
|
-
c.
|
|
446
|
-
c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Fc?f.width=c.size+"%":f.height=c.size+"%")}
|
|
446
|
+
f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=dl(c.fontSize,c,a.u);d=c.line;null!=d&&(g=c.lineInterpretation,g==Gc&&(g=1,h=16,a.j&&1>a.j&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==
|
|
447
|
+
Fc?(f.width="100%",c.lineAlign==Hc?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Hc?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Hc?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==Fc?f.paddingLeft=c.position:f.paddingTop=c.position);a=cl(c);"line-left"==a?f.cssFloat="left":"line-right"==a&&(f.cssFloat="right");f.textAlign=c.textAlign;
|
|
448
|
+
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==Fc?f.width=c.size+"%":f.height=c.size+"%")}
|
|
447
449
|
function dl(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 el(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}M("shaka.text.UITextDisplayer",Xk);Xk.prototype.setTextVisibility=Xk.prototype.setTextVisibility;
|
|
448
|
-
Xk.prototype.isTextVisible=Xk.prototype.isTextVisible;Xk.prototype.remove=Xk.prototype.remove;Xk.prototype.destroy=Xk.prototype.destroy;Xk.prototype.append=Xk.prototype.append;function fl(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=Pk(a
|
|
450
|
+
Xk.prototype.isTextVisible=Xk.prototype.isTextVisible;Xk.prototype.remove=Xk.prototype.remove;Xk.prototype.destroy=Xk.prototype.destroy;Xk.prototype.append=Xk.prototype.append;function fl(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=Pk(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");
|
|
449
451
|
break;case "right":g.push("align:right");break;case Dc: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}M("shaka.text.WebVttGenerator",function(){});function gl(a,b){this.h=a;this.g=b;this.j="";this.s=void 0;this.i=!1;this.m=!0;this.l=!1}gl.prototype.configure=function(a){this.g=a};
|
|
450
452
|
function hl(a,b,c){try{if(!a.g.enabled)return b;var d=il(a);a:{switch(c.toLowerCase()){case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":var e=jl;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":e=kl;break a}e=void 0}d.ot=e;d.su=!0;var f=ll(d);return ml(b,f)}catch(g){return Va("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}
|
|
451
453
|
function il(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.s,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}function nl(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,il(a));c.pr=a.h.Ub();var e=c.ot===ol||c.ot===jl;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=pl(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=ll(c);f&&(b.uris=b.uris.map(function(g){return ml(g,f)}))}}}
|
|
@@ -489,24 +491,24 @@ d.ea=b;d.Qb=!1;d.dispatchEvent(am("loading"));h=Date.now()/1E3;d.C=new Rl;d.$=a;
|
|
|
489
491
|
pm(d,c),0)})},"parseManifestInner_"),13);case 13:return D(m,g(function(){return K(function(n){return D(n,qm(d),0)})},"initializeDrmInner_"),14);case 14:return D(m,g(function(){return K(function(n){return D(n,rm(d,h),0)})},"loadInner_"),10);case 16:return D(m,g(function(){return K(function(n){return D(n,sm(d,h,c),0)})},"srcEqualsInner_"),10);case 10:d.dispatchEvent(am("loaded"));va(m,0);break;case 5:l=wa(m);if(7E3==l.code){m.F(18);break}return D(m,d.Pc(!1),18);case 18:throw l;}})};
|
|
490
492
|
function mm(a){var b,c;return K(function(d){if(1==d.g)return b=a.h.manifest.retryParameters,D(d,Lk(a.$,a.J,b),2);c=d.h;"application/x-mpegurl"==c&&Id()&&(c="application/vnd.apple.mpegurl");return d.return(c)})}function nm(a,b){if(!yd())return!0;if(b){if(""==(a.g||Ad()).canPlayType(b))return!1;if(!(yd()&&b in yh))return!0;if("application/x-mpegurl"===b||"application/vnd.apple.mpegurl"===b){if(a.h.streaming.preferNativeHls)return!0;if(Id())return a.h.streaming.useNativeHlsOnSafari}}return!1}
|
|
491
493
|
function km(a){var b,c,d,e,f;return K(function(g){if(1==g.g)return dm(a,"media-source"),b=a.h.textDisplayFactory,c=b(),a.Tf=b,d=tm(a.g,c,function(h,k,l){um(a,h,k,l)},a.L),d.configure(a.h.mediaSource),e=a.h.manifest,f=e.segmentRelativeVttTiming,d.U=f,D(g,d.L,2);a.I=d;F(g)})}
|
|
492
|
-
function pm(a,b){var c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g)return c=a.J,dm(a,"manifest-parser"),a.se=xh(a.$,b||null),a.H=a.se(),d=hf(a.h.manifest),a.g&&"AUDIO"===a.g.nodeName&&(d.disableVideo=!0),a.H.configure(d),a.qa=new Rj(function(){return a.
|
|
494
|
+
function pm(a,b){var c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g)return c=a.J,dm(a,"manifest-parser"),a.se=xh(a.$,b||null),a.H=a.se(),d=hf(a.h.manifest),a.g&&"AUDIO"===a.g.nodeName&&(d.disableVideo=!0),a.H.configure(d),a.qa=new Rj(function(){return a.Fa()}),a.qa.addEventListener("regionadd",function(n){n=n.region;vm(a,"timelineregionadded",n);if(a.D)a.D.onDashTimedMetadata(n)}),a.ha=null,a.h.streaming.observeQualityChanges&&(a.ha=new Nj(function(){return a.Eb()}),a.ha.addEventListener("qualitychange",
|
|
493
495
|
function(n){var r=n.quality;n=n.position;r=(new Map).set("mediaQuality",{bandwidth:r.bandwidth,audioSamplingRate:r.audioSamplingRate,codecs:r.codecs,contentType:r.contentType,frameRate:r.frameRate,height:r.height,mimeType:r.mimeType,channelsCount:r.channelsCount,pixelAspectRatio:r.pixelAspectRatio,width:r.width}).set("position",n);a.dispatchEvent(am("mediaqualitychanged",r))})),e={networkingEngine:c,filter:function(n){return wm(a,n)},makeTextStreamsForClosedCaptions:function(n){return xm(a,n)},onTimelineRegionAdded:function(n){var r=
|
|
494
496
|
a.qa;a:{var q=t(r.g);for(var u=q.next();!u.done;u=q.next())if(u=u.value,u.schemeIdUri==n.schemeIdUri&&u.id==n.id&&u.startTime==n.startTime&&u.endTime==n.endTime){q=u;break a}q=null}null==q&&(r.g.add(n),n=new O("regionadd",new Map([["region",n]])),r.dispatchEvent(n))},onEvent:function(n){return a.dispatchEvent(n)},onError:function(n){return jm(a,n)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",
|
|
495
497
|
!0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(n){var r=a.s?a.s.g:null;r&&a.s.u&&ym(a,r.keySystem,n)},onManifestUpdated:function(){var n=(new Map).set("isLive",a.R());a.dispatchEvent(am("manifestupdated",n));if(a.D)a.D.onManifestUpdated(a.R())},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()}},f=Date.now()/1E3,dm(a,"manifest"),g=a,D(m,a.H.start(a.$,e),2);g.i=m.h;h=am("manifestparsed");a.dispatchEvent(h);if(0==a.i.variants.length)throw new P(2,4,4036);
|
|
496
498
|
zm(a.i);k=Date.now()/1E3;l=k-f;a.C.H=l;F(m)})}function qm(a){var b,c;return K(function(d){return 1==d.g?(dm(a,"drm-engine"),b=Date.now()/1E3,c=!0,a.s=Am(a,{rc:a.J,onError:function(e){jm(a,e)},we:function(e){Bm(a,e)},onExpirationUpdated:function(e,f){Cm(a,e,f)},onEvent:function(e){a.dispatchEvent(e);"drmsessionupdate"==e.type&&c&&(c=!1,a.C.j=Date.now()/1E3-b,a.L&&ui(a.L))}}),a.s.configure(a.h.drm),D(d,Pg(a.s,a.i.variants,a.i.offlineSessionIds),2)):3!=d.g?D(d,a.s.yc(a.g),3):D(d,wm(a,a.i),0)})}
|
|
497
|
-
function rm(a,b){var c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,
|
|
499
|
+
function rm(a,b){var c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A,B;return K(function(C){switch(C.g){case 1:dm(a,"load");c=a.g;a.K=new Kj({be:function(){return c.playbackRate},ld:function(){return c.defaultPlaybackRate},fg:function(E){c.playbackRate=E},Tg:function(E){c.currentTime+=E}});d=function(){return Dm(a)};e=function(){return Em(a)};a.m.o(c,"playing",d);a.m.o(c,"pause",d);a.m.o(c,"ended",d);a.m.o(c,"ratechange",e);$l(a,a.h);f=a.h.abrFactory;a.u&&a.Nf==f||(a.Nf=f,a.u=f(),"function"!=typeof a.u.setMediaElement&&
|
|
498
500
|
(Ae("AbrManager","Please use an AbrManager with setMediaElement function."),a.u.setMediaElement=function(){}),a.u.configure(a.h.abr));a.za=new Je(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount,a.h.preferredVideoHdrLevel,a.h.preferredVideoLayout,a.h.preferredAudioLabel,a.h.mediaSource.codecSwitchingStrategy,a.h.manifest.dash.enableAudioGroups);a.Ia=a.h.preferredTextLanguage;a.yb=a.h.preferredTextRole;a.Ab=a.h.preferForcedSubs;Fm(a.i.presentationTimeline,a.h.playRangeStart,
|
|
499
501
|
a.h.playRangeEnd);a.u.init(function(E,H,G){a.j&&E!=a.j.j&&Gm(a,E,!0,void 0===H?!1:H,void 0===G?0:G)});a.u.setMediaElement(c);Pd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);a.j=Hm(a);a.j.configure(a.h.streaming);a.l=Im;c.textTracks&&a.m.o(c.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":Jm(a,E)}});a.dispatchEvent(am("streaming"));g=null;(h=a.j.j)||(g=Km(a,!0));k=[];l=h||g;m=t([l.video,l.audio]);for(n=m.next();!n.done;n=
|
|
500
|
-
m.next())(r=n.value)&&!r.segmentIndex&&k.push(r.createSegmentIndex());if(!(0<k.length)){
|
|
501
|
-
|
|
502
|
-
"timeupdate",
|
|
502
|
+
m.next())(r=n.value)&&!r.segmentIndex&&k.push(r.createSegmentIndex());if(!(0<k.length)){C.F(2);break}return D(C,Promise.all(k),2);case 2:if(a.H&&a.H.onInitialVariantChosen)a.H.onInitialVariantChosen(l);Fm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.G=Lm(a,a.ea);a.Na=Mm(a,b);q=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Nm(a,c,q);if(h){C.F(4);break}Gm(a,g,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){C.F(4);break}u=a.G;v=u.Qe;return D(C,Om(g,a.G.Pd()),6);case 6:v.call(u,
|
|
503
|
+
C.h);case 4:return a.G.Pe(),x=a.Xb().find(function(E){return E.active}),x||((z=re(a.i.textStreams,a.Ia,a.yb,a.Ab)[0]||null)&&Ql(a.C.h,z,!0),g&&(z?(g.audio&&Pm(a,g.audio,z)&&(a.Z=!0),a.Z&&a.I.H.setTextVisibility(!0),Qm(a)):a.Z=!1),z&&(a.h.streaming.alwaysStreamText||a.pc())&&tk(a.j,z)),D(C,a.j.start(),7);case 7:a.h.abr.enabled&&(a.u.enable(),Rm(a));Sm(a);Tm(a);a.i.variants.some(function(E){return E.primary});(y=a.R())&&(a.h.streaming.liveSync||a.i.serviceDescription)?(A=function(){return Um(a)},a.m.o(c,
|
|
504
|
+
"timeupdate",A)):y||(B=function(){return Vm(a)},a.m.o(c,"timeupdate",B),Vm(a));if(a.D)a.D.onManifestUpdated(y);a.Qb=!0;a.m.ka(c,"loadedmetadata",function(){a.C.m=Date.now()/1E3-b});F(C)}})}
|
|
503
505
|
function om(a,b){var c,d,e,f;return K(function(g){return 1==g.g?(c=Mb,d=Date.now()/1E3,e=!0,a.s=Am(a,{rc:a.J,onError:function(h){jm(a,h)},we:function(h){Bm(a,h)},onExpirationUpdated:function(h,k){Cm(a,h,k)},onEvent:function(h){a.dispatchEvent(h);"drmsessionupdate"==h.type&&e&&(e=!1,a.C.j=Date.now()/1E3-d)}}),a.s.configure(a.h.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:{id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,
|
|
504
506
|
mimeType:b?jd(b):"",codecs:b?kd(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ra,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.s.Z=!0,D(g,Pg(a.s,[f],[]),2)):D(g,a.s.yc(a.g),0)})}
|
|
505
507
|
function sm(a,b,c){var d,e,f,g,h,k,l,m,n,r;return K(function(q){if(1==q.g)return dm(a,"src-equals"),d=a.g,a.G=new zj(d),e=!1,a.Va.push(function(){e=!0}),null!=a.ea&&a.G.Qe(a.ea),a.K=new Kj({be:function(){return d.playbackRate},ld:function(){return d.defaultPlaybackRate},fg:function(u){d.playbackRate=u},Tg:function(u){d.currentTime+=u}}),f=a.h.streaming.rebufferingGoal,Nm(a,d,f),g=function(){return Dm(a)},h=function(){return Em(a)},a.m.o(d,"playing",g),a.m.o(d,"pause",g),a.m.o(d,"ended",g),a.m.o(d,
|
|
506
508
|
"ratechange",h),"none"!=d.preload&&a.m.ka(d,"loadedmetadata",function(){a.C.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.o(d.audioTracks,"addtrack",function(){return Sm(a)}),a.m.o(d.audioTracks,"removetrack",function(){return Sm(a)}),a.m.o(d.audioTracks,"change",function(){return Sm(a)})),d.textTracks&&(a.m.o(d.textTracks,"addtrack",function(u){if(u.track)switch(u=u.track,u.kind){case "metadata":Wm(a,u);break;case "chapters":Jm(a,u);break;default:Sm(a)}}),a.m.o(d.textTracks,"removetrack",function(){return Sm(a)}),
|
|
507
509
|
a.m.o(d.textTracks,"change",function(){return Sm(a)})),d.src=hl(a.T,a.$,c),(Ed()||Dd("Web0S"))&&d.load(),a.l=Xm,a.dispatchEvent(am("streaming")),k=new $e,qj(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.G.Pe();k.resolve()}),qj(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var u;return K(function(v){if(1==v.g)return Ym(a),u=Zm(a),u.find(function(x){return"disabled"!=x.mode})?(0<u.length&&(a.Z=!0),v.F(2)):D(v,new Promise(function(x){a.m.ka(d.textTracks,"change",x);(new xd(x)).S(1)}),2);if(e)return v.return();
|
|
508
510
|
$m(a);F(v)})}),d.error?k.reject(im(a)):"none"==d.preload&&(Ua('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),k.resolve()),a.m.ka(d,"error",function(){k.reject(im(a))}),D(q,k,2);(l=a.R())&&a.h.streaming.liveSync?(m=function(){return Um(a)},a.m.o(d,"timeupdate",m)):l||(n=function(){return Vm(a)},a.m.o(d,"timeupdate",
|
|
509
|
-
n),Vm(a));a.D&&(a.D.onManifestUpdated(l),l&&(r=a.
|
|
511
|
+
n),Vm(a));a.D&&(a.D.onManifestUpdated(l),l&&(r=a.Fa().end,a.m.o(d,"progress",function(){var u=a.Fa().end;r!=u&&(a.D.onManifestUpdated(a.R()),r=u)})));a.Qb=!0;F(q)})}function Ym(a){var b=a.h.preferredAudioLanguage;""!=b&&a.Ae(b,a.h.preferredVariantRole)}function $m(a){var b=a.h.preferredTextLanguage;""!=b&&a.ah(b,a.h.preferredTextRole,a.h.preferForcedSubs)}
|
|
510
512
|
function Wm(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.o(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,an(a,e.startTime,e.endTime,e.type,e.value),a.D)a.D.onCueMetadataChange(e.value)});var c=(new xd(function(){var d=bn(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Ma().S(.5);a.Va.push(function(){c.stop()})}}
|
|
511
513
|
function um(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())an(a,f,g,"org.id3",k.value);if(a.D)a.D.onHlsTimedMetadata(e,f)}}function an(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(am("metadata",b))}
|
|
512
514
|
function Jm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new xd(function(){b.mode="hidden"})).Ma().S(.5);a.Va.push(function(){c.stop()})}}function zm(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}p.Qi=function(){for(var a=this.U;a.g;)a.release()};function Am(a,b){return new Ig(b,a.h.drm.updateExpirationTime)}
|
|
@@ -514,7 +516,7 @@ function Vl(a){return new mf(function(b,c,d){a.u&&a.u.segmentDownloaded(b,c,d)},
|
|
|
514
516
|
"d";break a;case 3:case 2:f="h";break a;case 5:f="s";break a}f=void 0}e.s=f}nl(e,c,{ot:kl,su:!e.i})}}catch(m){Va("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",m)}break;case wf:b=d;try{if(e.g.enabled){var g=b.segment;f=0;g&&(f=g.endTime-g.startTime);var h={d:1E3*f,st:e.h.R()?"l":"v"};h.ot=ql(b);var k=h.ot===ol||h.ot===sl||h.ot===jl||h.ot===tl,l=b.stream;l&&(k&&(h.bl=vl(e,l.type)),l.bandwidth&&(h.br=l.bandwidth/1E3));k&&h.ot!==tl&&(h.tb=wl(e,h.ot)/1E3);nl(e,c,h)}}catch(m){Va("CMCD_SEGMENT_ERROR",
|
|
515
517
|
"Could not generate segment CMCD data.",m)}break;case 2:case 5:case 6:nl(e,c,{ot:"k"});break;case 4:nl(e,c,{ot:"o"})}},function(b,c,d,e){a.H&&a.H.banLocation&&a.H.banLocation(e)})}function Lm(a,b){return new Aj(a.g,a.i,a.h.streaming,b,function(){a.Na&&Mj(a.Na,!0);a.j&&a.j.Cd();a.M&&cn(a)},function(c){return a.dispatchEvent(c)})}
|
|
516
518
|
function Mm(a,b){b=new Sj(a.qa,a.R()||0<b);b.addEventListener("enter",function(d){vm(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){vm(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(vm(a,"timelineregionenter",e),vm(a,"timelineregionexit",e))});var c=new Lj(a.g);c.g.add(b);a.ha&&c.g.add(a.ha);return c}
|
|
517
|
-
function Nm(a,b,c){a.M=new Se;a.M.g=Ue;
|
|
519
|
+
function Nm(a,b,c){a.M=new Se;a.M.g=Ue;Ve(a.M,c,Math.min(.5,c/2));lm(a);a.m.o(b,"waiting",function(){return cn(a)});a.m.o(b,"stalled",function(){return cn(a)});a.m.o(b,"canplaythrough",function(){return cn(a)});a.m.o(b,"progress",function(){return cn(a)})}
|
|
518
520
|
function cn(a){switch(a.l){case Xm:if(a.g.ended)var b=!0;else{var c=Ih(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Im:a:if(a.g.ended||Li(a.I))b=!0;else{if(a.i.presentationTimeline.R()){c=a.i.presentationTimeline.Vb();var d=Ih(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Kh(a.g.buffered,a.g.currentTime);c=a.M;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Te:Ue;c.g=d;b!=d&&lm(a)}function tm(a,b,c,d){return new Di(a,b,c,d)}
|
|
519
521
|
function Ul(a){return new gl({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Eb:function(){return a.Eb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Ub:function(){return a.Ub()},Tb:function(){return a.Tb()},hb:function(){return a.hb()},R:function(){return a.R()}},a.h.cmcd)}
|
|
520
522
|
function Hm(a){return new gk(a.i,{ae:function(){return a.G?a.G.Pd():0},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},Y:a.I,rc:a.J,onError:function(b){return jm(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Ji:function(){a.H&&a.H.update&&a.H.update()},Pf:function(b,c,d){a.G&&a.G.Ug();cn(a);b=(new Map).set("start",b).set("end",c).set("contentType",d);a.dispatchEvent(am("segmentappended",b))},Ii:function(b,c){(c=c.Jf)&&a.ha&&Pj(a.ha,c,b)},wg:function(b,c){var d=a.s;if(d.h.parseInbandPsshEnabled&&
|
|
@@ -522,17 +524,17 @@ function Hm(a){return new gk(a.i,{ae:function(){return a.G?a.G.Pd():0},getBandwi
|
|
|
522
524
|
p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=zl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(Ae("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(Ae("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
523
525
|
a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2));var c=Ll(this.h,a,Tl(this));dn(this);return c};
|
|
524
526
|
function dn(a){if(a.H){var b=hf(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.H.configure(b)}a.s&&a.s.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{en(a,a.i)}catch(f){jm(a,f)}a.u&&Tm(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||fn(a)}a.J&&a.J.dg(a.h.streaming.forceHTTPS);if(a.I&&(a.I.configure(a.h.mediaSource),a.I.U=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Tf!=b)){var c=b(),d=a.I,e=d.H;d.H=c;e&&(c.setTextVisibility(e.isTextVisible()),
|
|
525
|
-
e.destroy());d.h&&(d.h.j=c);a.Tf=b;a.j&&(b=a.j,(c=b.h.get(Lb))&&rk(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),Rm(a));a.M&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),
|
|
526
|
-
p.Kh=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.
|
|
527
|
+
e.destroy());d.h&&(d.h.j=c);a.Tf=b;a.j&&(b=a.j,(c=b.h.get(Lb))&&rk(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),Rm(a));a.M&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ve(a.M,b,Math.min(.5,b/2)));a.i&&Fm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.D&&a.D.configure(a.h.ads);a.T&&a.T.configure(a.h.cmcd)}p.getConfiguration=function(){var a=Tl(this);Ll(a,this.h,Tl(this));return a};
|
|
528
|
+
p.Kh=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Fa().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};p.Ui=function(){for(var a in this.h)delete this.h[a];Ll(this.h,Tl(this),Tl(this));dn(this)};p.$d=function(){return this.l};p.wf=function(){return this.i?this.i.type:null};p.ai=function(){return this.g};
|
|
527
529
|
p.Tb=function(){return this.J};p.uf=function(){return this.$};p.Xd=function(){return this.D?this.D:null};p.R=function(){return this.i?this.i.presentationTimeline.R():this.g&&this.g.src?Infinity==this.g.duration:!1};p.mc=function(){return this.i?this.i.presentationTimeline.mc():!1};p.Hc=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
|
|
528
|
-
p.
|
|
530
|
+
p.Fa=function(){if(this.i){if(!this.Qb&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Ec(),end:a.Fb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};p.oi=function(){this.R()&&(this.g.currentTime=this.Fa().end)};p.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};p.drmInfo=function(){return this.s?this.s.g:null};p.md=function(){return this.s?this.s.md():Infinity};
|
|
529
531
|
p.tf=function(){return this.s?this.s.tf():[]};p.Zd=function(){return this.s?this.s.Zd():{}};p.rd=function(){return this.M?this.M.g==Ue:!1};p.Ub=function(){return this.g?this.K?this.K.h:1:0};p.Gd=function(a){0==a?Ua("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.K.set(a),this.l==Im&&(this.u.playbackRateChanged(a),qk(this.j,1<Math.abs(a))))};p.Ve=function(){var a=this.K.ld();this.l==Xm&&this.K.set(a);this.l==Im&&(this.K.set(a),this.u.playbackRateChanged(a),qk(this.j,!1))};
|
|
530
532
|
p.hb=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,pe(e)){var f=he(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return oe(g)}):[]};
|
|
531
533
|
p.Xb=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ie(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Zm(this).map(function(f){return me(f)}):[]};p.Yd=function(){var a=this.Bb;this.i&&(a=this.i.imageStreams);return a.map(function(b){return je(b)})};
|
|
532
534
|
p.Hh=function(a){var b=this,c,d,e,f;return K(function(g){if(1==g.g){if(b.l!=Im&&b.l!=Xm)return g.return(null);c=b.Bb;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.F(2):D(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],Gj(d.segmentIndex,function(h){var k=gn(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.ec;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.yf(a,h.startTime+l*m/k))}}),D(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
533
535
|
function gn(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{ec:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
534
|
-
p.yf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,
|
|
535
|
-
u=g.I||q/r;v=g.startTime;z=x=0;1<r&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,x=y%h.ec*m,z=Math.floor(y/h.ec)*n);
|
|
536
|
+
p.yf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A,B;return K(function(C){if(1==C.g){if(c.l!=Im&&c.l!=Xm)return C.return(null);d=c.Bb;c.i&&(d=c.i.imageStreams);return(e=d.find(function(E){return E.id==a}))?e.segmentIndex?C.F(2):D(C,e.createSegmentIndex(),2):C.return(null)}f=e.segmentIndex.find(b);if(null==f)return C.return(null);g=e.segmentIndex.get(f);h=gn(g.tilesLayout||e.tilesLayout);if(!h)return C.return(null);k=e.width||0;l=e.height||0;m=k/h.ec;n=l/h.rows;r=h.ec*h.rows;q=g.j-g.startTime;
|
|
537
|
+
u=g.I||q/r;v=g.startTime;z=x=0;1<r&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,x=y%h.ec*m,z=Math.floor(y/h.ec)*n);A=!1;if(B=g.H)A=!0,n=B.height,x=B.positionX,z=B.positionY,m=B.width;return C.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:x,positionY:z,startTime:v,duration:u,uris:g.aa(),width:m,sprite:A})})};
|
|
536
538
|
p.$f=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(Ql(this.C.h,b,!1),tk(this.j,b),hn(this),this.Ia=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Zm(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ke(c)==a.id?c.mode=this.Z?"showing":"hidden":c.mode="disabled";hn(this)}};
|
|
537
539
|
p.Be=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Ua("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&pe(d)&&(Gm(this,d,!1,b,c),this.za=new Ie(d,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),Tm(this))}else if(this.g&&this.g.audioTracks)for(b=
|
|
538
540
|
Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,ke(c)==a.id){jn(this,c);break}};p.Jh=function(){return kn(this.hb())};p.gi=function(){return kn(this.Xb())};p.Ih=function(){return Array.from(ln(this.hb()))};p.ei=function(){return Array.from(ln(this.Xb()))};
|
|
@@ -547,21 +549,21 @@ p.bi=function(){if(!this.R())return null;if(this.G)var a=this.G.Pd();else{if(nul
|
|
|
547
549
|
p.Kg=function(){if(!this.R())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};p.Eb=function(){if(this.l==Im)return this.I.Eb();var a={total:[],audio:[],video:[],text:[]};this.l==Xm&&(a.total=Lh(this.g.buffered));return a};
|
|
548
550
|
p.getStats=function(){if(this.l!=Im&&this.l!=Xm)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Dm(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.C;b=
|
|
549
551
|
Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.G&&(this.C.M=this.G.rg(),this.C.P=this.G.sg());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.C;var d=Number(c.totalVideoFrames);b.L=Number(c.droppedVideoFrames);b.K=d;this.C.J=Number(c.corruptedVideoFrames)}this.s?(c=this.s,c=c.J?c.J:NaN):c=NaN;this.C.u=c;if(this.l==Im){if(c=this.j.j)this.C.D=(this.K?this.K.h:1)*c.bandwidth;c&&c.video&&(b=this.C,d=c.video.height||NaN,b.s=c.video.width||NaN,b.l=d);this.R()&&(c=this.Kg().valueOf()+
|
|
550
|
-
1E3*
|
|
551
|
-
id:E.id,type:E.type,fromAdaptation:E.fromAdaptation,bandwidth:E.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:r,drmTimeSeconds:q,playTime:u,pauseTime:v,bufferingTime:x,licenseTime:z,liveLatency:y,maxSegmentDuration:
|
|
552
|
-
p.vh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,r,q,u,v,x,z,y,
|
|
553
|
-
h.i&&(q=h.i.presentationTimeline.getDuration());if(Infinity==q)throw new P(1,4,4033);if(!k.length){
|
|
554
|
-
primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1};y=dd(z.mimeType,z.codecs);
|
|
555
|
-
p.wh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y;return K(function(
|
|
556
|
-
vttOffset:0};l=nc(f);m=h.parseMedia(l,k,a);n=[];r={};q=t(m);for(u=q.next();!u.done;r={Tc:r.Tc},u=q.next())v=u.value,r.Tc=Eb([a],[v.payload])[0],x=new Fh(v.startTime,v.endTime,function(
|
|
557
|
-
segmentIndex:new Fj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.fd,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1};c.l==Xm?c.Bb.push(y):c.i.imageStreams.push(y);Sm(c);return
|
|
552
|
+
1E3*a.currentTime,this.C.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.C.I=this.i.presentationTimeline.g);c=this.u.getBandwidthEstimate();this.C.C=c}this.l==Xm&&(c=this.C,b=a.videoHeight||NaN,c.s=a.videoWidth||NaN,c.l=b);var e=this.C;a=e.s;c=e.l;b=e.D;d=e.K;var f=e.L,g=e.J,h=e.P,k=e.M,l=e.C,m=e.i,n=e.m,r=e.H,q=e.j,u=Nl(e.g,"playing"),v=Nl(e.g,"paused"),x=Nl(e.g,"buffering"),z=e.u,y=e.G,A=e.I,B=Ol(e.g),C=[];e=t(e.h.g);for(var E=e.next();!E.done;E=e.next())E=E.value,C.push({timestamp:E.timestamp,
|
|
553
|
+
id:E.id,type:E.type,fromAdaptation:E.fromAdaptation,bandwidth:E.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:r,drmTimeSeconds:q,playTime:u,pauseTime:v,bufferingTime:x,licenseTime:z,liveLatency:y,maxSegmentDuration:A,stateHistory:B,switchHistory:C}};
|
|
554
|
+
p.vh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,r,q,u,v,x,z,y,A;return K(function(B){switch(B.g){case 1:if(h.l!=Im&&h.l!=Xm)throw new P(1,7,7004);if(d){B.F(2);break}return D(B,nn(h,a),3);case 3:d=B.h;case 2:k=[];h.D&&(k=h.D.getCuePoints());if(h.l!=Xm){B.F(4);break}g&&(c="forced");return D(B,on(h,a,b,c,d,f||"",k),5);case 5:l=Pb(b);m=h.Xb();if(n=m.find(function(C){return Pb(C.language)==l&&C.label==(f||"")&&C.kind==c}))return Sm(h),B.return(n);throw new P(1,2,2012);case 4:r=Mb;q=h.g.duration;
|
|
555
|
+
h.i&&(q=h.i.presentationTimeline.getDuration());if(Infinity==q)throw new P(1,4,4033);if(!k.length){B.F(6);break}return D(B,pn(h,a,h.J,h.h.streaming.retryParameters),7);case 7:u=B.h,v=qn(h,u,d,k),x=new Blob([v],{type:"text/vtt"}),a=Gi(x),d="text/vtt";case 6:z={id:h.Xf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ij(0,q,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:r.ya,
|
|
556
|
+
primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1};y=dd(z.mimeType,z.codecs);A=md(y);if(!A)throw new P(2,2,2014,d);h.i.textStreams.push(z);Sm(h);return B.return(ie(z))}})};
|
|
557
|
+
p.wh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y;return K(function(A){switch(A.g){case 1:if(c.l!=Im&&c.l!=Xm)throw new P(1,7,7004);if(b){A.F(2);break}return D(A,nn(c,a),3);case 3:b=A.h;case 2:if("text/vtt"!=b)throw new P(1,2,2017,a);d=Mb;e=c.g.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new P(1,4,4045);return D(A,pn(c,a,c.J,c.h.streaming.retryParameters),4);case 4:f=A.h;g=nd[b];if(!g)throw new P(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
|
|
558
|
+
vttOffset:0};l=nc(f);m=h.parseMedia(l,k,a);n=[];r={};q=t(m);for(u=q.next();!u.done;r={Tc:r.Tc},u=q.next())v=u.value,r.Tc=Eb([a],[v.payload])[0],x=new Fh(v.startTime,v.endTime,function(B){return function(){return[B.Tc]}}(r),0,null,null,0,0,Infinity),r.Tc.includes("#xywh")&&(z=r.Tc.split("#xywh=")[1].split(","),4===z.length&&x.ih({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],10)})),n.push(x);y={id:c.Xf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
559
|
+
segmentIndex:new Fj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.fd,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1};c.l==Xm?c.Bb.push(y):c.i.imageStreams.push(y);Sm(c);return A.return(je(y))}})};
|
|
558
560
|
p.uh=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=Im&&d.l!=Xm)throw new P(1,7,7004);if(c){k.F(2);break}return D(k,nn(d,a),3);case 3:c=k.h;case 2:return e=[],d.D&&(e=d.D.getCuePoints()),D(k,on(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Ig();h=g.find(function(l){return l.language==b});if(!h){k.F(5);break}return D(k,new Promise(function(l,m){d.m.ka(f,"load",l);d.m.ka(f,"error",function(){m(new P(1,2,2015))})}),6);case 6:return Sm(d),k.return(h);case 5:throw new P(1,
|
|
559
561
|
2,2012);}})};function nn(a,b){var c;return K(function(d){switch(d.g){case 1:return ta(d,2),D(d,Lk(b,a.J,a.h.streaming.retryParameters),4);case 4:c=d.h;va(d,3);break;case 2:wa(d);case 3:if(c)return d.return(c);throw new P(1,2,2011,b);}})}
|
|
560
562
|
function on(a,b,c,d,e,f,g){var h,k,l,m;return K(function(n){if(1==n.g)return"text/vtt"!=e||g.length?D(n,pn(a,b,a.J,a.h.streaming.retryParameters),3):n.F(2);2!=n.g&&(h=n.h,k=qn(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Gi(l),e="text/vtt");m=document.createElement("track");var r=a.T,q=b;try{if(r.g.enabled){var u=il(r);u.ot=ul;u.su=!0;var v=ll(u);var x=ml(q,v)}else x=q}catch(z){Va("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",z),x=q}m.src=x;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
|
|
561
563
|
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function pn(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){e=wf;f=qf([b],d);f.method="GET";var k=a.T;try{k.g.enabled&&nl(k,f,{ot:ul,su:!0})}catch(l){Va("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return D(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
562
564
|
function qn(a,b,c,d){var e=nd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=nc(b),b=c.parseMedia(b,a,null),fl(b,d);throw new P(2,2,2014,c);}p.eg=function(a,b){this.Uf.width=a;this.Uf.height=b};p.Wf=function(a){if(this.l==Im){var b=this.j;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.u)b=!1;else{for(var c=t(b.h.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.pd||d.Qa||d.xb||(d.pd=!1,ok(b,d,a));b=!0}}else b=!1;return b};
|
|
563
565
|
p.Yh=function(){Ua("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};p.Zh=function(){return this.se};
|
|
564
|
-
function Tl(a){var b=Jl();b.streaming.failureCallback=function(c){if(a.R()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Wf(d))}};b.textDisplayFactory=function(){return a.Vd?new Xk(a.g,a.Vd):HTMLMediaElement.prototype.addTextTrack?new Qk(a.g):new Tk};return b}p.ig=function(a){this.Vd=a};
|
|
566
|
+
function Tl(a){var b=Jl();b.streaming.failureCallback=function(c){if(a.R()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Wf(d))}};b.textDisplayFactory=function(){return a.Vd?new Xk(a.g,a.Vd):HTMLMediaElement.prototype.addTextTrack?new Qk(a.g,"Shaka Player TextTrack"):new Tk};return b}p.ig=function(a){this.Vd=a};
|
|
565
567
|
function xm(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 Jj,l=e.closedCaptions.get(g);h={id:a.Xf++,originalId:g,groupId:null,
|
|
566
568
|
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:Lb,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};b.textStreams.push(h);c.add(g)}}
|
|
567
569
|
function wm(a,b){return K(function(c){if(1==c.g)return D(c,rn(a,b),2);en(a,b);F(c)})}function rn(a,b){return K(function(c){if(1==c.g)return D(c,Td(a.s,b),2);if(!b.variants.some(pe))throw new P(2,4,4032);F(c)})}
|
|
@@ -570,7 +572,7 @@ function ym(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())i
|
|
|
570
572
|
function Om(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,r;return K(function(q){if(1==q.g)return k?D(q,k.createSegmentIndex(),2):q.return(null);n=(m=k.segmentIndex.ic(l))?m.next().value:null;if(!n)return q.return(null);r=n.startTime;return q.return(r)})},D(h,e(c,b),2);if(3!=h.g)return f=h.h,D(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)})}
|
|
571
573
|
function lm(a){var b=a.rd();if(a.C&&a.M&&a.G){if(a.T){var c=a.T;b||c.i||(c.i=!0);c.i&&b&&(c.l=!0);c.m=b}Dm(a)}b=(new Map).set("buffering",b);a.dispatchEvent(am("buffering",b))}function Em(a){var b=a.g.playbackRate;0!=b&&(a.K&&a.K.set(b),b=am("ratechange"),a.dispatchEvent(b))}
|
|
572
574
|
function Dm(a){if(a.C&&a.M){var b=a.C.g,c="playing";a.M.g==Ue?c="buffering":a.g.paused?c="paused":a.g.ended&&(c="ended");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(am("statechanged",c)))}}
|
|
573
|
-
function Um(a){if(a.R()){var b=a.
|
|
575
|
+
function Um(a){if(a.R()){var b=a.Fa();if(Number.isFinite(b.end)&&!(a.g.currentTime<b.start)){if(a.h.streaming.liveSync){var c=a.h.streaming.liveSyncMaxLatency;var d=a.h.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(c=a.i.serviceDescription.maxLatency||a.h.streaming.liveSyncMaxLatency,d=a.i.serviceDescription.maxPlaybackRate||a.h.streaming.liveSyncPlaybackRate);if(a.h.streaming.liveSync){var e=a.h.streaming.liveSyncMinLatency;var f=a.h.streaming.liveSyncMinPlaybackRate}else a.i&&
|
|
574
576
|
a.i.serviceDescription&&(e=a.i.serviceDescription.minLatency||a.h.streaming.liveSyncMinLatency,f=a.i.serviceDescription.minPlaybackRate||a.h.streaming.liveSyncMinPlaybackRate);var g=a.g.playbackRate,h=b.end-a.g.currentTime,k=0;if(a.l==Xm){var l=a.g.buffered;0<l.length&&(k=l.end(l.length-1),k=Math.max(d,k-b.end))}c&&d&&h-k>c?g!=d&&a.Gd(d):e&&f&&h-k<e?g!=f&&a.Gd(f):g!==a.K.ld()&&a.Ve()}}}
|
|
575
577
|
function Vm(a){if(a.g){var b=!1,c=a.g.currentTime/a.g.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.P)?(a.P=c,b=!0):(c=Math.max(a.P,c),a.P!=c&&(a.P=c,b=!0)));if(b){var d;0==a.P?d=am("started"):25==a.P?d=am("firstquartile"):50==a.P?d=am("midpoint"):75==a.P?d=am("thirdquartile"):100==a.P&&(d=am("complete"));d&&a.dispatchEvent(d)}}}function Tm(a){try{sn(a,a.i)}catch(c){return jm(a,c),!1}var b=qe(a.i.variants);b=a.za.create(b);a.u.setVariants(Array.from(b.values()));return!0}
|
|
576
578
|
function Km(a,b){b=void 0===b?!1:b;return Tm(a)?a.u.chooseVariant(b):null}
|
|
@@ -581,19 +583,19 @@ function un(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.L&&vi(a.L,c
|
|
|
581
583
|
p.Ze=function(a,b){if(!this.h.abr.enabled||this.l===bm||!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.ee.wa(1);b=this.Eb().video.reduce(function(f,g){return f+g.end-g.start},0);fn(this,!0,b,!0,!1);return!0}return!1};
|
|
582
584
|
function jm(a,b){if(a.l!=bm){2===b.severity&&Xl(a,!1);var c=am("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function vm(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(am(b,c))}
|
|
583
585
|
function im(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new P(2,3,3016,b,c,a.g.error.message)}
|
|
584
|
-
function Bm(a,b){if(a.j){var c=am("keystatuschanged");a.dispatchEvent(c);var d=Object.keys(b)
|
|
585
|
-
!!l&&!vn.includes(l)}h!=f.allowedByKeySystem&&(
|
|
586
|
+
function Bm(a,b){if(a.j){var c=am("keystatuschanged");a.dispatchEvent(c);var d=Object.keys(b);c=1==d.length&&"00"==d[0];var e=!1;if(d.length){d=t(a.i.variants);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=t(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[c?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&
|
|
587
|
+
!!l&&!vn.includes(l)}h!=f.allowedByKeySystem&&(e=!0)}}}if(e&&(Sm(a),!Tm(a)))return;(b=a.j.j)&&!b.allowedByKeySystem&&fn(a)}}function Cm(a,b,c){if(a.H&&a.H.onExpirationUpdated)a.H.onExpirationUpdated(b,c);b=am("expirationupdated");a.dispatchEvent(b)}function Fm(a,b,c){0<b&&(a.R()||a.jh(b));b=a.getDuration();c<b&&(a.R()||a.bb(c))}
|
|
586
588
|
function sn(a,b){a=a.s?a.s.Zd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=t(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?vn.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
587
589
|
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new P(2,4,4012,a);}function tn(a,b){K(function(c){if(1==c.g)return D(c,Promise.resolve(),2);a.l!=bm&&a.dispatchEvent(b);F(c)})}function ln(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Pb(c.language)):b.add("und");return b}
|
|
588
590
|
function kn(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Pb(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
|
|
589
591
|
h.push({language:l,role:m,label:n})}});return h}M("shaka.Player",V);V.prototype.setVideoContainer=V.prototype.ig;V.prototype.getManifestParserFactory=V.prototype.Zh;V.prototype.getManifest=V.prototype.Yh;V.prototype.retryStreaming=V.prototype.Wf;V.prototype.setMaxHardwareResolution=V.prototype.eg;V.prototype.addChaptersTrack=V.prototype.uh;V.prototype.addThumbnailsTrack=V.prototype.wh;V.prototype.addTextTrackAsync=V.prototype.vh;V.prototype.getStats=V.prototype.getStats;
|
|
590
592
|
V.prototype.getBufferedInfo=V.prototype.Eb;V.prototype.getPresentationStartTimeAsDate=V.prototype.Kg;V.prototype.getPlayheadTimeAsDate=V.prototype.bi;V.prototype.setTextTrackVisibility=V.prototype.hg;V.prototype.getChapters=V.prototype.vf;V.prototype.getChaptersTracks=V.prototype.Ig;V.prototype.isTextTrackVisible=V.prototype.pc;V.prototype.selectVariantsByLabel=V.prototype.Zi;V.prototype.selectTextLanguage=V.prototype.ah;V.prototype.selectAudioLanguage=V.prototype.Ae;
|
|
591
593
|
V.prototype.getTextLanguages=V.prototype.ei;V.prototype.getAudioLanguages=V.prototype.Ih;V.prototype.getTextLanguagesAndRoles=V.prototype.gi;V.prototype.getAudioLanguagesAndRoles=V.prototype.Jh;V.prototype.selectVariantTrack=V.prototype.Be;V.prototype.selectTextTrack=V.prototype.$f;V.prototype.getThumbnails=V.prototype.yf;V.prototype.getAllThumbnails=V.prototype.Hh;V.prototype.getImageTracks=V.prototype.Yd;V.prototype.getTextTracks=V.prototype.Xb;V.prototype.getVariantTracks=V.prototype.hb;
|
|
592
|
-
V.prototype.cancelTrickPlay=V.prototype.Ve;V.prototype.trickPlay=V.prototype.Gd;V.prototype.getPlaybackRate=V.prototype.Ub;V.prototype.isBuffering=V.prototype.rd;V.prototype.getKeyStatuses=V.prototype.Zd;V.prototype.getActiveSessionsMetadata=V.prototype.tf;V.prototype.getExpiration=V.prototype.md;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.goToLive=V.prototype.oi;V.prototype.seekRange=V.prototype.
|
|
594
|
+
V.prototype.cancelTrickPlay=V.prototype.Ve;V.prototype.trickPlay=V.prototype.Gd;V.prototype.getPlaybackRate=V.prototype.Ub;V.prototype.isBuffering=V.prototype.rd;V.prototype.getKeyStatuses=V.prototype.Zd;V.prototype.getActiveSessionsMetadata=V.prototype.tf;V.prototype.getExpiration=V.prototype.md;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.goToLive=V.prototype.oi;V.prototype.seekRange=V.prototype.Fa;V.prototype.isAudioOnly=V.prototype.Hc;
|
|
593
595
|
V.prototype.isInProgress=V.prototype.mc;V.prototype.isLive=V.prototype.R;V.prototype.getAdManager=V.prototype.Xd;V.prototype.getAssetUri=V.prototype.uf;V.prototype.getNetworkingEngine=V.prototype.Tb;V.prototype.getMediaElement=V.prototype.ai;V.prototype.getManifestType=V.prototype.wf;V.prototype.getLoadMode=V.prototype.$d;V.prototype.resetConfiguration=V.prototype.Ui;V.prototype.getBufferFullness=V.prototype.Kh;V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.configure=V.prototype.configure;
|
|
594
596
|
V.prototype.releaseAllMutexes=V.prototype.Qi;V.prototype.load=V.prototype.load;V.prototype.updateStartTime=V.prototype.hj;V.prototype.unload=V.prototype.Pc;V.prototype.detach=V.prototype.detach;V.prototype.attachCanvas=V.prototype.vg;V.prototype.attach=V.prototype.yc;
|
|
595
597
|
V.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?D(h,qh(),3):h.F(2);2!=h.g&&(b=h.h);var k={};if(yd())for(var l in yh)k[l]=!0;l=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=l.next();!m.done;m=l.next())m=m.value,k[m]=yd()?!!yh[m]:zd(m);c=k;l='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(w(ed));
|
|
596
|
-
k={};l=t(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=yd()?md(m)?!0:fc(m)||(Yc(m)?!0:!1):zd(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=wn;for(g in f)e[g]=f[g]();return h.return(e)})};V.isBrowserSupported=cm;V.setAdManagerFactory=function(a){Wl=a};V.registerSupportPlugin=function(a,b){wn[a]=b};V.prototype.destroy=V.prototype.destroy;var bm=0,Sl=1,Im=2,Xm=3;V.LoadMode={DESTROYED:bm,NOT_LOADED:Sl,MEDIA_SOURCE:Im,SRC_EQUALS:Xm};V.version="v4.6.
|
|
598
|
+
k={};l=t(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=yd()?md(m)?!0:fc(m)||(Yc(m)?!0:!1):zd(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=wn;for(g in f)e[g]=f[g]();return h.return(e)})};V.isBrowserSupported=cm;V.setAdManagerFactory=function(a){Wl=a};V.registerSupportPlugin=function(a,b){wn[a]=b};V.prototype.destroy=V.prototype.destroy;var bm=0,Sl=1,Im=2,Xm=3;V.LoadMode={DESTROYED:bm,NOT_LOADED:Sl,MEDIA_SOURCE:Im,SRC_EQUALS:Xm};V.version="v4.6.5";var xn=["4","6"];
|
|
597
599
|
Be=new function(a){this.g=a;this.i=Ce;this.h=De}(new ze(Number(xn[0]),Number(xn[1])));var vn=["output-restricted","internal-error"],wn={},Wl=null;function yn(){this.h=[];this.j=this.i=this.g=0};function zn(a,b,c){var d=this;this.g=a;this.h=b;this.m=c;this.i=!1;this.l=this.h.getVolume();this.j=new Af;this.j.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}p=zn.prototype;p.getDuration=function(){return this.g.getDuration()};p.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};p.getRemainingTime=function(){return this.h.getRemainingTime()};p.isPaused=function(){return this.i};
|
|
598
600
|
p.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.h.getAdSkippableState()};p.skip=function(){return this.h.skip()};p.pause=function(){return this.h.pause()};p.play=function(){return this.h.resume()};p.getVolume=function(){return this.h.getVolume()};p.setVolume=function(a){return this.h.setVolume(a)};p.isMuted=function(){return 0==this.h.getVolume()};
|
|
599
601
|
p.isLinear=function(){return this.g.isLinear()};p.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};p.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};
|
|
@@ -601,7 +603,7 @@ p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:
|
|
|
601
603
|
p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return this.g.getMediaUrl()};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};p.release=function(){this.h=this.g=null};M("shaka.ads.ClientSideAd",zn);zn.prototype.release=zn.prototype.release;zn.prototype.getPodIndex=zn.prototype.getPodIndex;zn.prototype.getTimeOffset=zn.prototype.getTimeOffset;
|
|
602
604
|
zn.prototype.getMediaUrl=zn.prototype.getMediaUrl;zn.prototype.getAdvertiserName=zn.prototype.getAdvertiserName;zn.prototype.getCreativeAdId=zn.prototype.getCreativeAdId;zn.prototype.getAdId=zn.prototype.getAdId;zn.prototype.getVastMediaWidth=zn.prototype.getVastMediaWidth;zn.prototype.getVastMediaHeight=zn.prototype.getVastMediaHeight;zn.prototype.getVastMediaBitrate=zn.prototype.getVastMediaBitrate;zn.prototype.getDescription=zn.prototype.getDescription;zn.prototype.getTitle=zn.prototype.getTitle;
|
|
603
605
|
zn.prototype.getPositionInSequence=zn.prototype.getPositionInSequence;zn.prototype.getSequenceLength=zn.prototype.getSequenceLength;zn.prototype.setMuted=zn.prototype.setMuted;zn.prototype.resize=zn.prototype.resize;zn.prototype.isLinear=zn.prototype.isLinear;zn.prototype.isMuted=zn.prototype.isMuted;zn.prototype.setVolume=zn.prototype.setVolume;zn.prototype.getVolume=zn.prototype.getVolume;zn.prototype.play=zn.prototype.play;zn.prototype.pause=zn.prototype.pause;zn.prototype.skip=zn.prototype.skip;
|
|
604
|
-
zn.prototype.canSkipNow=zn.prototype.canSkipNow;zn.prototype.getTimeUntilSkippable=zn.prototype.getTimeUntilSkippable;zn.prototype.isSkippable=zn.prototype.isSkippable;zn.prototype.isPaused=zn.prototype.isPaused;zn.prototype.getRemainingTime=zn.prototype.getRemainingTime;zn.prototype.getMinSuggestedDuration=zn.prototype.getMinSuggestedDuration;zn.prototype.getDuration=zn.prototype.getDuration;function An(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.D=!1;this.u=this.G=null;this.H=NaN;this.m=e;this.j=null;this.h=new Af;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.s,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.6.
|
|
606
|
+
zn.prototype.canSkipNow=zn.prototype.canSkipNow;zn.prototype.getTimeUntilSkippable=zn.prototype.getTimeUntilSkippable;zn.prototype.isSkippable=zn.prototype.isSkippable;zn.prototype.isPaused=zn.prototype.isPaused;zn.prototype.getRemainingTime=zn.prototype.getRemainingTime;zn.prototype.getMinSuggestedDuration=zn.prototype.getMinSuggestedDuration;zn.prototype.getDuration=zn.prototype.getDuration;function An(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.D=!1;this.u=this.G=null;this.H=NaN;this.m=e;this.j=null;this.h=new Af;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.s,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.6.5");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.o(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
|
|
605
607
|
function(g){Bn(f,g)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Cn(f,g)});this.h.o(this.i,"ended",function(){f.l.contentComplete()});this.h.ka(this.i,"play",function(){f.D=!0})}An.prototype.configure=function(a){this.G=a};An.prototype.stop=function(){this.g&&this.g.stop();this.s&&Wk(this.s)};An.prototype.release=function(){this.stop();this.u&&this.u.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};
|
|
606
608
|
function Cn(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new O("ad-error",b));Dn(a,null);a.m(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
607
609
|
function Bn(a,b){a.m(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));if(a.G.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.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume)})}else a.g=b.getAdsManager(a.i,a.C);a.m(new O("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
@@ -651,8 +653,8 @@ function Vn(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
|
|
|
651
653
|
p.release=function(){this.h&&(this.h.release(),this.h=null);this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);cb.prototype.release.call(this)};p.onAssetUnload=function(){this.h&&this.h.stop();this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new O("ad-stopped"));this.j=new yn};p.requestClientSideAds=function(a){if(!this.h)throw new P(1,10,10001);var b=this.h;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.H=Date.now()/1E3;b.l.requestAds(a)};
|
|
652
654
|
p.updateClientSideAdsRenderingSettings=function(a){if(!this.h)throw new P(1,10,10001);var b=this.h;b.C=a;b.g&&b.g.updateAdsRenderingSettings(b.C)};p.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new In(a,b,c,function(e){return Wn(d,e)})};p.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new P(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new P(1,10,10004)):(d.l=new $e,Ln(d,a,b),d.I=c||"",d.U=Date.now()/1E3,a=d.l);return a};
|
|
653
655
|
p.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new P(2,10,10002);this.g&&this.g.release();this.g=new Un(a,b,this.m,function(d){return Wn(c,d)});this.g.configure(this.l)};
|
|
654
|
-
p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(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.6.
|
|
655
|
-
(c.I=!0),c.j=new $e,c.g.requestStream(a),c.D=b||"",c.H=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(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.6.
|
|
656
|
+
p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(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.6.5";c=this.g;c.j?a=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
657
|
+
(c.I=!0),c.j=new $e,c.g.requestStream(a),c.D=b||"",c.H=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(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.6.5";this.g.g.replaceAdTagParameters(a)};
|
|
656
658
|
p.getServerSideCuePoints=function(){Ae("AdManager","Please use getCuePoints function.");return this.getCuePoints()};p.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};p.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};p.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
|
|
657
659
|
p.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};p.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};p.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
|
|
658
660
|
function Wn(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)}M("shaka.ads.AdManager",W);W.prototype.onCueMetadataChange=W.prototype.onCueMetadataChange;W.prototype.onHlsTimedMetadata=W.prototype.onHlsTimedMetadata;W.prototype.onDashTimedMetadata=W.prototype.onDashTimedMetadata;W.prototype.onManifestUpdated=W.prototype.onManifestUpdated;W.prototype.getStats=W.prototype.getStats;
|
|
@@ -666,7 +668,7 @@ function Zn(a){return{length:a.length,start:function(b){return a.start[b]},end:f
|
|
|
666
668
|
var $n="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),ao="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),bo=["loop","playbackRate"],co=["pause","play"],eo={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
667
669
|
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},fo={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},go={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},ho=[["getConfiguration","configure"]],io=[["isTextTrackVisible","setTextTrackVisibility"]],jo="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
668
670
|
ko=["attach","attachCanvas","detach","load","unload"];function lo(a,b,c,d,e,f,g){var h=this;this.I=a;this.M=g;this.j=new xd(b);this.P=c;this.C=!1;this.u=d;this.H=e;this.K=f;this.h=this.m=!1;this.L="";this.s=null;this.D=function(){return mo(h)};this.G=function(k,l){k=Yn(l);switch(k.type){case "event":var m=k.targetName,n=Qa(k.event);h.u(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var r in m[n])k[r]=m[n][r]}h.C&&(h.P(),h.C=!1);break;case "asyncComplete":if(n=k.id,r=k.error,k=h.i[n],delete h.i[n],k)if(r){n=new P(r.severity,r.category,
|
|
669
|
-
r.code);for(m in r)n[m]=r[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;no.add(this)}p=lo.prototype;p.destroy=function(){no.delete(this);oo(this);po&&qo(this);this.j&&(this.j.stop(),this.j=null);this.H=this.u=null;this.h=this.m=!1;this.G=this.D=this.l=this.i=this.g=this.s=null;return Promise.resolve()};p.
|
|
671
|
+
r.code);for(m in r)n[m]=r[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;no.add(this)}p=lo.prototype;p.destroy=function(){no.delete(this);oo(this);po&&qo(this);this.j&&(this.j.stop(),this.j=null);this.H=this.u=null;this.h=this.m=!1;this.G=this.D=this.l=this.i=this.g=this.s=null;return Promise.resolve()};p.Ea=function(){return this.h};p.ye=function(){return this.L};
|
|
670
672
|
p.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Ma();var a=new chrome.cast.SessionRequest(this.I,[],null,this.M,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(no),d=c.next();!d.done;d=c.next())ro(d.value,b)},function(b){for(var c=t(no),d=c.next();!d.done;d=c.next())d=d.value,so="available"==b,d.j.Ma()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});so&&this.j.S(to);(a=po)&&a.status!=chrome.cast.SessionStatus.STOPPED?
|
|
671
673
|
ro(this,a):po=null}else window.__onGCastApiAvailable!==uo&&(vo=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=uo)};p.ag=function(a){this.s=a;this.h&&wo(this,{type:"appData",appData:this.s})};p.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new P(1,8,8E3);if(!so)throw new P(1,8,8001);if(b.h)throw new P(1,8,8002);b.l=new $e;chrome.cast.requestSession(function(d){return xo(b,a,d)},function(d){return yo(b,d)});return D(c,b.l,0)})};
|
|
672
674
|
function zo(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return xo(a,b,c)},function(c){return yo(a,c)})}}p.Bc=function(){if(this.h){oo(this);if(po){qo(this);try{po.stop(function(){},function(){})}catch(a){}po=null}mo(this)}};
|
|
@@ -675,20 +677,20 @@ p.set=function(a,b,c){this.g[a][b]=c;wo(this,{type:"set",targetName:a,property:b
|
|
|
675
677
|
p.Zg=function(a,b){wo(this,{type:"call",targetName:a,methodName:b,args:Ga.apply(2,arguments)})};p.Ri=function(a,b){var c=Ga.apply(2,arguments),d=new $e,e=this.J.toString();this.J++;this.i[e]=d;try{wo(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function ro(a,b){var c=a.K();a.l=new $e;a.C=!0;xo(a,c,b)}function qo(a){var b=po;b.removeUpdateListener(a.D);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
|
|
676
678
|
function mo(a){var b=po?"connected"==po.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};oo(a)}a.h=b;a.L=b?po.receiver.friendlyName:"";a.j.Ma()}function oo(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new P(1,7,7E3))}}function wo(a,b){b=Xn(b);var c=po;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Ya)}catch(d){throw b=new P(2,8,8005,d),c=new O("error",(new Map).set("detail",b)),a.u("player",c),a.Bc(),b;}}var to=.02,so=!1,po=null,vo=null,no=new Set;
|
|
677
679
|
function uo(a){vo?window.__onGCastApiAvailable=vo:delete window.__onGCastApiAvailable;vo=null;if(a)for(var b=t(no),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Ao(a,b,c,d){d=void 0===d?!1:d;cb.call(this);var e=this;this.i=a;this.h=b;this.m=this.s=this.j=this.u=this.l=null;this.G=c;this.D=d;this.C=new Map;this.g=new lo(c,function(){return Bo(e)},function(){return Co(e)},function(f,g){return Do(e,f,g)},function(){return Eo(e)},function(){return Fo(e)},d);Go(this)}pa(Ao,cb);p=Ao.prototype;
|
|
678
|
-
p.destroy=function(a){a&&this.g.Bc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.u=this.l=this.i=null;cb.prototype.release.call(this);return Promise.all(a)};p.Yb=function(){return this.l};p.Dc=function(){return this.u};p.Ue=function(){return this.g.m&&so};p.
|
|
680
|
+
p.destroy=function(a){a&&this.g.Bc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.u=this.l=this.i=null;cb.prototype.release.call(this);return Promise.all(a)};p.Yb=function(){return this.l};p.Dc=function(){return this.u};p.Ue=function(){return this.g.m&&so};p.Ea=function(){return this.g.Ea()};p.ye=function(){return this.g.ye()};
|
|
679
681
|
p.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=Fo(a),D(c,a.g.cast(b),2)):a.h?D(c,a.h.Pc(),0):c.return()})};p.ag=function(a){this.g.ag(a)};p.lh=function(){zo(this.g)};p.Bc=function(){this.g.Bc()};
|
|
680
682
|
p.zg=function(a,b){b=void 0===b?!1:b;var c=this;return K(function(d){if(1==d.g){if(a==c.G&&b==c.D)return d.return();c.G=a;c.D=b;c.g.Bc();return D(d,c.g.destroy(),2)}c.g=null;c.g=new lo(a,function(){return Bo(c)},function(){return Co(c)},function(e,f){return Do(c,e,f)},function(){return Eo(c)},function(){return Fo(c)},b);c.g.init();F(d)})};
|
|
681
|
-
function Go(a){a.g.init();a.m=new Af;for(var b=t($n),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.
|
|
683
|
+
function Go(a){a.g.init();a.m=new Af;for(var b=t($n),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.Ea()||(f=Qa(f),a.j.dispatchEvent(f))});for(var d in Ra)a.m.o(a.h,Ra[d],function(f){a.g.Ea()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Uc=e,Object.defineProperty(a.l,b.Uc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Ho(a,f.Uc)}}(b),set:function(f){return function(g){var h=f.Uc;a.g.Ea()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Uc:b.Uc};a.u={};Io(a,
|
|
682
684
|
function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return Jo(a,f)}})});Ko(a);a.j=new cb;a.j.ge=a.l;a.s=new cb;a.s.ge=a.u}function Ko(a){var b=new Map;Io(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.C.set(c,d):a.C.set(d,c)):b.set(d,c)})}
|
|
683
685
|
function Io(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
|
|
684
686
|
function Fo(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.uf(),startTime:null};a.i.pause();for(var c=t(bo),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(ho);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(io);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function Bo(a){var b=new O("caststatuschanged");a.dispatchEvent(b)}
|
|
685
687
|
function Co(a){var b=new O(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
686
688
|
function Eo(a){for(var b=t(ho),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=t(bo);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=t(bo),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(io);for(k=
|
|
687
689
|
h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new O("error",h);a.h.dispatchEvent(h)})}
|
|
688
|
-
function Ho(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.
|
|
690
|
+
function Ho(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.Ea()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Ea()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
689
691
|
function Jo(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Tb()};if("getDrmEngine"==b)return function(){return a.h.s};if("getAdManager"==b)return function(){return a.h.Xd()};
|
|
690
|
-
if("setVideoContainer"==b)return function(c){return a.h.ig(c)};if(a.g.
|
|
691
|
-
function Do(a,b,c){a.g.
|
|
692
|
+
if("setVideoContainer"==b)return function(c){return a.h.ig(c)};if(a.g.Ea()){if("getManifest"==b||"drmInfo"==b)return function(){Ua(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ua(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Ea()&&0==Object.keys(a.g.g.video).length&&(eo[b]||fo[b])||!a.g.Ea()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
693
|
+
function Do(a,b,c){a.g.Ea()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}M("shaka.cast.CastProxy",Ao);Ao.prototype.changeReceiverId=Ao.prototype.zg;Ao.prototype.forceDisconnect=Ao.prototype.Bc;Ao.prototype.suggestDisconnect=Ao.prototype.lh;Ao.prototype.setAppData=Ao.prototype.ag;Ao.prototype.cast=Ao.prototype.cast;Ao.prototype.receiverName=Ao.prototype.ye;Ao.prototype.isCasting=Ao.prototype.Ea;Ao.prototype.canCast=Ao.prototype.Ue;Ao.prototype.getPlayer=Ao.prototype.Dc;
|
|
692
694
|
Ao.prototype.getVideo=Ao.prototype.Yb;Ao.prototype.destroy=Ao.prototype.destroy;function Lo(a,b,c,d){cb.call(this);var e=this;this.g=a;this.h=b;this.j=new Af;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.s=!0;this.m=0;this.D=!1;this.C=!0;this.u=this.l=null;this.I=new xd(function(){Mo(e)});No(this)}pa(Lo,cb);p=Lo.prototype;p.isConnected=function(){return this.H};p.ti=function(){return this.s};p.bj=function(a){this.i=a};p.Dh=function(){this.i=null};
|
|
693
695
|
p.cj=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};p.aj=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};p.$i=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
694
696
|
p.destroy=function(){var a=this,b,c;return K(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.I&&(a.I.stop(),a.I=null),a.g=null,a.J=null,a.G=null,a.H=!1,a.s=!0,a.l=null,a.u=null,cb.prototype.release.call(a),D(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();F(d)})};
|
|
@@ -705,15 +707,15 @@ function Ro(a,b){var c=Yn(b.data);switch(c.type){case "init":a.m=0;a.D=!1;a.C=!0
|
|
|
705
707
|
function Qo(a,b){var c=Yn(b.data);switch(c.type){case "PLAY":a.g.play();Wo(a);break;case "PAUSE":a.g.pause();Wo(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Wo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Wo(a));break;case "STOP":a.h.Pc().then(function(){a.h&&Wo(a)});break;case "GET_STATUS":Zo(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
|
|
706
708
|
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Wo(a);break;case "LOAD":a.m=0;a.D=!1;a.C=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Zo(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Po(a,{requestId:Number(c.requestId),type:h},a.u)});break;default:Po(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
|
|
707
709
|
function $o(a,b,c,d){a.h&&Po(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Po(a,b,c,d){a.H&&(a=Xn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Wo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?ap:a.h.rd()?bp:a.g.paused?cp:dp,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Po(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
|
|
708
|
-
M("shaka.cast.CastReceiver",Lo);Lo.prototype.destroy=Lo.prototype.destroy;Lo.prototype.setContentArtist=Lo.prototype.$i;Lo.prototype.setContentImage=Lo.prototype.aj;Lo.prototype.setContentTitle=Lo.prototype.cj;Lo.prototype.clearContentMetadata=Lo.prototype.Dh;Lo.prototype.setContentMetadata=Lo.prototype.bj;Lo.prototype.isIdle=Lo.prototype.ti;Lo.prototype.isConnected=Lo.prototype.isConnected;var Yo=.5,Uo=5,ap="IDLE",dp="PLAYING",bp="BUFFERING",cp="PAUSED";function ep(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(
|
|
709
|
-
q||-1===u)r=gp(d,e),a.nestedCues.push(r);else{for(;q<=u;q++)if(v=r[q]){var x=v.l,z=v.i,y=v.j,
|
|
710
|
+
M("shaka.cast.CastReceiver",Lo);Lo.prototype.destroy=Lo.prototype.destroy;Lo.prototype.setContentArtist=Lo.prototype.$i;Lo.prototype.setContentImage=Lo.prototype.aj;Lo.prototype.setContentTitle=Lo.prototype.cj;Lo.prototype.clearContentMetadata=Lo.prototype.Dh;Lo.prototype.setContentMetadata=Lo.prototype.bj;Lo.prototype.isIdle=Lo.prototype.ti;Lo.prototype.isConnected=Lo.prototype.isConnected;var Yo=.5,Uo=5,ap="IDLE",dp="PLAYING",bp="BUFFERING",cp="PAUSED";function ep(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=fp(d,e,h,k,l,m);f<=g;f++){for(var r=c[f],q=-1,u=-1,v=0;v<r.length;v++)if(null!=r[v]&&""!==r[v].g.trim()){q=v;break}for(v=r.length-1;0<=v;v--)if(null!=r[v]&&""!==r[v].g.trim()){u=v;break}if(-1===
|
|
711
|
+
q||-1===u)r=gp(d,e),a.nestedCues.push(r);else{for(;q<=u;q++)if(v=r[q]){var x=v.l,z=v.i,y=v.j,A=v.h;if(x!=h||z!=k||y!=l||A!=m)n.payload&&a.nestedCues.push(n),n=fp(d,e,x,z,y,A),h=x,k=z,l=y,m=A;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=gp(d,e),a.nestedCues.push(n));n=fp(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
710
712
|
function fp(a,b,c,d,e,f){a=new Ac(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function gp(a,b){a=new Ac(a,b,"");a.lineBreak=!0;return a}function hp(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function ip(a,b){this.i=[];this.g=1;this.h=0;this.C=a;this.u=b;this.j=this.m=!1;this.l="white";this.s="black";jp(this)}function kp(a,b,c){var d="CC"+(a.C<<1|a.u+1),e=new Ac(b,c,"");e.lineInterpretation=1;var f=lp.get(a.g);f&&(e.line=f);return ep(e,d,a.i,b,c)}function jp(a){mp(a,0,15);a.g=1}
|
|
711
713
|
function np(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case op:d=pp.has(c)?pp.get(c):String.fromCharCode(c);break;case qp:d=rp.get(c);break;case sp:a.i[a.g].pop();d=tp.get(c);break;case up:a.i[a.g].pop(),d=vp.get(c)}d&&a.i[a.g].push(new hp(d,a.m,a.j,a.s,a.l))}}function wp(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function mp(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
712
714
|
var op=0,qp=1,sp=2,up=3,pp=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),rp=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),tp=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
|
|
713
715
|
[35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),vp=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
|
|
714
716
|
[39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),lp=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function xp(a,b){this.h=yp;this.s=new ip(a,b);this.i=new ip(a,b);this.g=this.j=new ip(a,b);this.l=0;this.m=null}function zp(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==Ap&&a.h!==Bp&&(e=kp(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,mp(c,0,15),c=a.j,c.g=0<c.h?c.h:0,mp(c,0,15),d.g=15);a.h=Ap;d.h=b;return e}function Cp(a){a.h=Dp;a.g=a.j;a.g.h=0}function Ep(a){Va("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.s;a.h=Bp}
|
|
715
717
|
var yp=0,Dp=1,Ap=3,Bp=4,Fp="black green blue cyan red yellow magenta black".split(" "),Gp="white green blue cyan red yellow magenta white_italics".split(" ");function Hp(){this.l=!1;this.D=this.H=0;this.G=Ip;this.i=[];this.g=this.h=this.j=0;this.C=this.s=!1;this.u="white";this.m="black";Jp(this)}function Jp(a){a.i=[];for(var b=0;16>b;b++)a.i.push(Kp())}function Kp(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Lp(a,b){Mp(a)&&(a.i[a.h][a.g]=new hp(b,a.C,a.s,a.m,a.u),a.g++)}function Mp(a){var b=a.g<a.D&&0<=a.g;return a.h<a.H&&0<=a.h&&b}Hp.prototype.isVisible=function(){return this.l};
|
|
716
|
-
function Np(a,b,c){var d=new Ac(a.j,b,"");d.textAlign=a.G===Op?"left":a.G===Pp?"right":Dc;if(c=ep(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Op=0,Pp=1,Ip=2;function Qp(){this.i=[];this.h=null;this.g=0}function Rp(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Sp(a.h)),a.h=null,a.g=0))}function Sp(a){this.g=0;this.h=a}Sp.prototype.ua=function(){return this.g<this.h.length};Sp.prototype.
|
|
718
|
+
function Np(a,b,c){var d=new Ac(a.j,b,"");d.textAlign=a.G===Op?"left":a.G===Pp?"right":Dc;if(c=ep(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Op=0,Pp=1,Ip=2;function Qp(){this.i=[];this.h=null;this.g=0}function Rp(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Sp(a.h)),a.h=null,a.g=0))}function Sp(a){this.g=0;this.h=a}Sp.prototype.ua=function(){return this.g<this.h.length};Sp.prototype.Da=function(){return this.g};function Tp(a){if(!a.ua())throw new P(2,2,3E3);return a.h[a.g++]}Sp.prototype.skip=function(a){if(this.g+a>this.h.length)throw new P(2,2,3E3);this.g+=a};function Up(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
717
719
|
function Vp(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=Tp(b).value;b=null;c=t(Wp(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Np(e,d,a.i)),Jp(e);return b}if(137===c)for(b=Tp(b).value,b=t(Wp(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=Tp(b).value;b=null;c=t(Wp(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Np(e,d,a.i)),e.l=!1;return b}if(139===c){c=Tp(b).value;
|
|
718
720
|
b=null;c=t(Wp(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Np(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Tp(b).value,Xp(a,b,d);if(143===c)return d=Xp(a,255,d),Yp(a),d;if(144===c)b.skip(1),d=Tp(b).value,a.g&&(a.g.s=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=Tp(b).value,c=Tp(b).value,b.skip(1),a.g&&(b=Zp((c&48)>>4,(c&12)>>2,c&3),a.g.u=Zp((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=Tp(b).value,b=Tp(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
719
721
|
b.skip(1),d=Tp(b).value,b.skip(1),a.g&&(a.g.G=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Hp;f.j=d;a.h[c]=f}d=Tp(b).value;Tp(b);Tp(b);f=Tp(b).value;var g=Tp(b).value;b=Tp(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.s=!1,b.u="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.H=(f&15)+1;b.D=(g&63)+1;a.g=a.h[c]}}}return null}function Wp(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
|
|
@@ -726,7 +728,7 @@ function dq(a,b){var c=b.type;if(16===(b.fb&112)){var d=b.fb>>3&1;0===c?a.s=d:a.
|
|
|
726
728
|
7===e&&(f=!0);a=1===(a&1);c.h!==Bp&&(e=c.g,c.h===Ap&&b!==e.g&&(c=1+b-e.h,wp(e,c,1+e.g-e.h,e.h),mp(e,0,c-1),mp(e,b+1,15-b)),e.g=b,e.m=a,e.j=f,e.l=d,e.s="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",np(c.g,op,32),d=!1,b=Gp[(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=Fp[(a&14)>>1]),c.g.s=b;else if(17===(d&247)&&48===(a&240))np(c.g,qp,a);else if(18===
|
|
727
729
|
(d&246)&&32===(a&224))np(c.g,d&1?up:sp,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.Cb){case 32:Cp(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=zp(c,2,a);break;case 38:d=zp(c,3,a);break;case 39:d=zp(c,4,a);break;case 40:np(c.g,op,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:jp(c.s);Ep(c);break;case 43:Ep(c);break;case 44:b=c.i;d=null;c.h!==Bp&&(d=kp(b,c.l,a));mp(b,0,15);break;case 45:b=c.g;c.h!==Ap?d=null:(d=kp(b,c.l,a),f=b.g-b.h+1,wp(b,f-1,f,b.h),mp(b,0,
|
|
728
730
|
f-1),mp(b,b.g,15-b.g),c.l=a);break;case 46:mp(c.j,0,15);break;case 47:b=null,c.h!==Bp&&(b=kp(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Cp(c),c.l=a,d=b}a=d;break a}a=null}else d=b.Cb,np(c.g,op,b.fb),np(c.g,op,d);return a}
|
|
729
|
-
function eq(a,b){var c=[];try{for(;b.ua();){var d=Tp(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Tp(b).value&63);if(0!=e){a.C.add("svc"+e);a.j.has(e)||a.j.set(e,new Up(e));for(var g=a.j.get(e),h=b.
|
|
731
|
+
function eq(a,b){var c=[];try{for(;b.ua();){var d=Tp(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Tp(b).value&63);if(0!=e){a.C.add("svc"+e);a.j.has(e)||a.j.set(e,new Up(e));for(var g=a.j.get(e),h=b.Da();b.Da()-h<f;){e=b;var k=Tp(e),l=k.value,m=k.pts;if(16===l){var n=Tp(e);l=l<<16|n.value}if(0<=l&&31>=l){var r=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!Mp(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.D-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=Np(q,r,g.i));if(q.h+1>=q.H){r=q;for(var u=
|
|
730
732
|
0,v=1;16>v;v++,u++)r.i[u]=r.i[v];for(v=0;1>v;v++,u++)r.i[u]=Kp()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=Np(q,r,g.i));q.i[q.h]=Kp();q.g=0;break;case 12:q.isVisible()&&(e=Np(q,r,g.i)),Jp(q),r=q,r.h=0,r.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=Vp(g,e,l,m);else{if(4096<=l&&4127>=l)r=l&255,8<=r&&15>=r?e.skip(1):16<=r&&23>=r?e.skip(2):24<=r&&31>=r&&e.skip(3);else if(4224<=l&&4255>=l)r=l&255,128<=r&&135>=r?e.skip(4):136<=r&&143>=r&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Lp(g.g,
|
|
731
733
|
"\u266a"):Lp(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Lp(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(aq.has(e)){var z=aq.get(e);Lp(g.g,z)}else Lp(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Lp(g.g,"_"):Lp(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(y){if(y instanceof P&&3E3===y.code)Va("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw y;}return c}function fq(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
|
|
732
734
|
bq.prototype.getStreams=function(){return Array.from(this.C)};M("shaka.cea.CeaDecoder",bq);vc=function(){return new bq};function gq(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(w(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function hq(){this.j=new Map;this.i=this.h=0;this.g=iq}
|
|
@@ -750,28 +752,28 @@ var wq=1,xq=(new Map).set("com.widevine.alpha",function(a){var b=og(a.node,"http
|
|
|
750
752
|
b.textContent:(a=og(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function zq(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&Ua("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
|
|
751
753
|
break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
|
|
752
754
|
function Aq(a,b){var c=Bq(a,b,"timescale"),d=1;c&&(d=Ag(c)||1);var e=Bq(a,b,"duration");c=Ag(e||"");"image"==a.O.contentType&&(c=Cg(e||""));c&&(c/=d);var f=Bq(a,b,"startNumber");e=Number(Bq(a,b,"presentationTimeOffset"))||0;var g=Bg(f||"");if(null==f||null==g)g=1;var h=Cq(a,b,"SegmentTimeline");b=null;if(h){b=d;a=a.ia.duration||Infinity;f=g;h=ng(h,"S");for(var k=[],l=-e,m=0;m<h.length;++m){var n=h[m],r=h[m+1],q=vg(n,"t",Bg),u=vg(n,"d",Bg),v=vg(n,"r",zg);n=vg(n,"k",zg)||0;null!=q&&(q-=e);if(!u)break;
|
|
753
|
-
q=null!=q?q:l;v=v||0;if(0>v)if(r){r=vg(r,"t",Bg);if(null==r)break;else if(q>=r)break;v=Math.ceil((r-q)/u)-1}else{if(Infinity==a)break;else if(q/b>=a)break;v=Math.ceil((a*b-q)/u)-1}0<k.length&&q!=l&&(k[k.length-1].end=q/b);for(r=0;r<=v;++r)l=q+u,k.push({start:q/b,end:l/b,qg:q,ub:n,Yi:k.length+f}),q=l}b=k}return{timescale:d,La:c,Fd:g,Lb:e/d||0,pg:e,timeline:b}}function Dq(a,b){return[b(a.O),b(a.
|
|
755
|
+
q=null!=q?q:l;v=v||0;if(0>v)if(r){r=vg(r,"t",Bg);if(null==r)break;else if(q>=r)break;v=Math.ceil((r-q)/u)-1}else{if(Infinity==a)break;else if(q/b>=a)break;v=Math.ceil((a*b-q)/u)-1}0<k.length&&q!=l&&(k[k.length-1].end=q/b);for(r=0;r<=v;++r)l=q+u,k.push({start:q/b,end:l/b,qg:q,ub:n,Yi:k.length+f}),q=l}b=k}return{timescale:d,La:c,Fd:g,Lb:e/d||0,pg:e,timeline:b}}function Dq(a,b){return[b(a.O),b(a.Ba),b(a.Ha)].filter(vd)}
|
|
754
756
|
function Bq(a,b,c){b=Dq(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.getAttribute(c));d=b.next());return a}function Cq(a,b,c){b=Dq(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=mg(d.value,c));d=b.next());return a}
|
|
755
|
-
function Eq(a,b,c,d,e,f){for(var g=rg(a,"http://www.w3.org/1999/xlink","href"),h=rg(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return bf(new P(2,4,4028));if("onLoad"!=h)return bf(new P(2,4,4027));var m=Eb([d],[g]);return e.request(0,qf(m,b)).
|
|
757
|
+
function Eq(a,b,c,d,e,f){for(var g=rg(a,"http://www.w3.org/1999/xlink","href"),h=rg(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return bf(new P(2,4,4028));if("onLoad"!=h)return bf(new P(2,4,4027));var m=Eb([d],[g]);return e.request(0,qf(m,b)).Ca(function(n){n=Hg(n.data,a.tagName);if(!n)return bf(new P(2,4,4001,g));
|
|
756
758
|
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var r=n.childNodes[0];n.removeChild(r);a.appendChild(r)}n=t(Array.from(n.attributes));for(r=n.next();!r.done;r=n.next())a.setAttributeNode(r.value.cloneNode(!1));return Fq(a,b,c,m[0],e,f+1)})}
|
|
757
|
-
function Fq(a,b,c,d,e,f){f=void 0===f?0:f;if(rg(a,"http://www.w3.org/1999/xlink","href")){var g=Eq(a,b,c,d,e,f);c&&(g=g.
|
|
759
|
+
function Fq(a,b,c,d,e,f){f=void 0===f?0:f;if(rg(a,"http://www.w3.org/1999/xlink","href")){var g=Eq(a,b,c,d,e,f);c&&(g=g.Ca(void 0,function(){return Fq(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==rg(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Fq(k,b,c,d,e,f)));return ff(g).Ca(function(){return a})};function Gq(a,b,c,d,e,f,g){var h,k=(new Tf).V("sidx",function(l){h=Hq(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new P(2,3,3004);}
|
|
758
760
|
function Hq(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.N();if(0==k)throw new P(2,3,3005);if(0==g.version){var l=g.reader.N();var m=g.reader.N()}else l=g.reader.Nc(),m=g.reader.Nc();g.reader.skip(2);var n=g.reader.Ra();a=a+g.size+m;for(m=0;m<n;m++){var r=g.reader.N(),q=(r&2147483648)>>>31;r&=2147483647;var u=g.reader.N();g.reader.skip(4);if(1==q)throw new P(2,3,3006);h.push(new Fh(l/k+c,(l+u)/k+c,function(){return f},a,a+r-1,b,c,d,e));l+=u;a+=r}g.parser.stop();return h};function Iq(a){this.h=rc(a);this.g=new Qf(this.h,0)}Iq.prototype.ua=function(){return this.g.ua()};
|
|
759
|
-
function Jq(a){var b=Kq(a);if(7<b.length)throw new P(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Kq(a);a:{d=t(Lq);for(var e=d.next();!e.done;e=d.next())if(lc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.
|
|
760
|
-
d)}function Kq(a){var b=a.g.
|
|
761
|
+
function Jq(a){var b=Kq(a);if(7<b.length)throw new P(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Kq(a);a:{d=t(Lq);for(var e=d.next();!e.done;e=d.next())if(lc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Da();else{if(8==b.length&&b[1]&224)throw new P(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.Da()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Da();d=rc(a.h,a.g.Da(),b);a.g.skip(b);return new Mq(c,
|
|
762
|
+
d)}function Kq(a){var b=a.g.Da(),c=a.g.oa();if(0==c)throw new P(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return nc(a.h,b,c)}var Lq=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function Mq(a,b){this.id=a;this.g=b}
|
|
761
763
|
function Nq(a){if(8<a.g.byteLength)throw new P(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new P(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Oq(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Iq(a.g);for(var n=null,r=null;a.ua();){var q=Jq(a);if(187==q.id){var u=Pq(q);u&&(q=c*u.gj,u=b+u.Pi,null!=n&&m.push(new Fh(n+g,q+g,l,r,u-1,f,g,h,k)),n=q,r=u)}}null!=n&&m.push(new Fh(n+g,d+g,l,r,null,f,g,h,k));return m}
|
|
762
764
|
function Pq(a){var b=new Iq(a.g);a=Jq(b);if(179!=a.id)throw new P(2,3,3013);a=Nq(a);b=Jq(b);if(183!=b.id)throw new P(2,3,3012);b=new Iq(b.g);for(var c=0;b.ua();){var d=Jq(b);if(241==d.id){c=Nq(d);break}}return{gj:a,Pi:c}};function Qq(a,b,c){b=Cq(a,b,"Initialization");if(!b)return null;var d=a.O.sb(),e=b.getAttribute("sourceURL");e&&(d=Eb(d,[e]));e=0;var f=null;if(b=vg(b,"range",yg))e=b.start,f=b.end;return new Dh(function(){return d},e,f,Rq(a),null,null,c)}
|
|
763
765
|
function Sq(a,b,c){var d=Number(Bq(a,Tq,"presentationTimeOffset"))||0,e=Bq(a,Tq,"timescale"),f=1;e&&(f=Ag(e)||1);var g=d/f||0,h=Qq(a,Tq,c);Uq(a,h);var k=jf(a);return{Cc:function(){var l=Cq(k,Tq,"RepresentationIndex");var m=k.O.sb();l&&(l=l.getAttribute("sourceURL"))&&(m=Eb(m,[l]));l=Vq(k);return Wq(k,b,h,m,l.start,l.end,g)}}}
|
|
764
|
-
function Wq(a,b,c,d,e,f,g){var h,k,l,m,n,r,q,u,v,x,z,y,
|
|
765
|
-
H=G.g.byteOffset;G=new Iq(G.g);for(var I=null;G.ua();){var J=Jq(G);if(357149030==J.id){I=J;break}}if(!I)throw new P(2,3,3010);I=new Iq(I.g);J=1E6;for(G=null;I.ua();){var L=Jq(I);if(2807729==L.id)J=Nq(L);else if(17545==L.id)if(4==L.g.byteLength)G=L.g.getFloat32(0);else if(8==L.g.byteLength)G=L.g.getFloat64(0);else throw new P(2,3,3003);}if(null==G)throw new P(2,3,3011);I=J/1E9;G*=I;J=Jq(new Iq(x));if(475249515!=J.id)throw new P(2,3,3007);H=Oq(J,H,I,G,d,c,
|
|
766
|
+
function Wq(a,b,c,d,e,f,g){var h,k,l,m,n,r,q,u,v,x,z,y,A,B,C;return K(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.Rb||!a.ia.Af,l=a.ia.start,m=a.ia.duration,n=a.O.mimeType.split("/")[1],r=b,q=null,u=[r(d,e,f,!1),"webm"==n?r(c.aa(),c.cb,c.Ja,!0):null],r=null,D(E,Promise.all(u),2);v=E.h;x=v[0];z=v[1]||null;y=null;A=l-g;B=l;C=m?l+m:Infinity;if("mp4"==n)var H=Gq(x,e,d,c,A,B,C);else{H=new Iq(z);if(440786851!=Jq(H).id)throw new P(2,3,3008);var G=Jq(H);if(408125543!=G.id)throw new P(2,3,3009);
|
|
767
|
+
H=G.g.byteOffset;G=new Iq(G.g);for(var I=null;G.ua();){var J=Jq(G);if(357149030==J.id){I=J;break}}if(!I)throw new P(2,3,3010);I=new Iq(I.g);J=1E6;for(G=null;I.ua();){var L=Jq(I);if(2807729==L.id)J=Nq(L);else if(17545==L.id)if(4==L.g.byteLength)G=L.g.getFloat32(0);else if(8==L.g.byteLength)G=L.g.getFloat64(0);else throw new P(2,3,3003);}if(null==G)throw new P(2,3,3011);I=J/1E9;G*=I;J=Jq(new Iq(x));if(475249515!=J.id)throw new P(2,3,3007);H=Oq(J,H,I,G,d,c,A,B,C)}y=H;h.vd(y);q=new Fj(y);k&&q.Ac(B,C,
|
|
766
768
|
!0);return E.return(q)})}function Tq(a){return a.Dd}function Vq(a){var b=Cq(a,Tq,"RepresentationIndex");a=Bq(a,Tq,"indexRange");a=yg(a||"");b&&(a=vg(b,"range",yg,a));return a}function Uq(a,b){Xq(a,b);if(!Vq(a))throw new P(2,4,4002);}function Xq(a,b){var c=a.O.mimeType.split("/")[1];if(a.O.contentType!=Lb&&"mp4"!=c&&"webm"!=c)throw new P(2,4,4006);if("webm"==c&&!b)throw new P(2,4,4005);}
|
|
767
769
|
function Rq(a){var b=a.O;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.ve,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Yq(a,b,c){var d=Qq(a,Zq,c),e=$q(a);if(!e.La&&!e.timeline&&1<e.Kc.length)throw new P(2,4,4002);if(!e.La&&!a.ia.duration&&!e.timeline&&1==e.Kc.length)throw new P(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new P(2,4,4002);var f=null,g=null;a.Ha.id&&a.O.id&&(g=b[a.Ha.id+","+a.O.id])&&(f=g.segmentIndex);var h=ar(a.ia.start,a.ia.duration,a.O.sb,e,d,c);b=!f;f?f.ud(h,a.presentationTimeline.Gb()):f=new Fj(h);a.presentationTimeline.vd(h);a.Rb&&a.ia.Af||f.Ac(a.ia.start,a.ia.duration?a.ia.start+
|
|
768
770
|
a.ia.duration:Infinity,b);g&&(g.segmentIndex=f);return{Cc:function(){f&&0!=f.jc()||f.qe(h);return Promise.resolve(f)}}}function Zq(a){return a.ac}function $q(a){var b=br(a);a=Aq(a,Zq);var c=a.Fd;0==c&&(c=1);var d=0;a.La?d=a.La*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{La:a.La,startTime:d,Fd:c,Lb:a.Lb,timeline:a.timeline,Kc:b}}
|
|
769
771
|
function ar(a,b,c,d,e,f){var g=d.Kc.length;d.timeline&&d.timeline.length!=d.Kc.length&&(g=Math.min(d.timeline.length,d.Kc.length));for(var h=a-d.Lb,k=b?a+b:Infinity,l=[],m=d.startTime,n={},r=0;r<g;n={cd:n.cd,Zc:n.Zc},r++){n.Zc=d.Kc[r];var q=void 0;q=null!=d.La?m+d.La:d.timeline?d.timeline[r].end:m+b;n.cd=null;l.push(new Fh(a+m,a+q,function(u){return function(){null==u.cd&&(u.cd=Eb(c(),[u.Zc.Hi]));return u.cd}}(n),n.Zc.start,n.Zc.end,e,h,a,k,[],"",null,null,Gh,f));m=q}return l}
|
|
770
|
-
function br(a){return[a.O.ac,a.
|
|
771
|
-
Infinity,q=!(a.Rb&&a.ia.Af);m?(c=m,hr(c,k,n,r,q,h),c.rb(a.presentationTimeline.Gb())):m=new ir(k,a.O.id,a.bandwidth,a.O.sb,n,r,h,q,g,a.O.Zf);k.timeline&&"image"!==a.
|
|
772
|
+
function br(a){return[a.O.ac,a.Ba.ac,a.Ha.ac].filter(vd).map(function(b){return ng(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Ng&&(a.Ng=!0);var c=b.getAttribute("media");b=vg(b,"mediaRange",yg,{start:0,end:null});return{Hi:c,start:b.start,end:b.end}})};function cr(a,b,c,d,e,f,g){var h=dr(a,g),k=er(a);fr(k);var l=jf(a);if(k.qd)return Xq(a,h),{Cc:function(){var u=zq(k.qd,l.O.id,null,null,l.bandwidth||null,null);u=Eb(l.O.sb(),[u]);return Wq(l,b,h,u,0,null,k.Lb)}};if(k.La)return d||"image"===a.Ba.contentType||(a.presentationTimeline.Lf(k.La),a.presentationTimeline.ue(a.ia.start)),{Cc:function(){return gr(l,k,e,h,f,g)}};var m=null;d=d=null;a.Ha.id&&a.O.id&&(d=a.Ha.id+","+a.O.id,d=c[d])&&(m=d.segmentIndex);var n=a.ia.start,r=a.ia.duration?n+a.ia.duration:
|
|
773
|
+
Infinity,q=!(a.Rb&&a.ia.Af);m?(c=m,hr(c,k,n,r,q,h),c.rb(a.presentationTimeline.Gb())):m=new ir(k,a.O.id,a.bandwidth,a.O.sb,n,r,h,q,g,a.O.Zf);k.timeline&&"image"!==a.Ba.contentType&&a.presentationTimeline.Vg(k.timeline,n);d&&a.Rb&&(d.segmentIndex=m);return{Cc:function(){m instanceof ir&&0==m.jc()&&hr(m,k,n,r,q,h);return Promise.resolve(m)}}}function jr(a){return a.Ed}
|
|
772
774
|
function er(a){var b=Aq(a,jr),c=Bq(a,jr,"media");a=Bq(a,jr,"index");return{La:b.La,timescale:b.timescale,Fd:b.Fd,Lb:b.Lb,pg:b.pg,timeline:b.timeline,Lc:c,qd:a}}function fr(a){var b=a.qd?1:0;b+=a.timeline?1:0;b+=a.La?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.qd&&(a.timeline=null),a.La=null);if(!a.qd&&!a.Lc)throw new P(2,4,4002);}
|
|
773
|
-
function gr(a,b,c,d,e,f){function g(J){var L=(J-u)*q,N=L+b.Lb,Q=L+m;L=Q+q;var T=Math.min(L,k());Q=new Fh(Q,T,function(){var Z=N*v;"BigInt"in window&&Z>Number.MAX_SAFE_INTEGER&&(Z=BigInt(N)*BigInt(v));Z=zq(x,y,J,null,z,Z);return Eb(
|
|
774
|
-
m+J:Infinity}var l=a.presentationTimeline,m=a.ia.start,n=a.Ha.id,r=a.ia.duration,q=b.La,u=b.Fd,v=b.timescale,x=b.Lc,z=a.bandwidth||null,y=a.O.id,
|
|
775
|
+
function gr(a,b,c,d,e,f){function g(J){var L=(J-u)*q,N=L+b.Lb,Q=L+m;L=Q+q;var T=Math.min(L,k());Q=new Fh(Q,T,function(){var Z=N*v;"BigInt"in window&&Z>Number.MAX_SAFE_INTEGER&&(Z=BigInt(N)*BigInt(v));Z=zq(x,y,J,null,z,Z);return Eb(A(),[Z])},0,null,d,B,m,k(),[],"",null,null,Gh,f);Q.j=L;return Q}function h(){var J=[Math.max(l.Gb(),m),Math.min(l.Vb(),k())].map(function(L){return L-m});return[Math.ceil(J[0]/q),Math.ceil(J[1]/q)-1].map(function(L){return L+u})}function k(){var J=null!=n&&e[n]||r;return J?
|
|
776
|
+
m+J:Infinity}var l=a.presentationTimeline,m=a.ia.start,n=a.Ha.id,r=a.ia.duration,q=b.La,u=b.Fd,v=b.timescale,x=b.Lc,z=a.bandwidth||null,y=a.O.id,A=a.O.sb,B=m-b.Lb,C=h();a=a.Rb?Math.max(C[0],C[1]-c+1):C[0];C=C[1];c=[];for(var E=a;E<=C;++E){var H=g(E);c.push(H)}var G=new Fj(c);c=l.Vb()<k();E=l.R();if(c||E){var I=Math.max(a,C+1);G.De(q,function(){var J=l.Gb();G.rb(J);var L=t(h());L.next();L=L.next().value;for(var N=[];I<=L;){var Q=g(I);N.push(Q);I++}return J>k()&&!N.length?null:N})}return Promise.resolve(G)}
|
|
775
777
|
function dr(a,b){var c=Bq(a,jr,"initialization");if(!c)return null;var d=a.O.id,e=a.bandwidth||null,f=a.O.sb;return new Dh(function(){var g=zq(c,d,null,null,e,null);return Eb(f(),[g])},0,null,Rq(a),null,null,b)}function ir(a,b,c,d,e,f,g,h,k,l){Fj.call(this,[]);this.h=a;this.H=b;this.D=c;this.G=d;this.i=e;this.m=f;this.u=g;this.C=k;this.I=l;h&&kr(this)}pa(ir,Fj);p=ir.prototype;p.jc=function(){return this.h?this.h.timeline.length:0};p.release=function(){Fj.prototype.release.call(this);this.h=null};
|
|
776
778
|
p.rb=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.i<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.j+=b,0===this.jc()&&this.release())}};function hr(a,b,c,d,e,f){a.u=f;if(a.h){c=a.h.timeline;a.h.Lc=b.Lc;var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end});0<b.length&&a.h.timeline.push.apply(a.h.timeline,w(b));a.m!==d&&(a.m=d)}else a.h=b,a.i=c,a.m=d;e&&kr(a)}
|
|
777
779
|
function kr(a){if(!a.s){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.m)b.pop();else break;a.rb(a.i);0!==b.length&&Infinity!==a.m&&(b[b.length-1].end=a.m-a.i)}}
|
|
@@ -783,18 +785,18 @@ function or(a,b){if(!a.m.length)return b;b=new kb(b);var c=a.D||a.m[0],d=Math.ro
|
|
|
783
785
|
function qr(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}
|
|
784
786
|
function rr(a,b){b=a.l.get(b)||new Map;for(var c=[],d={},e=t(a.m),f=e.next();!f.done;d={dc:d.dc},f=e.next())if(d.dc=f.value,f=b.get(d.dc))c.push({Sf:d.dc,location:f});else if(f=a.H.find(function(h){return function(k){return k.xj==h.dc}}(d))){var g=b.get(f["BASE-ID"]);g&&(f["URI-REPLACEMENT"].qh?(g=new kb(g),ob(g,f["URI-REPLACEMENT"].qh),c.push({Sf:d.dc,location:g.toString()})):c.push({Sf:d.dc,location:g}))}d=Date.now();e=t(a.i.keys());for(f=e.next();!f.done;f=e.next())f=f.value,g=a.i.get(f),d>g&&
|
|
785
787
|
a.i.delete(f);c=c.filter(function(h){for(var k=t(a.i.keys()),l=k.next();!l.done;l=k.next())if(l.value.includes((new kb(h.location)).Db))return!1;return!0});c.length&&(a.D=c[0].Sf);c=c.map(function(h){return h.location});if(!c.length&&a.h)for(d=t(a.h.split(",")),f=d.next();!f.done;f=d.next())if(e=b.get(f.value))a.D=a.h,c.push(e);if(!c.length)for(b=t(b.values()),d=b.next();!d.done;d=b.next())c.push(d.value);return Eb(a.j,c)};function sr(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.m=new Set}p=sr.prototype;p.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=[]};p.li=function(){return this.j};p.xf=function(){return this.l.slice()};p.Uh=function(){return this.i};
|
|
786
|
-
p.Ag=function(a,b){var c,d,e,f,g=this,h,k,l,m,n,r,q,u,v,x,z,y,
|
|
787
|
-
mb.push(ib.textStreams),hb.push(ib.imageStreams);c=ac;d=Aa;e=mb;f=hb;r=c;q=d;u=e;v=f;x=t(u);for(z=x.next();!z.done;z=x.next())y=z.value,y.push(ur(h.ya));
|
|
788
|
+
p.Ag=function(a,b){var c,d,e,f,g=this,h,k,l,m,n,r,q,u,v,x,z,y,A,B,C,E,H,G,I,J,L,N,Q,T,Z,aa,la,Na,Xa,Fb;return K(function(lb){if(1==lb.g){h=Mb;tr(a);if(!b&&1==a.length)return k=a[0],g.h=k.audioStreams,g.g=k.videoStreams,g.l=k.textStreams,g.i=k.imageStreams,lb.F(2);l=-1;for(m=0;m<a.length;m++)n=a[m],g.m.has(n.id)||(g.m.add(n.id),-1==l&&(l=m));if(-1==l)return lb.return();for(var ac=[],Aa=[],mb=[],hb=[],Gb=t(a),ib=Gb.next();!ib.done;ib=Gb.next())ib=ib.value,ac.push(ib.audioStreams),Aa.push(ib.videoStreams),
|
|
789
|
+
mb.push(ib.textStreams),hb.push(ib.imageStreams);c=ac;d=Aa;e=mb;f=hb;r=c;q=d;u=e;v=f;x=t(u);for(z=x.next();!z.done;z=x.next())y=z.value,y.push(ur(h.ya));A=t(v);for(B=A.next();!B.done;B=A.next())C=B.value,C.push(ur(h.fd));return D(lb,Promise.all([vr(g.h,r,l,wr,xr),vr(g.g,q,l,wr,xr),vr(g.l,u,l,wr,xr),vr(g.i,v,l,wr,xr)]),2)}E=0;H=[];if(g.g.length&&g.h.length)for(Q=t(g.h),T=Q.next();!T.done;T=Q.next())for(Z=T.value,aa=t(g.g),la=aa.next();!la.done;la=aa.next())Na=la.value,Xa=uh(Z.drmInfos,Na.drmInfos),
|
|
788
790
|
Z.drmInfos.length&&Na.drmInfos.length&&!Xa.length||(Fb=E++,H.push({id:Fb,language:Z.language,disabledUntilTime:0,primary:Z.primary,audio:Z,video:Na,bandwidth:(Z.bandwidth||0)+(Na.bandwidth||0),drmInfos:Xa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(G=g.g.length?g.g:g.h,I=t(G),J=I.next();!J.done;J=I.next())L=J.value,N=E++,H.push({id:N,language:L.language,disabledUntilTime:0,primary:L.primary,audio:L.type==h.W?L:null,video:L.type==h.ra?L:null,bandwidth:L.bandwidth||0,
|
|
789
791
|
drmInfos:L.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});g.j=H;F(lb)})};
|
|
790
792
|
function tr(a){a=t(a);for(var b=a.next();!b.done;b=a.next())b=b.value,b.videoStreams=yr(b.videoStreams,function(c,d){return c.id!==d.id&&c.fastSwitching==d.fastSwitching&&c.width===d.width&&c.frameRate===d.frameRate&&c.codecs===d.codecs&&c.mimeType===d.mimeType&&c.label===d.label&&yc(c.roles,d.roles)&&If(c.closedCaptions,d.closedCaptions)&&c.bandwidth===d.bandwidth}),b.audioStreams=yr(b.audioStreams,function(c,d){return c.id!==d.id&&c.fastSwitching==d.fastSwitching&&c.channelsCount===d.channelsCount&&
|
|
791
793
|
c.language===d.language&&c.bandwidth===d.bandwidth&&c.label===d.label&&c.codecs===d.codecs&&c.mimeType===d.mimeType&&yc(c.roles,d.roles)&&c.audioSamplingRate===d.audioSamplingRate&&c.primary===d.primary}),b.textStreams=yr(b.textStreams,function(c,d){return c.id!==d.id&&c.language===d.language&&c.label===d.label&&c.codecs===d.codecs&&c.mimeType===d.mimeType&&c.bandwidth===d.bandwidth&&yc(c.roles,d.roles)}),b.imageStreams=yr(b.imageStreams,function(c,d){return c.id!==d.id&&c.width===d.width&&c.codecs===
|
|
792
794
|
d.codecs&&c.mimeType===d.mimeType})}function yr(a,b){var c=[],d={};a=t(a);for(var e=a.next();!e.done;d={Nd:d.Nd},e=a.next())d.Nd=e.value,c.some(function(f){return function(g){return b(f.Nd,g)}}(d))||c.push(d.Nd);return c}
|
|
793
|
-
function zr(a){var b,c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,
|
|
794
|
-
l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Ar(b.fd));return D(N,vr([],c,0,Br,Cr),2);case 2:return r=N.h,D(N,vr([],d,0,Br,Cr),3);case 3:return q=N.h,D(N,vr([],e,0,Br,Cr),4);case 4:return u=N.h,D(N,vr([],f,0,Br,Cr),5);case 5:v=N.h;x=0;if(q.length&&r.length)for(
|
|
795
|
+
function zr(a){var b,c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A,B,C,E,H,G,I,J,L;return K(function(N){switch(N.g){case 1:b=Mb;if(1==a.length)return N.return(a[0]);c=a.map(function(Q){return Q.filter(function(T){return T.type==b.W})});d=a.map(function(Q){return Q.filter(function(T){return T.type==b.ra})});e=a.map(function(Q){return Q.filter(function(T){return T.type==b.ya})});f=a.map(function(Q){return Q.filter(function(T){return T.type==b.fd})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,k.push(Ar(b.ya));
|
|
796
|
+
l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Ar(b.fd));return D(N,vr([],c,0,Br,Cr),2);case 2:return r=N.h,D(N,vr([],d,0,Br,Cr),3);case 3:return q=N.h,D(N,vr([],e,0,Br,Cr),4);case 4:return u=N.h,D(N,vr([],f,0,Br,Cr),5);case 5:v=N.h;x=0;if(q.length&&r.length)for(C=t(r),E=C.next();!E.done;E=C.next())for(H=E.value,G=t(q),I=G.next();!I.done;I=G.next())J=I.value,L=x++,J.variantIds.push(L),H.variantIds.push(L);else for(z=q.concat(r),y=t(z),A=y.next();!A.done;A=y.next())B=A.value,B.variantIds=
|
|
795
797
|
[x++];return N.return(q.concat(r).concat(u).concat(v))}})}
|
|
796
|
-
function vr(a,b,c,d,e){var f,g,h,k,l,m,n,r,q,u,v,x,z,y,
|
|
797
|
-
|
|
798
|
+
function vr(a,b,c,d,e){var f,g,h,k,l,m,n,r,q,u,v,x,z,y,A,B,C,E,H,G,I;return K(function(J){switch(J.g){case 1:f=Mb;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){J.F(4);break}m=l.value;return D(J,Dr(m,b,c,e,g),5);case 5:n=J.h;if(!n)throw new P(2,4,4037);l=k.next();J.F(2);break;case 4:r=t(g);for(q=r.next();!q.done;q=r.next())for(u=q.value,v=t(u),x=v.next();!x.done;x=v.next())z=x.value,(y=Er(z,b,d,e,g))&&a.push(y);A=t(g);for(q=A.next();!q.done;q=
|
|
799
|
+
A.next())for(B=q.value,C={},E=t(B),x=E.next();!x.done;C={Pb:C.Pb},x=E.next())if(C.Pb=x.value,H=C.Pb.type==f.ya&&!C.Pb.language,G=C.Pb.type==f.fd&&!C.Pb.tilesLayout,!H&&!G&&(I=a.some(function(L){return function(N){return N.mimeType==L.Pb.mimeType&&hd(N.codecs)==hd(L.Pb.codecs)}}(C))))throw new P(2,4,4037);return J.return(a)}})}function Dr(a,b,c,d,e){return K(function(f){if(1==f.g)return Fr(b,a),a.matchedStreams?a.segmentIndex?D(f,Gr(a,c),2):f.F(2):f.return(!1);Hr(a,c,d,e);return f.return(!0)})}
|
|
798
800
|
function Gr(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return D(l,Promise.all(c),2)}if(a.segmentIndex instanceof Jj)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.h.push(k.segmentIndex);F(l)})}
|
|
799
801
|
function Er(a,b,c,d,e){var f=c(a);Fr(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return K(function(g){if(f.segmentIndex)return g.F(0);f.segmentIndex=new Jj;return D(g,Gr(f,0),0)})});if(!f.matchedStreams||!f.matchedStreams.length)return null;Hr(f,0,d,e);return f}function Hr(a,b,c,d){for(var e=a.matchedStreams;b<e.length;b++){var f=e[b];c(a,f);var g=!0;"audio"==a.type&&0==Vb(a.language,f.language)&&(g=!1);g&&d[b].delete(f)}}
|
|
800
802
|
function wr(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
|
|
@@ -817,35 +819,35 @@ p.stop=function(){for(var a=t(Object.values(this.m)),b=a.next();!b.done;b=a.next
|
|
|
817
819
|
p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.R()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.Vb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.H=b.endTime-a,Yr(this,0))}}};p.banLocation=function(a){this.h&&this.h.i.set(a,Date.now()+6E4)};
|
|
818
820
|
function Xr(a){var b,c,d,e,f;return K(function(g){if(1==g.g)return b=qf(a.s,a.g.retryParameters),c=Date.now(),D(g,Zr(a,b,0,{type:4}),2);if(3!=g.g){d=g.h;if(!a.i)return g.return(0);d.uri&&d.uri!=d.originalUri&&!a.s.includes(d.uri)&&a.s.unshift(d.uri);return D(g,$r(a,d.data,d.uri),3)}e=Date.now();f=(e-c)/1E3;a.J.sample(1,f);return g.return(f)})}
|
|
819
821
|
function $r(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=Hg(b,"MPD");if(!d)throw new P(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(as(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Fq(d,a.g.retryParameters,f,c,a.i.networkingEngine);lf(a.G,g);return D(k,g.promise,2)}h=k.h;return k.return(as(a,h,c))})}
|
|
820
|
-
function as(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,
|
|
821
|
-
vg(k,"queryBeforeStart",Dg,!1))?h=nr(a.h,m):nr(a.h,m);r=ng(b,"BaseURL");u=!1;if(a.h)for(a.h.l.clear(),v=t(r),x=v.next();!x.done;x=v.next())z=x.value,y=z.getAttribute("serviceLocation"),
|
|
822
|
+
function as(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A,B,C,E,H,G,I,J,L,N,Q,T,Z,aa,la,Na,Xa,Fb,lb,ac,Aa,mb,hb,Gb,ib,Vh,Nd,Ne,Oe;return K(function(rb){switch(rb.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=ng(b,"Location").map(tg).filter(vd);0<f.length&&(g=Eb(e,f),e=a.s=g);h=Promise.resolve();if((k=mg(b,"ContentSteering"))&&a.i)if(l=k.getAttribute("defaultServiceLocation"),a.h)a.h.j=e,a.h.h=l;else if(a.h=new mr(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.j=e,a.h.h=l,m=tg(k))(n=
|
|
823
|
+
vg(k,"queryBeforeStart",Dg,!1))?h=nr(a.h,m):nr(a.h,m);r=ng(b,"BaseURL");u=!1;if(a.h)for(a.h.l.clear(),v=t(r),x=v.next();!x.done;x=v.next())z=x.value,y=z.getAttribute("serviceLocation"),A=tg(z),y&&A&&(qr(a.h,"BaseURL",y,A),u=!0);u&&a.h||(B=r.map(tg),q=Eb(e,B));C=function(){return a.h&&u?rr(a.h,"BaseURL"):q?q:[]};E=0;r&&r.length&&(E=vg(r[0],"availabilityTimeOffset",Cg)||0);H=a.g.dash.ignoreMinBufferTime;G=0;H||(G=vg(b,"minBufferTime",xg)||0);a.H=vg(b,"minimumUpdatePeriod",xg,-1);I=vg(b,"availabilityStartTime",
|
|
822
824
|
wg);J=vg(b,"timeShiftBufferDepth",xg);L=a.g.dash.ignoreSuggestedPresentationDelay;N=null;L||(N=vg(b,"suggestedPresentationDelay",xg));Q=a.g.dash.ignoreMaxSegmentDuration;T=null;Q||(T=vg(b,"maxSegmentDuration",xg));Z=b.getAttribute("type")||"static";if(a.j)for(aa=a.j.presentationTimeline,la=t(Object.values(a.m)),Na=la.next();!Na.done;Na=la.next())Xa=Na.value,Xa.segmentIndex&&Xa.segmentIndex.rb(aa.Gb());else Fb=a.g.defaultPresentationDelay||1.5*G,lb=null!=N?N:Fb,aa=new jj(I,lb,a.g.dash.autoCorrectDrift);
|
|
823
|
-
aa.Oc("static"==Z);(ac=aa.R())&&!isNaN(a.g.availabilityWindowOverride)&&(J=a.g.availabilityWindowOverride);null==J&&(J=Infinity);aa.Ce(J);Aa=b.getAttribute("profiles")||"";mb={Rb:"static"!=Z,presentationTimeline:aa,Ha:null,ia:null,
|
|
825
|
+
aa.Oc("static"==Z);(ac=aa.R())&&!isNaN(a.g.availabilityWindowOverride)&&(J=a.g.availabilityWindowOverride);null==J&&(J=Infinity);aa.Ce(J);Aa=b.getAttribute("profiles")||"";mb={Rb:"static"!=Z,presentationTimeline:aa,Ha:null,ia:null,Ba:null,O:null,bandwidth:0,Ng:!1,zc:E,profiles:Aa.split(",")};hb=bs(a,mb,C,b);Gb=hb.duration;ib=hb.periods;"static"!=Z&&hb.Fg||aa.bb(Gb||Infinity);a.D&&!a.u&&(Vh=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.u=a.i.isLowLatencyMode());a.u?aa.bh(a.D):a.D&&Ua("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.");
|
|
824
826
|
aa.Lf(T||1);return D(rb,a.l.Ag(ib,mb.Rb),2);case 2:return D(rb,h,3);case 3:a.u&&(G=0);if(a.j){a.j.variants=a.l.j;Nd=a.l.xf();0<Nd.length&&(a.j.textStreams=Nd);a.j.imageStreams=a.l.i;a.i.filter(a.j);rb.F(4);break}a.j={presentationTimeline:aa,variants:a.l.j,textStreams:a.l.xf(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:G||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:cs(b)};if(!aa.oh()){rb.F(5);break}Ne=ng(b,"UTCTiming");return D(rb,
|
|
825
|
-
ds(a,
|
|
827
|
+
ds(a,C,Ne),6);case 6:Oe=rb.h;if(!a.i)return rb.return();aa.dh(Oe);case 5:aa.le();case 4:a.i.makeTextStreamsForClosedCaptions(a.j),F(rb)}})}
|
|
826
828
|
function cs(a){a=mg(a,"ServiceDescription");if(!a)return null;var b=mg(a,"Latency"),c=mg(a,"PlaybackRate");if(b&&b.getAttribute("max")||c){a=b&&b.getAttribute("max")?parseInt(b.getAttribute("max"),10)/1E3:null;var d=c?parseFloat(c.getAttribute("max")):null;b=b&&b.getAttribute("min")?parseInt(b.getAttribute("min"),10)/1E3:null;c=c?parseFloat(c.getAttribute("min")):null;return{maxLatency:a,maxPlaybackRate:d,minLatency:b,minPlaybackRate:c}}return null}
|
|
827
829
|
function bs(a,b,c,d){var e=vg(d,"mediaPresentationDuration",xg),f=[],g=0;d=ng(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=vg(k,"start",xg,g),n=k.id,r=vg(k,"duration",xg),q=null;if(l){var u=vg(l,"start",xg);null!=u&&(q=u-m)}else null!=e&&(q=e-m);null==q&&(q=r);if(!(null!==a.C&&null!==n&&null!==m&&m<a.C)||a.L.includes(n)||h+1==d.length){null!==m&&(null===a.C||m>a.C)&&(a.C=m);g=es(a,b,c,{start:m,duration:q,node:k,Af:null==q||!l});f.push(g);b.Ha.id&&q&&(a.M[b.Ha.id]=q);if(null==q){g=
|
|
828
830
|
null;break}g=m+q}}a.L=f.map(function(v){return v.id});return null!=e?{periods:f,duration:e,Fg:!1}:{periods:f,duration:g,Fg:!0}}
|
|
829
831
|
function es(a,b,c,d){b.Ha=fs(a,d.node,null,c);b.ia=d;b.Ha.zc=b.zc;b.Ha.id||(b.Ha.id="__shaka_period_"+d.start);var e=ng(d.node,"EventStream");c=b.presentationTimeline.Gb();e=t(e);for(var f=e.next();!f.done;f=e.next())gs(a,d.start,d.duration,f.value,c);c=ng(d.node,"AdaptationSet").map(function(m){return hs(a,b,m)}).filter(vd);if(b.Rb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Ti);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new P(2,4,4018);
|
|
830
832
|
}d=c.filter(function(m){return!m.og});c=c.filter(function(m){return m.og});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.og.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={Od:h.Od},l=k.next())h.Od=l.value,h.Od.trickModeVideo=e.streams.find(function(m){return function(n){return hd(m.Od.codecs)==hd(n.codecs)}}(h))}}}c=is(a.g.disableAudio,d,"audio");e=is(a.g.disableVideo,d,"video");f=is(a.g.disableText,
|
|
831
833
|
d,Lb);d=is(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new P(2,4,4004);return{id:b.Ha.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function is(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,w(e.streams));return d},[])}
|
|
832
|
-
function hs(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.
|
|
834
|
+
function hs(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Ba=fs(a,c,b.Ha,null);var e=!1,f=ng(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(vd),h=void 0,k=b.Ba.contentType==Lb;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
|
|
833
835
|
l}}var n;m=ng(c,"EssentialProperty");f=null;var r=!1;l=!1;m=t(m);for(var q=m.next();!q.done;q=m.next()){q=q.value;var u=q.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==u?f=q.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==u?n=d(parseInt(q.getAttribute("value"),10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=u&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=u&&("urn:mpeg:dash:ssr:2023"==u?r=!0:l=!0)}m=ng(c,"SupplementalProperty");m=t(m);for(q=m.next();!q.done;q=
|
|
834
|
-
m.next())q=q.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==q.getAttribute("schemeIdUri")&&(n=d(parseInt(q.getAttribute("value"),10)));m=ng(c,"Accessibility");var v=new Map,x;m=t(m);for(q=m.next();!q.done;q=m.next())if(u=q.value,q=u.getAttribute("schemeIdUri"),u=u.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==q)if(q=1,null!=u){u=u.split(";");for(var z=t(u),y=z.next();!y.done;y=z.next()){var
|
|
835
|
-
A
|
|
836
|
-
u?x="visually impaired":"2"==u&&(x="hard of hearing"));if(l)return null;l=ng(c,"ContentProtection");var
|
|
837
|
-
k||f)return null;throw new P(2,4,4003);}if(!b.
|
|
838
|
-
return{id:k,contentType:b.
|
|
839
|
-
function js(a,b,c,d,e,f,g,h,k,l,m){b.O=fs(a,l,b.
|
|
840
|
-
4,4049);J={name:"AES-CBC"};L=u;return D(N,window.crypto.subtle.importKey("raw",I.data,J,!0,["decrypt"]),3)}L.cryptoKey=N.h;u.fetchKey=void 0;F(N)})}}}v=function(I,J,L,N){return ms(a,I,J,L,N)};if(b.O.Dd)var y=Sq(b,v,u);else if(b.O.ac)y=Yq(b,a.m,u);else if(b.O.Ed)y=cr(b,v,a.m,!!a.j,a.g.dash.initialSegmentLimit,a.M,u);else{var
|
|
841
|
-
a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);v=new Set(v?[v]:[]);x=!1;ng(l,"SupplementalProperty").some(function(I){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==I.getAttribute("schemeIdUri")&&"JOC"==I.getAttribute("value")})&&(x=!0);var
|
|
836
|
+
m.next())q=q.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==q.getAttribute("schemeIdUri")&&(n=d(parseInt(q.getAttribute("value"),10)));m=ng(c,"Accessibility");var v=new Map,x;m=t(m);for(q=m.next();!q.done;q=m.next())if(u=q.value,q=u.getAttribute("schemeIdUri"),u=u.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==q)if(q=1,null!=u){u=u.split(";");for(var z=t(u),y=z.next();!y.done;y=z.next()){var A=y.value,B=y=void 0;A.includes("=")?(A=A.split("="),y=A[0].startsWith("CC")?A[0]:"CC"+A[0],
|
|
837
|
+
B=A[1]||"und"):(y="CC"+q,2==u.length?q+=2:q++,B=A);v.set(y,Pb(B))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==q)if(q=1,null!=u)for(u=t(u.split(";")),y=u.next();!y.done;y=u.next())y=y.value,A=z=void 0,y.includes("=")?(y=y.split("="),z="svc"+y[0],A=y[1].split(",")[0].split(":").pop()):(z="svc"+q,q++,A=y),v.set(z,Pb(A));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==q?null!=u&&(g.push(u),"captions"==u&&(h="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==q&&("1"==
|
|
838
|
+
u?x="visually impaired":"2"==u&&(x="hard of hearing"));if(l)return null;l=ng(c,"ContentProtection");var C=oq(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),E=Pb(b.Ba.language||"und"),H=c.getAttribute("label");(l=ng(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(H=l.textContent));l=ng(c,"Representation");c=l.map(function(G){if(G=js(a,b,C,h,E,H,e,g,v,G,x))G.hdr=G.hdr||n,G.fastSwitching=r;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.Ba.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||
|
|
839
|
+
k||f)return null;throw new P(2,4,4003);}if(!b.Ba.contentType||"application"==b.Ba.contentType)for(b.Ba.contentType=ks(c[0].mimeType,c[0].codecs),k=t(c),q=k.next();!q.done;q=k.next())q.value.type=b.Ba.contentType;k=b.Ba.id||"__fake__"+a.K++;m=t(c);for(q=m.next();!q.done;q=m.next()){q=q.value;u=t(C.drmInfos);for(z=u.next();!z.done;z=u.next())z=z.value,z.keyIds=z.keyIds&&q.keyIds?new Set([].concat(w(z.keyIds),w(q.keyIds))):z.keyIds||q.keyIds;a.g.dash.enableAudioGroups&&(q.groupId=k)}l=l.map(function(G){return G.getAttribute("id")}).filter(vd);
|
|
840
|
+
return{id:k,contentType:b.Ba.contentType,language:E,ek:e,streams:c,drmInfos:C.drmInfos,og:f,Ti:l}}
|
|
841
|
+
function js(a,b,c,d,e,f,g,h,k,l,m){b.O=fs(a,l,b.Ba,null);a.D=Math.min(a.D,b.O.zc);if(!ls(b.O))return null;var n=b.ia.start;b.bandwidth=vg(l,"bandwidth",Ag)||0;var r=b.O.contentType,q=r==Lb||"application"==r;r="image"==r;try{var u=void 0;if(c.Re){var v=b.O.sb,x=Eb(v(),[c.Re.Ci]),z=qf(x,a.g.retryParameters);u={method:"AES-128",iv:c.Re.iv,firstMediaSequenceNumber:0,fetchKey:function(){var I,J,L;return K(function(N){if(1==N.g)return D(N,Zr(a,z,6),2);if(3!=N.g){I=N.h;if(!I.data||16!=I.data.byteLength)throw new P(2,
|
|
842
|
+
4,4049);J={name:"AES-CBC"};L=u;return D(N,window.crypto.subtle.importKey("raw",I.data,J,!0,["decrypt"]),3)}L.cryptoKey=N.h;u.fetchKey=void 0;F(N)})}}}v=function(I,J,L,N){return ms(a,I,J,L,N)};if(b.O.Dd)var y=Sq(b,v,u);else if(b.O.ac)y=Yq(b,a.m,u);else if(b.O.Ed)y=cr(b,v,a.m,!!a.j,a.g.dash.initialSegmentLimit,a.M,u);else{var A=b.ia.duration||0,B=b.O.sb;y={Cc:function(){return Promise.resolve(Ij(n,A,B()))}}}}catch(I){if((q||r)&&4002==I.code)return null;throw I;}v=ng(l,"ContentProtection");v=sq(v,c,
|
|
843
|
+
a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);v=new Set(v?[v]:[]);x=!1;ng(l,"SupplementalProperty").some(function(I){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==I.getAttribute("schemeIdUri")&&"JOC"==I.getAttribute("value")})&&(x=!0);var C=!1;q&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var E;if(r&&((l=ng(l,"EssentialProperty").find(function(I){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(I.getAttribute("schemeIdUri"))}))&&
|
|
842
844
|
(E=l.getAttribute("value")),!E))return null;var H;l=b.O.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"))&&(H="PQ");l=b.O.id?b.Ha.id+","+b.O.id:"";var G=l&&a.m[l]?a.m[l]:{id:a.K++,originalId:b.O.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){G.segmentIndex&&(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.O.mimeType,
|
|
843
|
-
codecs:b.O.codecs,frameRate:b.O.frameRate,pixelAspectRatio:b.O.pixelAspectRatio,bandwidth:b.bandwidth,width:b.O.width,height:b.O.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:v,language:e,originalLanguage:b.
|
|
845
|
+
codecs:b.O.codecs,frameRate:b.O.frameRate,pixelAspectRatio:b.O.pixelAspectRatio,bandwidth:b.bandwidth,width:b.O.width,height:b.O.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:v,language:e,originalLanguage:b.Ba.language,label:f,type:b.Ba.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.O.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.O.ve,audioSamplingRate:b.O.audioSamplingRate,spatialAudio:x,closedCaptions:k,hdr:H,videoLayout:void 0,tilesLayout:E,matchedStreams:[],
|
|
844
846
|
accessibilityPurpose:m,external:!1,fastSwitching:!1};G.createSegmentIndex=function(){var I;return K(function(J){if(1==J.g){if(G.segmentIndex)return J.F(0);I=G;return D(J,y.Cc(),3)}I.segmentIndex=J.h;F(J)})};l&&b.Rb&&!a.m[l]&&(a.m[l]=G);return G}
|
|
845
847
|
function Wr(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,ta(d,2),D(d,Xr(a),4);case 4:b=d.h;va(d,3);break;case 2:if(c=wa(d),a.i){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c)}case 3:if(!a.i)return d.return();a.i.onManifestUpdated();Yr(a,b);F(d)}})}function Yr(a,b){0>=a.H||a.I.S(Math.max(a.H-b,dc(a.J)))}
|
|
846
848
|
function fs(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ve:null,audioSamplingRate:null,zc:0,Zf:0};d=d||c.sb;var e=b.getAttribute("id"),f=ng(b,"BaseURL"),g,h=!1;if(a.h)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.getAttribute("serviceLocation");m=tg(m);l&&m&&(qr(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(tg));k=b.getAttribute("contentType")||c.contentType;l=b.getAttribute("mimeType")||c.mimeType;m=b.getAttribute("codecs")||
|
|
847
|
-
c.codecs;var n=vg(b,"frameRate",Eg)||c.frameRate,r=b.getAttribute("sar")||c.pixelAspectRatio,q=ns(ng(b,"InbandEventStream"),c.emsgSchemeIdUris),u=ng(b,"AudioChannelConfiguration");u=os(u)||c.ve;var v=vg(b,"audioSamplingRate",Bg)||c.audioSamplingRate;k||(k=ks(l,m));var x=mg(b,"SegmentBase"),z=mg(b,"SegmentTemplate"),y=x?vg(x,"availabilityTimeOffset",Cg)||0:0,
|
|
848
|
-
(
|
|
849
|
+
c.codecs;var n=vg(b,"frameRate",Eg)||c.frameRate,r=b.getAttribute("sar")||c.pixelAspectRatio,q=ns(ng(b,"InbandEventStream"),c.emsgSchemeIdUris),u=ng(b,"AudioChannelConfiguration");u=os(u)||c.ve;var v=vg(b,"audioSamplingRate",Bg)||c.audioSamplingRate;k||(k=ks(l,m));var x=mg(b,"SegmentBase"),z=mg(b,"SegmentTemplate"),y=x?vg(x,"availabilityTimeOffset",Cg)||0:0,A=z?vg(z,"availabilityTimeOffset",Cg)||0:0,B=f&&f.length?vg(f[0],"availabilityTimeOffset",Cg)||0:0;y=c.zc+B+y+A;A=null;(B=mg(b,"SegmentSequenceProperties"))&&
|
|
850
|
+
(B=mg(B,"SAP"))&&(A=vg(B,"cadence",zg));return{sb:function(){return Eb(d(),f.length?a.h&&h?rr(a.h,e):g?g:[]:[])},Dd:x||c.Dd,ac:mg(b,"SegmentList")||c.ac,Ed:z||c.Ed,width:vg(b,"width",Bg)||c.width,height:vg(b,"height",Bg)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:r,emsgSchemeIdUris:q,id:e,language:b.getAttribute("lang"),ve:u,audioSamplingRate:v,zc:y,Zf:A||c.Zf}}
|
|
849
851
|
function ns(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.getAttribute("schemeIdUri"),b.includes(c)||b.push(c);return b}
|
|
850
852
|
function os(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
|
|
851
853
|
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function ls(a){var b=a.Dd?1:0;b+=a.ac?1:0;b+=a.Ed?1:0;if(0==b)return a.contentType==Lb||"application"==a.contentType?!0:!1;1!=b&&(a.Dd&&(a.ac=null),a.Ed=null);return!0}
|
|
@@ -871,19 +873,19 @@ this.Na=new cc(5);this.j=null}p=Vs.prototype;p.configure=function(a){this.g=a;th
|
|
|
871
873
|
p.stop=function(){this.u&&(this.u.stop(),this.u=null);var a=[];this.P&&(a.push(this.P.destroy()),this.P=null);this.g=this.h=null;this.Ia.clear();this.G=null;this.i.clear();this.J.clear();this.I.clear();this.s.clear();this.j&&this.j.destroy();return Promise.all(a)};
|
|
872
874
|
p.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){if(!$s(a))return m.return();b=[];c=Array.from(a.i.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(at(a,g));return D(m,Promise.all(b),2)}bt(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.od});d.length&&!h&&(k=ct,dt(a,k.sh),l=d.map(function(n){return n.Hb}),a.l.bb(Math.min.apply(Math,w(l))),a.h.updateDuration());
|
|
873
875
|
h&&et(a);F(m)})};function ft(a,b){return $s(a)?a.L.get(b.type):b.pe}
|
|
874
|
-
function at(a,b){var c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,
|
|
875
|
-
b.aa().includes(m)||b.Yg.push(m);n=As(l.g,"EXT-X-DEFINE");r=gt(a,n,m);q=b.stream;u=ft(a,b);v=ht(l,q.mimeType);x=v.keyIds;z=v.drmInfos;y=function(la,Na){return la.size===Na.size&&[].concat(w(la)).every(function(Xa){return Na.has(Xa)})};y(q.keyIds,x)||(q.keyIds=x,q.drmInfos=z,a.h.newDrmInfo(q));
|
|
876
|
-
J=I.mb,L=I.ob,b.mb=J+G,b.ob=L,N=u.get(E),q.segmentIndex.rb(N));Q=
|
|
876
|
+
function at(a,b){var c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A,B,C,E,H,G,I,J,L,N,Q,T,Z;return K(function(aa){if(1==aa.g){c=[];d=t(b.aa());for(e=d.next();!e.done;e=d.next())f=e.value,g=new kb(f),h=g.g,b.Sd&&(0<=b.mb&&h.add("_HLS_msn",String(b.mb)),0<=b.ob&&h.add("_HLS_part",String(b.ob))),b.Td&&h.add("_HLS_skip","YES"),Cb(h)&&qb(g,h),c.push(g.toString());return D(aa,Ys(a,c,!0),2)}k=aa.h;if(!b.stream.segmentIndex)return aa.return();l=Ls(a.ea,k.data);if(1!=l.type)throw new P(2,4,4017);m=k.uri;m==k.originalUri||
|
|
877
|
+
b.aa().includes(m)||b.Yg.push(m);n=As(l.g,"EXT-X-DEFINE");r=gt(a,n,m);q=b.stream;u=ft(a,b);v=ht(l,q.mimeType);x=v.keyIds;z=v.drmInfos;y=function(la,Na){return la.size===Na.size&&[].concat(w(la)).every(function(Xa){return Na.has(Xa)})};y(q.keyIds,x)||(q.keyIds=x,q.drmInfos=z,a.h.newDrmInfo(q));A=it(a,l,q,u,r,b.aa);B=A.segments;C=A.bandwidth;q.bandwidth=C;q.segmentIndex.ud(B,a.l.Gb());B.length&&(E=Ds(l.g,"EXT-X-MEDIA-SEQUENCE",0),G=(H=Cs(l.g,"EXT-X-SKIP"))?Number(X(H,"SKIPPED-SEGMENTS")):0,I=jt(E,B),
|
|
878
|
+
J=I.mb,L=I.ob,b.mb=J+G,b.ob=L,N=u.get(E),q.segmentIndex.rb(N));Q=B[0];b.qc=Q.startTime;T=B[B.length-1];b.Hb=T.endTime;if(Z=Cs(l.g,"EXT-X-ENDLIST"))b.od=!0;kt(a,l);F(aa)})}p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(a){this.j&&this.j.i.set(a,Date.now()+6E4)};
|
|
877
879
|
function lt(a,b){for(var c=-1==a.K,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=ft(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.K=Math.max(a.K,k));e.$e=k;break}}}}if(!(0>a.K))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,d=c.stream.segmentIndex)if(d.g.splice(0,a.K-c.$e),d=d.g[0]||null)d=-d.startTime,c.stream.segmentIndex.offset(d),mt(a,c,d)}
|
|
878
880
|
function nt(a,b){if(Infinity==a.T){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.i&&(a.T=Math.min(a.T,d.i))}}b=a.T;if(Infinity!=b)for(d=t(a.i.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.i)Ta("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.aa(),"Expect AV sync issues!");else for(mt(a,c,f.i-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.jg(b)}}}
|
|
879
881
|
function mt(a,b,c){b.qc+=c;b.Hb+=c;a=ft(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.aa()}
|
|
880
|
-
function Zs(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,
|
|
881
|
-
case 4:return st(a,l),tt(a,k),f=ut(a,l,r,k),g=vt(a,k),D(la,wt(a,m,n),5);case 5:h=la.h;la.F(3);break;case 6:return x=la.h,z=x.type,y=x.mimeType,
|
|
882
|
+
function Zs(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A,B,C,E,H,G,I,J,L,N,Q,T,Z,aa;return K(function(la){switch(la.g){case 1:d=Ls(a.ea,b);e=As(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];if(1==d.type)return v=function(){return[c]},D(la,ot(a,d,v),6);pt(a,e);k=As(d.g,"EXT-X-MEDIA");l=As(d.g,"EXT-X-STREAM-INF");m=As(d.g,"EXT-X-IMAGE-STREAM-INF");n=As(d.g,"EXT-X-I-FRAME-STREAM-INF");r=As(d.g,"EXT-X-SESSION-KEY");q=As(d.g,"EXT-X-SESSION-DATA");u=As(d.g,"EXT-X-CONTENT-STEERING");qt(a,q);return D(la,rt(a,u),4);
|
|
883
|
+
case 4:return st(a,l),tt(a,k),f=ut(a,l,r,k),g=vt(a,k),D(la,wt(a,m,n),5);case 5:h=la.h;la.F(3);break;case 6:return x=la.h,z=x.type,y=x.mimeType,A=x.codecs,B=x.language,C=x.height,E=x.width,H=x.channelCount,G=x.sampleRate,I=x.closedCaptions,D(la,xt(a,a.C++,d,v,c,A,z,B,!0,"Media Playlist",H,I,null,!1,G,!1,y),7);case 7:J=la.h,a.i.set(c,J),"video"==z&&yt(J.stream,E,C,null,null,null),f.push({id:0,language:Pb(B||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==z?J.stream:null,video:"video"==z?J.stream:
|
|
882
884
|
null,bandwidth:J.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new P(2,7,7001);a.l=new jj(null,0);a.l.Oc(!0);1==d.type&&($s(a)&&(zt(a,d),L=a.m,a.u.S(L)),N=Array.from(a.i.values()),At(a,N),et(a));a.G={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null};
|
|
883
885
|
if(a.Z||!a.g.hls.disableCodecGuessing){la.F(8);break}Q=[];T=t(a.G.variants);for(Z=T.next();!Z.done;Z=T.next())aa=Z.value,aa.audio&&""===aa.audio.codecs&&Q.push(aa.audio.createSegmentIndex()),aa.video&&""===aa.video.codecs&&Q.push(aa.video.createSegmentIndex());return D(la,Promise.all(Q),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.G),F(la)}})}
|
|
884
|
-
function ot(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,
|
|
885
|
-
D(
|
|
886
|
-
L=!0}if(I.length){G=J&&!L;J=new Map;if(L){L=new tc("video/mp2t");L.i(E);E=t(L.j());for(var N=E.next();!N.done;N=E.next())N=N.value,J.set(N,N);L.h()}H={type:G?"audio":"video",mimeType:"video/mp2t",codecs:I.join(", "),language:null,height:H.height,width:H.width,channelCount:null,sampleRate:null,closedCaptions:J}}else H=null;if(
|
|
886
|
+
function ot(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A,B;return K(function(C){switch(C.g){case 1:d=Ss(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return C.return(d);e=Math.trunc((b.segments.length-1)/2);f=b.segments[e];g=Es(c(),b.segments[0].h);h=g[0];k=new kb(h);l=k.Ta.split(".").pop();if(m=Bt[l])return C.return(Ss(m));n=wf;r=null;q=Ct(a,b,f.g,c);if(!q){C.F(2);break}u=qf(q.aa(),a.g.retryParameters);return D(C,Dt(a,u,n,{type:0}),3);case 3:v=C.h,r=v.data;case 2:return x=qf(g,a.g.retryParameters),
|
|
887
|
+
D(C,Dt(a,x,n,{type:1}),4);case 4:z=C.h;(y=z.headers["content-type"])&&(y=y.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==y){var E=z.data;var H=nc(E);H=(new mi).parse(H);var G=H.kd();H=H.zf();var I=[],J=!1,L=!1;switch(G.audio){case "aac":I.push("mp4a.40.2");J=!0;break;case "mp3":I.push("mp4a.40.34");J=!0;break;case "ac3":I.push("ac-3");J=!0;break;case "ec3":I.push("ec-3"),J=!0}switch(G.video){case "avc":H.sa?I.push(H.sa):I.push("avc1.42E01E");L=!0;break;case "hvc":H.sa?I.push(H.sa):I.push("hvc1.1.6.L93.90"),
|
|
888
|
+
L=!0}if(I.length){G=J&&!L;J=new Map;if(L){L=new tc("video/mp2t");L.i(E);E=t(L.j());for(var N=E.next();!N.done;N=E.next())N=N.value,J.set(N,N);L.h()}H={type:G?"audio":"video",mimeType:"video/mp2t",codecs:I.join(", "),language:null,height:H.height,width:H.width,channelCount:null,sampleRate:null,closedCaptions:J}}else H=null;if(A=H)return C.return(A)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"video/mp4"==y||"audio/mp4"==y||"video/iso.segment"==y)if(B=Ts(r,z.data))return C.return(B);return C.return(d)}})}
|
|
887
889
|
function et(a){if($s(a)){if(a.za==Et){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.Hb),c=Math.min(c,e.qc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.m);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.Ce(b)}}else a.l.bb(Ft(a));a.l.le()}
|
|
888
890
|
function pt(a,b){var c=(new kb(a.U)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=X(e,"NAME");var f=X(e,"VALUE");e=X(e,"QUERYPARAM");d&&f&&(a.s.has(d)||a.s.set(d,f));e&&(d=c.get(e)[0])&&!a.s.has(d)&&a.s.set(e,d)}}
|
|
889
891
|
function gt(a,b,c){c=(new kb(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=X(f,"NAME"),h=X(f,"VALUE");e=X(f,"QUERYPARAM");f=X(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.s.get(f))&&d.set(f,e)}return d}
|
|
@@ -892,7 +894,7 @@ function qt(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=X
|
|
|
892
894
|
function rt(a,b){var c,d,e,f,g,h;return K(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=X(f,"PATHWAY-ID"),h=X(f,"SERVER-URI"),g&&h){a.j=new mr(a.h);a.j.configure(a.g);a.j.j=[a.U];a.j.setManifestType("HLS");a.j.h=g;c=nr(a.j,h);break}return D(k,c,0)})}
|
|
893
895
|
function vt(a,b){var c=Bs(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Ht(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=xs(d.value,"GROUP-ID");if(d=a.I.get(e))if(e=a.J.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=It(Lb,d)||Jt(Lb)}}return b.filter(function(g){return g})}
|
|
894
896
|
function wt(a,b,c){var d,e;return K(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return K(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ta(m,2);return D(m,Kt(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=wa(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=xs(g,"URI"),k=X(g,"CODECS")||"";if(a.i.has(h))var l=a.i.get(h);else{var m=X(g,"LANGUAGE"),n=X(g,"NAME"),
|
|
895
|
-
r=X(g,"CHARACTERISTICS"),q=Lt(a,a.C++,[h],k,"image",m,!1,n,null,null,r,!1,null,!1),u=X(g,"RESOLUTION"),v=t(u?u.split("x"):[null,null]),x=v.next().value,z=v.next().value;q.stream.width=Number(x)||void 0;q.stream.height=Number(z)||void 0;var y=X(g,"BANDWIDTH");y&&(q.stream.bandwidth=Number(y));a.i.set(h,q);l=q}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(
|
|
897
|
+
r=X(g,"CHARACTERISTICS"),q=Lt(a,a.C++,[h],k,"image",m,!1,n,null,null,r,!1,null,!1),u=X(g,"RESOLUTION"),v=t(u?u.split("x"):[null,null]),x=v.next().value,z=v.next().value;q.stream.width=Number(x)||void 0;q.stream.height=Number(z)||void 0;var y=X(g,"BANDWIDTH");y&&(q.stream.bandwidth=Number(y));a.i.set(h,q);l=q}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(A){if(a.g.hls.ignoreImageStreamFailures)return null;throw A;}})),D(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
|
|
896
898
|
function Mt(a,b,c){b=b.filter(function(h){var k=X(h,"URI")||"";return"SUBTITLES"!=X(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=ws(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Ht(a,d[g],c)}
|
|
897
899
|
function ut(a,b,c,d){var e=[],f=new Set;if(0<c.length){c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=xs(g,"METHOD");if("NONE"!=h&&"AES-128"!=h&&(h=X(g,"KEYFORMAT")||"identity",g=(h=Nt[h])?h(g,""):null)){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}}c={};b=t(b);for(g=b.next();!g.done;g=b.next())g=g.value,h=ws(g),c[h]?c[h].push(g):c[h]=[g];b=[];for(var l in c){k=c[l];var m=k[0];g=X(m,"FRAME-RATE");h=Number(X(m,"AVERAGE-BANDWIDTH"))||Number(xs(m,
|
|
898
900
|
"BANDWIDTH"));var n=X(m,"RESOLUTION"),r=t(n?n.split("x"):[null,null]);n=r.next().value;r=r.next().value;var q=X(m,"VIDEO-RANGE");(m=X(m,"REQ-VIDEO-LAYOUT"))&&m.includes(",")&&(m=m.split(",").filter(function(u){return"CH-STEREO"==u||"CH-MONO"==u})[0]);m=m||"CH-MONO";k=Ot(a,k,d);b.push.apply(b,w(Pt(a,k.audio,k.video,h,n,r,g,q,m,e,f)))}return b.filter(function(u){return null!=u})}
|
|
@@ -908,14 +910,14 @@ m=n.next().value;n=n.next().value;(m=c.get(m))&&qr(a.j,l,m,n)}}c=X(h,"LANGUAGE")
|
|
|
908
910
|
function Kt(a,b){var c,d,e,f,g,h,k,l,m,n;return K(function(r){if(1==r.g){c=xs(b,"URI");d=X(b,"CODECS","jpeg")||"";if(a.i.has(c))return r.return(a.i.get(c));e=X(b,"LANGUAGE");f=X(b,"NAME");g=X(b,"CHARACTERISTICS");h=Lt(a,a.C++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=X(b,"RESOLUTION"))?D(r,h.stream.createSegmentIndex(),3):r.F(2)}2!=r.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
|
|
909
911
|
Number(m.split("x")[1]));if(n=X(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return r.return(h)})}
|
|
910
912
|
function Tt(a,b,c,d,e,f,g,h,k){for(var l=a.C++,m=[],n=t(b),r=n.next();!r.done;r=n.next()){var q=r.value;r=xs(q,"URI");q=X(q,"PATHWAY-ID");a.j&&q&&qr(a.j,l,q,r);m.push(r)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=X(b[0],"CLOSED-CAPTIONS");if("video"==d){if(b&&"NONE"!=b){b=a.H.get(b);break a}if(!b&&a.H.size)for(b=t(a.H.keys()).next();!b.done;){b=a.H.get(b.value);break a}}b=null}c=Ib(d,c);d=Lt(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,d);return d}
|
|
911
|
-
function Lt(a,b,c,d,e,f,g,h,k,l,m,n,r,q){function u(
|
|
912
|
-
if(
|
|
913
|
-
Z.ya&&(Xa=T.segmentIndex.get(0))&&Xa.g&&(x.mimeType="application/mp4");Ut(a)&&(a.Va?At(a,[y]):(a.Va=!0,Fb=Array.from(a.i.values()),lb=Fb.filter(function(mb){return mb.stream.segmentIndex}),At(a,lb),et(a),ac=a.m,0<ac&&a.u.S(ac)));F(Aa)}})}function v(){return a.j&&1<c.length?rr(a.j,b):z.concat(Fs([a.U],c,a.s))}var x=Vt(a,d,e,f,g,h,k,l,m,n,r,q),z=[],y={stream:x,type:e,Yg:z,aa:v,qc:0,Hb:0,pe:new Map,Td:!1,Sd:!1,od:!1,$e:-1,mb:-1,ob:-1,Hf:!1},
|
|
914
|
-
|
|
913
|
+
function Lt(a,b,c,d,e,f,g,h,k,l,m,n,r,q){function u(C){var E,H,G,I,J,L,N,Q,T,Z,aa,la,Na,Xa,Fb,lb,ac;return K(function(Aa){switch(Aa.g){case 1:return E=y.aa(),D(Aa,Ys(a,y.aa(),!0),2);case 2:H=Aa.h;if(C.aborted)return Aa.return();G=H.uri;G==H.originalUri||E.includes(G)||z.push(G);I=Ls(a.ea,H.data);J=void 0;if(a.Z||!a.g.hls.disableCodecGuessing){Aa.F(3);break}return D(Aa,ot(a,I,v),4);case 4:L=Aa.h,J=L.mimeType,d=L.codecs;case 3:return N=$s(a),D(Aa,xt(a,0,I,v,G,d,e,f,g,h,k,l,m,n,r,q,J),5);case 5:Q=Aa.h;
|
|
914
|
+
if(C.aborted)return Aa.return();T=Q.stream;$s(a)&&!N&&zt(a,I);y.qc=Q.qc;y.Hb=Q.Hb;y.Td=Q.Td;y.Sd=Q.Sd;y.od=Q.od;y.pe=Q.pe;y.mb=Q.mb;y.ob=Q.ob;y.Hf=!0;x.segmentIndex=T.segmentIndex;x.encrypted=T.encrypted;x.drmInfos=T.drmInfos;x.keyIds=T.keyIds;x.mimeType=T.mimeType;x.bandwidth=T.bandwidth;x.codecs=T.codecs||x.codecs;x.drmInfos.length&&a.h.newDrmInfo(x);Z=Mb;if(e==Z.ra||e==Z.W)for(aa=t(a.i.values()),la=aa.next();!la.done;la=aa.next())Na=la.value,Na.Hf||Na.type!=e||(Na.stream.mimeType=T.mimeType);e==
|
|
915
|
+
Z.ya&&(Xa=T.segmentIndex.get(0))&&Xa.g&&(x.mimeType="application/mp4");Ut(a)&&(a.Va?At(a,[y]):(a.Va=!0,Fb=Array.from(a.i.values()),lb=Fb.filter(function(mb){return mb.stream.segmentIndex}),At(a,lb),et(a),ac=a.m,0<ac&&a.u.S(ac)));F(Aa)}})}function v(){return a.j&&1<c.length?rr(a.j,b):z.concat(Fs([a.U],c,a.s))}var x=Vt(a,d,e,f,g,h,k,l,m,n,r,q),z=[],y={stream:x,type:e,Yg:z,aa:v,qc:0,Hb:0,pe:new Map,Td:!1,Sd:!1,od:!1,$e:-1,mb:-1,ob:-1,Hf:!1},A=null,B=new AbortController;x.createSegmentIndex=function(){if(A)return A;
|
|
916
|
+
B=new AbortController;return A=new Promise(function(C){C(u(B.signal))})};x.closeSegmentIndex=function(){A&&!x.segmentIndex&&B.abort();x.segmentIndex&&(x.segmentIndex.release(),x.segmentIndex=null);A=null};return y}function Ft(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.Hb));return b}
|
|
915
917
|
function bt(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&Gj(d.segmentIndex,function(e){c.push(e)});a.l.vd(c)}function At(a,b){if(!$s(a))for(var c=Ft(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Ac(0,c);bt(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?lt(a,b):nt(a,b)}
|
|
916
918
|
function Ut(a){if(!a.G)return!1;var b=[],c=[];a=t(a.G.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}
|
|
917
|
-
function xt(a,b,c,d,e,f,g,h,k,l,m,n,r,q,u,v,x){var z,y,
|
|
918
|
-
|
|
919
|
+
function xt(a,b,c,d,e,f,g,h,k,l,m,n,r,q,u,v,x){var z,y,A,B,C,E,H,G,I,J,L,N,Q,T,Z,aa,la,Na,Xa,Fb,lb,ac,Aa;return K(function(mb){if(1==mb.g){if(1!=c.type)throw new P(2,4,4017);z=As(c.g,"EXT-X-DEFINE");y=gt(a,z,e);var hb=Cs(c.g,"EXT-X-PLAYLIST-TYPE"),Gb=Cs(c.g,"EXT-X-ENDLIST");Gb=hb&&"VOD"==hb.value||Gb;hb=hb&&"EVENT"==hb.value&&!Gb;hb=!Gb&&!hb;Gb?dt(a,Xs):hb?dt(a,Et):dt(a,Wt);$s(a)&&kt(a,c);return x?mb.F(2):D(mb,Xt(a,g,f,c,y,d),3)}2!=mb.g&&(x=mb.h);A=ht(c,x);B=A.drmInfos;C=A.keyIds;E=A.encrypted;H=
|
|
920
|
+
A.xh;if(E&&!B.length&&!H)throw new P(2,4,4026);G=Vt(a,f,g,h,k,l,m,n,r,q,u,v);G.encrypted=E;G.drmInfos=B;G.keyIds=C;G.mimeType=x;I=$s(a)?a.L.get(g):new Map;J=it(a,c,G,I,y,d);L=J.segments;N=J.bandwidth;G.bandwidth=N;$s(a)&&kt(a,c);Q=L[0].startTime;T=L[L.length-1];Z=T.endTime;aa=new Fj(L);G.segmentIndex=aa;Na=(la=Cs(c.g,"EXT-X-SERVER-CONTROL"))?null!=la.getAttribute("CAN-SKIP-UNTIL"):!1;Xa=la?null!=la.getAttribute("CAN-BLOCK-RELOAD"):!1;Fb=Ds(c.g,"EXT-X-MEDIA-SEQUENCE",0);lb=jt(Fb,L);ac=lb.mb;Aa=lb.ob;
|
|
919
921
|
return mb.return({stream:G,type:g,Yg:[],aa:d,qc:Q,Hb:Z,Td:Na,Sd:Xa,od:!1,$e:-1,mb:ac,ob:Aa,pe:I,Hf:!1})})}function jt(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{mb:a,ob:c};b=b[b.length-1];var d=b.h;if(!b.h.length)return a++,b.u&&(c=0),{mb:a,ob:c};c=d.length-1;d[d.length-1].s||(a++,c=0);return{mb:a,ob:c}}
|
|
920
922
|
function Vt(a,b,c,d,e,f,g,h,k,l,m,n){var r=It(c,b)||Jt(c),q=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())q.push(u.value)}k=void 0;u=null;c==Lb?k=q.includes("public.accessibility.transcribes-spoken-dialog")&&q.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":q.includes("public.accessibility.describes-video")&&(u="visually impaired");q.length||"subtitle"!==k||q.push("subtitle");return{id:a.C++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
921
923
|
segmentIndex:null,mimeType:r,codecs:b,kind:c==Lb?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Pb(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:q,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1}}
|
|
@@ -927,16 +929,17 @@ b.getAttribute("HOLD-BACK"):null,a.$=c?Number(c.value):0);a.qa=Math.max(d,a.qa)}
|
|
|
927
929
|
function Ct(a,b,c,d,e){var f=Cs(c,"EXT-X-MAP");if(!f)return null;var g=xs(f,"URI"),h=Es(d(),g,e);g=[h.toString(),X(f,"BYTERANGE","")].join("-");if(!a.ha.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?"AES-128"==xs(m,"METHOD")&&m.id<f.id&&(k=Yt(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=Zt(h,f,l,k);a.ha.set(g,b)}return a.ha.get(g)}
|
|
928
930
|
function Zt(a,b,c,d){var e=0,f=null;b=X(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new Dh(function(){return a},e,f,null,null,null,d)}
|
|
929
931
|
function $t(a,b,c,d,e,f,g,h,k){var l=d.g,m=Cs(l,"EXTINF"),n=0,r=0,q=null;d.ub.length&&!a.D&&Ua("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var u=null;if(!a.g.hls.ignoreManifestProgramDateTime){var v=Cs(l,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(u=wg(v.value))}var x=Gh;Cs(l,"EXT-X-GAP")&&(x=2);if(!m){if(0==d.ub.length)throw new P(2,4,4024,"EXTINF");
|
|
930
|
-
if(!a.D)return null}var z=[];v=!1;var y=null,
|
|
931
|
-
(Q=X(G,"BYTERANGE"),T=t(au(I,Q)),Q=T.next().value,T=T.next().value);E.Ld=X(G,"URI");if(E.Ld){I=Gh;"YES"==X(G,"GAP")&&(I=2,
|
|
932
|
-
1].endTime;else return null;v&&(
|
|
932
|
+
if(!a.D)return null}var z=[];v=!1;var y=null,A=!1,B=!1;if(a.D&&d.ub.length){n=("video/mp4"==g.mimeType||"audio/mp4"==g.mimeType)&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var C=u,E={},H=0;H<d.ub.length;E={bd:E.bd,Ld:E.Ld},H++){var G=d.ub[H],I=0==H?c:z[z.length-1],J=0==H?e:I.endTime,L=Number(X(G,"DURATION"))||a.M;if(L){var N=J+L,Q=0,T=null;"EXT-X-PRELOAD-HINT"==G.name?(Q=(Q=X(G,"BYTERANGE-START"))?Number(Q):0,(I=X(G,"BYTERANGE-LENGTH"))?T=Q+Number(I)-1:Q&&(T=Number.MAX_SAFE_INTEGER)):
|
|
933
|
+
(Q=X(G,"BYTERANGE"),T=t(au(I,Q)),Q=T.next().value,T=T.next().value);E.Ld=X(G,"URI");if(E.Ld){I=Gh;"YES"==X(G,"GAP")&&(I=2,A=!0);E.bd=null;var Z=function(la){return function(){null==la.bd&&(la.bd=Es(h(),la.Ld,f));return la.bd}}(E);n&&0<=Q&&null!=T&&(y=Z,v=!0);J=new Fh(J,N,Z,Q,T,b,0,0,Infinity,[],"",null,C,I,k);"EXT-X-PRELOAD-HINT"==G.name&&(J.If(),B=!0);"YES"!=X(G,"INDEPENDENT")&&0<H&&J.oe();z.push(J);C&&(C+=L)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(z.length)n=z[z.length-
|
|
934
|
+
1].endTime;else return null;v&&(A||0!=z[0].cb?(v=!1,y=null):z=[]);(m=Cs(l,"EXT-X-BYTERANGE"))?(q=t(au(c,m.value)),r=q.next().value,q=q.next().value):z.length&&(r=z[0].cb,q=z[z.length-1].Ja);c="";m=null;"image"==g.type&&(c="1x1",g=Cs(l,"EXT-X-TILES"))&&(c=xs(g,"LAYOUT"),(g=X(g,"DURATION"))&&(m=Number(g)));var aa=null;b=new Fh(e,n,function(){if(y)return y();null==aa&&(aa=Es(h(),d.h,f));return aa||[]},r,q,b,0,0,Infinity,z,c,m,u,x,k,0<z.length&&!!d.h);v&&(a.Ua=!0,b.Qg(),B&&b.If());return b}
|
|
933
935
|
function au(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.Ja+1,d=c+b-1);return[c,d]}
|
|
934
|
-
function it(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Ds(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Ds(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=Cs(b.g,"EXT-X-SKIP"),n=m?Number(X(m,"SKIPPED-SEGMENTS")):0,r=l+n,q=0;$s(a)&&d.has(r)&&(q=d.get(r));var u=[],v=null;m=[];for(var x=0;x<g.length;x++){var z=g[x],y=0==x?q:v.endTime;r=l+n+x;Cs(z.g,"EXT-X-DISCONTINUITY")&&k++;var
|
|
935
|
-
b,z.g,f,e);!a.D&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.D=a.h.isLowLatencyMode());if(y=$t(a,
|
|
936
|
-
u.some(function(
|
|
936
|
+
function it(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Ds(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Ds(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=Cs(b.g,"EXT-X-SKIP"),n=m?Number(X(m,"SKIPPED-SEGMENTS")):0,r=l+n,q=0;$s(a)&&d.has(r)&&(q=d.get(r));var u=[],v=null;m=[];for(var x=0;x<g.length;x++){var z=g[x],y=0==x?q:v.endTime;r=l+n+x;Cs(z.g,"EXT-X-DISCONTINUITY")&&k++;var A=t(z.g);for(var B=A.next();!B.done;B=A.next())B=B.value,"EXT-X-KEY"==B.name&&("AES-128"==xs(B,"METHOD")?h=Yt(a,B,b,f,e):h=void 0);d.set(r,y);A=Ct(a,
|
|
937
|
+
b,z.g,f,e);!a.D&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.D=a.h.isLowLatencyMode());if(y=$t(a,A,v,z,y,e,c,f,h))(v=Ds(z.g,"EXT-X-BITRATE"))?m.push({bitrate:v,duration:y.endTime-y.startTime}):m.length&&(v=m.pop(),v.duration+=y.endTime-y.startTime,m.push(v)),v=y,y.l=k,a.g.hls.ignoreManifestProgramDateTime&&null!=a.K&&r<a.K||u.push(y)}b=void 0;m.length&&(b=m.reduce(function(C,E){return C+E.duration},0),b=Math.round(m.reduce(function(C,E){return C+E.bitrate*E.duration},0)/b*1E3));if(m=
|
|
938
|
+
u.some(function(C){return null!=C.i}))for(c={},d=0;d<u.length;c={Sc:c.Sc,Rc:c.Rc,Hd:c.Hd,Nb:c.Nb,Qc:c.Qc},d++)if(c.Nb=u[d],null==c.Nb.i)for(c.Rc=0,c.Sc=d,e=function(C){return function(){var E=u[C.Sc];if(E){if(null!=E.i)return E.i+C.Rc;C.Rc-=E.endTime-E.startTime;C.Sc+=1}return null}}(c),c.Qc=0,c.Hd=d,f=function(C){return function(){var E=u[C.Hd];if(E){E!=C.Nb&&(C.Qc+=E.endTime-E.startTime);if(null!=E.i)return E.i+C.Qc;--C.Hd}return null}}(c);null==c.Nb.i;)c.Nb.i=f(),null==c.Nb.i&&(c.Nb.i=e());if(m)for(c=
|
|
937
939
|
t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.i,e=t(e.h),f=e.next();!f.done;f=e.next())f=f.value,f.i=d,d+=f.endTime-f.startTime;a=a.T;if(m&&Infinity!=a)for(m=t(u),d=m.next();!d.done;d=m.next())d.value.jg(a);return{segments:u,bandwidth:b}}function It(a,b){if(a==Lb){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}
|
|
938
|
-
function Jt(a){return a==Lb?"text/vtt":bu[a].mp4}
|
|
939
|
-
function
|
|
940
|
+
function Jt(a){return a==Lb?"text/vtt":bu[a].mp4}
|
|
941
|
+
function Xt(a,b,c,d,e,f){var g,h,k,l,m,n,r,q,u,v,x,z,y;return K(function(A){switch(A.g){case 1:g=wf;h=Math.trunc((d.segments.length-1)/2);k=Es(f(),d.segments[h].h,e);l=new kb(k[0]);m=l.Ta.split(".").pop();n=bu[b];if((r=n[m])||(r=Bt[m])||(r=It(b,c)))return A.return(r);u=1;v=qf(k,a.g.retryParameters);ta(A,2);v.method="HEAD";return D(A,Dt(a,v,g,{type:u}),4);case 4:x=A.h;q=x.headers["content-type"];va(A,3);break;case 2:z=wa(A);if(!z||1002!=z.code){A.F(3);break}v.method="GET";return D(A,Dt(a,v,g,{type:u}),
|
|
942
|
+
6);case 6:y=A.h,q=y.headers["content-type"];case 3:return q?A.return(q.split(";")[0]):A.return(Jt(b))}})}function yt(a,b,c,d,e,f){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0)}function Ys(a,b,c){return Dt(a,qf(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
940
943
|
function Ws(a){var b,c,d,e,f,g;K(function(h){switch(h.g){case 1:if(!a.h)return h.return();ta(h,2);b=Date.now();return D(h,a.update(),4);case 4:c=Date.now();$s(a)&&(d=(c-b)/1E3,a.Na.sample(1,d),e=a.m,f=Math.max(0,e-dc(a.Na)),a.u.S(f));va(h,3);break;case 2:g=wa(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.u.S(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();F(h)}})}
|
|
941
944
|
function $s(a){return a.za!=Xs}function dt(a,b){a.za=b;a.l&&a.l.Oc(!$s(a));$s(a)||a.u.stop()}function Dt(a,b,c,d){if(!a.P)throw new P(2,7,7001);b=a.h.networkingEngine.request(c,b,d);lf(a.P,b);return b.promise}M("shaka.hls.HlsParser",Vs);
|
|
942
945
|
var Bt={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},bu={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
@@ -948,9 +951,9 @@ function pu(a){for(var b=new Uint8Array([]),c=t(a.g),d=c.next();!d.done;d=c.next
|
|
|
948
951
|
2)),[0,0]));f=mu("tkhd",f);g=mu;l=b.duration*b.timescale;h=Math.floor(l/(qu+1));l=Math.floor(l%(qu+1));k=b.stream.language;k=k.charCodeAt(0)-96<<10|k.charCodeAt(1)-96<<5|k.charCodeAt(2)-96;h=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(w(ru(b.timescale,4)),w(ru(h,4)),w(ru(l,4)),w(ru(k,2)),[0,0]));h=mu("mdhd",h);l=b;k=new Uint8Array([]);switch(l.type){case "video":k=su;break;case "audio":k=tu}l=mu("hdlr",k);a:{switch(b.type){case "video":b=mu("minf",mu("vmhd",uu),ou,vu(b));break a;
|
|
949
952
|
case "audio":b=mu("minf",mu("smhd",wu),ou,vu(b));break a}b=new Uint8Array([])}b=g("mdia",h,l,b);d=d("trak",f,b);b=jg(e,d)}d=a.g[0];c=mu;f=d.duration*d.timescale;e=Math.floor(f/(qu+1));f=Math.floor(f%(qu+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(w(ru(d.timescale,4)),w(ru(e,4)),w(ru(f,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]));e=mu("mvhd",
|
|
950
953
|
e);f=new Uint8Array([]);a=t(a.g);for(g=a.next();!g.done;g=a.next())g=new Uint8Array([0,0,0,0].concat(w(ru(g.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),g=mu("trex",g),f=jg(f,g);a=mu("mvex",f);f=new Uint8Array([]);if(d.encrypted)for(d=t(d.stream.drmInfos),g=d.next();!g.done;g=d.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())f=jg(f,h.value.initData);a=c("moov",e,b,a,f);c=new Uint8Array(lu.byteLength+a.byteLength);c.set(lu);c.set(a,lu.byteLength);return c}
|
|
951
|
-
function vu(a){var b=mu,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.
|
|
954
|
+
function vu(a){var b=mu,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.Aa.byteLength)var e=mu("avcC",a.Aa);else{e=mu;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.eb.length;n++){var r=xu(a.eb[n]);switch(r[0]&31){case 7:g.push(r);f+=r.length+2;break;case 8:h.push(r),f+=r.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
|
|
952
955
|
0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(w(ru(c,2)),w(ru(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=new Uint8Array([]);
|
|
953
|
-
a.encrypted&&(h=yu(a),d="encv");c=mu(d,c,e,h)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.
|
|
956
|
+
a.encrypted&&(h=yu(a),d="encv");c=mu(d,c,e,h)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.Aa.byteLength&&(c=mu("hvcC",a.Aa)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(w(ru(d,2)),w(ru(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=new Uint8Array([]),a.encrypted&&(h=yu(a),e="encv"),c=mu(e,d,c,h));break;
|
|
954
957
|
case "audio":if(a.codecs.includes("mp3"))a=mu(".mp3",zu(a));else if(a.codecs.includes("ac-3"))c=mu("dac3",a.ma),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=yu(a),d="enca"),a=mu(d,zu(a),c,e);else if(a.codecs.includes("ec-3"))c=mu("dec3",a.ma),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=yu(a),d="enca"),a=mu(d,zu(a),c,e);else{if(0<a.ma.byteLength)c=mu("esds",a.ma);else{c=mu;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Ib("audio",a.codecs.split(","));l={96E3:0,88200:1,
|
|
955
958
|
64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(w(ru(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=yu(a),d="enca");a=mu(d,zu(a),c,e)}c=a}a=mu("stsd",Au,c);return b("stbl",a,mu("stts",Bu),mu("stsc",Cu),mu("stsz",Du),mu("stco",Eu))}
|
|
956
959
|
function zu(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(w(ru(a.stream.audioSamplingRate||44100,2)),[0,0]))}
|
|
@@ -966,23 +969,23 @@ function Ju(a){var b;K(function(c){switch(c.g){case 1:return ta(c,2),D(c,Ku(a),4
|
|
|
966
969
|
p.update=function(){var a=this,b;return K(function(c){if(1==c.g)return ta(c,2),D(c,Ku(a),4);if(2!=c.g)return va(c,0);b=wa(c);if(!a.h||!b)return c.return();a.h.onError(b);F(c)})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(){};
|
|
967
970
|
function Ku(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=qf(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),lf(a.C,e),D(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=Hg(f.data,"SmoothStreamingMedia");if(!m)throw new P(2,4,4046,l);(l=a.g.mss.manifestPreprocessor)&&l(m);a.i||(a.i=new jj(null,0));if(l=vg(m,"IsLive",Dg,!1))throw new P(2,4,4047);a.i.Oc(!l);var n=vg(m,"TimeScale",Bg,1E7),
|
|
968
971
|
r=vg(m,"DVRWindowLength",Bg);l&&(0===r||isNaN(r))&&(r=Infinity);var q=vg(m,"CanSeek",Dg,!1);0===r&&q&&(r=Infinity);q=null;r&&0<r&&(q=r/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(q=a.g.availabilityWindowOverride);null==q&&(q=Infinity);a.i.Ce(q);r=vg(m,"Duration",Bg,Infinity);l||a.i.bb(r/n);l={variants:[],textStreams:[],timescale:n,duration:r/n};q=ng(m,"Protection");var u;n=a.g.mss.keySystemsBySystemId;r=[];q=t(q);for(u=q.next();!u.done;u=q.next())r=r.concat(ng(u.value,"ProtectionHeader"));if(r.length){q=
|
|
969
|
-
[];for(u=0;u<r.length;u++){var v=r[u],x=v.getAttribute("SystemID").toLowerCase(),z=n[x];if(z){var y=eu(v);if(y)a:{y=t(y.getElementsByTagName("DATA"));for(var
|
|
970
|
-
z(v);q.push(x)}}n=q}else n=[];u=n;q=[];n=[];r=[];m=ng(m,"StreamIndex");m=t(m);for(v=m.next();!v.done;v=m.next()){v=v.value;z=ng(v,"QualityLevel");x=l.timescale;y=l.duration;
|
|
971
|
-
|
|
972
|
-
language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!y&&y.primary,audio:u,video:y,bandwidth:
|
|
972
|
+
[];for(u=0;u<r.length;u++){var v=r[u],x=v.getAttribute("SystemID").toLowerCase(),z=n[x];if(z){var y=eu(v);if(y)a:{y=t(y.getElementsByTagName("DATA"));for(var A=y.next();!A.done;A=y.next())if(A=mg(A.value,"KID")){y=fg(A.textContent);y=new Uint8Array([y[3],y[2],y[1],y[0],y[5],y[4],y[7],y[6]].concat(w(y.slice(8))));y=ig(y);break a}y=null}else y=null;A=fg(v.textContent);x=gg(x.replace(/-/g,""));x=[{initData:lg(A,x,new Set,0),initDataType:"cenc",keyId:y}];x=Hb(z,x);y&&x.keyIds.add(y);if(z=gu.get(z))x.licenseServerUri=
|
|
973
|
+
z(v);q.push(x)}}n=q}else n=[];u=n;q=[];n=[];r=[];m=ng(m,"StreamIndex");m=t(m);for(v=m.next();!v.done;v=m.next()){v=v.value;z=ng(v,"QualityLevel");x=l.timescale;y=l.duration;A=ng(v,"c");for(var B=[],C=0,E=0;E<A.length;++E){var H=A[E],G=A[E+1],I=vg(H,"t",Bg),J=vg(H,"d",Bg);H=vg(H,"r",zg);if(!J)break;I=null!=I?I:C;H=H||0;if(0>H)if(G){G=vg(G,"t",Bg);if(null==G)break;else if(I>=G)break;H=Math.ceil((G-I)/J)-1}else{if(Infinity==y)break;else if(I/x>=y)break;H=Math.ceil((y*x-I)/J)-1}for(G=0;G<=H;++G)C=I+J,
|
|
974
|
+
B.push({start:I/x,end:C/x,qg:I}),I=C}x=B;z=t(z);for(y=z.next();!y.done;y=z.next())(y=Lu(a,v,y.value,x,u,l))&&("audio"!=y.type||a.g.disableAudio?"video"!=y.type||a.g.disableVideo?y.type!=Lb||a.g.disableText||r.push(y):n.push(y):q.push(y))}m=[];q=t(0<q.length?q:[null]);for(u=q.next();!u.done;u=q.next())for(u=u.value,v=t(0<n.length?n:[null]),y=v.next();!y.done;y=v.next())z=m,x=z.push,y=y.value,A=0,u&&u.bandwidth&&0<u.bandwidth&&(A+=u.bandwidth),y&&y.bandwidth&&0<y.bandwidth&&(A+=y.bandwidth),y={id:a.u++,
|
|
975
|
+
language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!y&&y.primary,audio:u,video:y,bandwidth:A,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},x.call(z,y);l.variants=m;l.textStreams=r;a.j?(a.j.variants=l.variants,a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,
|
|
973
976
|
type:"MSS",serviceDescription:null},a.i.le());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.D.sample(1,h);F(k)})}
|
|
974
977
|
function Lu(a,b,c,d,e,f){var g=b.getAttribute("Type");if("audio"!==g&&"video"!==g&&"text"!==g)return Ua("Ignoring unrecognized type:",g),null;var h=b.getAttribute("Language"),k=a.u++,l=vg(c,"Bitrate",Ag),m=vg(c,"MaxWidth",Ag),n=vg(c,"MaxHeight",Ag),r=vg(c,"Channels",Ag),q=vg(c,"SamplingRate",Ag),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.bb(Math.min(u,v));var x={id:k,originalId:b.getAttribute("Name")||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
975
978
|
closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:Pb(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:r,audioSamplingRate:q,spatialAudio:!1,closedCaptions:null,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],
|
|
976
979
|
mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1};if(e=b.getAttribute("Subtype"))(e=Mu[e])&&x.roles.push(e),"main"===e&&(x.primary=!0);e=c.getAttribute("FourCC");if(null===e||""===e)e=b.getAttribute("FourCC");if(!e)if("audio"===g)e="AAC";else if("video"===g)return Ua('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!Nu.includes(e.toUpperCase()))return Ua("Codec not supported:",
|
|
977
980
|
e),null;c=Ou(c,g,e,x);x.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Ua("Quality unsupported without CodecPrivateData",g),null;x.type="audio";x.mimeType="mss/audio/mp4";x.codecs=Pu(e,c);break;case "video":if(!c)return Ua("Quality unsupported without CodecPrivateData",g),null;x.type="video";x.mimeType="mss/video/mp4";x.codecs=Qu(c);break;case "text":if(x.type=Lb,x.mimeType="application/mp4","TTML"===e||"DFXP"===e)x.codecs="stpp"}x.createSegmentIndex=function(){if(x.segmentIndex)return Promise.resolve();
|
|
978
|
-
if(a.m.has(x.id))var z=a.m.get(x.id);else z=[],"video"==x.type&&(z=x.mssPrivateData.codecPrivateData.split("00000001").slice(1)),z={id:x.id,type:x.type,codecs:x.codecs,encrypted:x.encrypted,timescale:x.mssPrivateData.timescale,duration:x.mssPrivateData.duration,eb:z,ma:new Uint8Array([]),
|
|
981
|
+
if(a.m.has(x.id))var z=a.m.get(x.id);else z=[],"video"==x.type&&(z=x.mssPrivateData.codecPrivateData.split("00000001").slice(1)),z={id:x.id,type:x.type,codecs:x.codecs,encrypted:x.encrypted,timescale:x.mssPrivateData.timescale,duration:x.mssPrivateData.duration,eb:z,ma:new Uint8Array([]),Aa:new Uint8Array([]),data:null,stream:x},z=pu(new hu([z])),a.m.set(x.id,z);z=Ru(a,new Dh(function(){return[]},0,null,null,void 0,z),x,b,d);x.segmentIndex=new Fj(z);return Promise.resolve()};x.closeSegmentIndex=function(){x.segmentIndex&&
|
|
979
982
|
(x.segmentIndex.release(),x.segmentIndex=null)};return x}
|
|
980
983
|
function Ou(a,b,c,d){if(a=a.getAttribute("CodecPrivateData"))return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|
|
|
981
984
|
b<<3;b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function Pu(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function Qu(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
982
985
|
function Ru(a,b,c,d,e){var f=d.getAttribute("Url").replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={$c:g.$c},h=e.next())g.$c=h.value,d.push(new Fh(g.$c.start,g.$c.end,function(k){return function(){return Eb(a.l,[f.replace("{start time}",String(k.$c.qg))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}M("shaka.mss.MssParser",Iu);var Nu="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Mu={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
983
986
|
yh["application/vnd.ms-sstr+xml"]=function(){return new Iu};function Su(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Nf(b)}catch(g){}throw new P(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Tu(){}function Uu(a,b,c,d,e){var f=new Vu;Gf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Wu,h={xg:!1,mh:!1};a=Xu(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new af(a,function(){h.xg=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new xd(function(){h.mh=!0;g.abort()});k.S(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
984
|
-
function Xu(a,b,c,d,e,f,g){var h,k,l,m,n,r,q,u,v,x,z,y,
|
|
985
|
-
H.value.byteLength;if(!g){I.F(5);break}return D(I,g(H.value),5);case 5:G=Date.now();if(100<G-q||H.done)e(G-q,n-r,x-n),r=n,q=G;H.done?
|
|
987
|
+
function Xu(a,b,c,d,e,f,g){var h,k,l,m,n,r,q,u,v,x,z,y,A;return K(function(B){switch(B.g){case 1:return h=Yu,k=Zu,r=n=0,q=Date.now(),ta(B,2),D(B,h(a,c),4);case 4:l=B.h;f($u(l.headers));if("HEAD"==c.method){B.F(5);break}u=l.clone().body.getReader();x=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;z=function(C){function E(){var H,G;return K(function(I){switch(I.g){case 1:return ta(I,2),D(I,u.read(),4);case 4:H=I.h;va(I,3);break;case 2:return wa(I),I.return();case 3:if(H.done){I.F(5);break}n+=
|
|
988
|
+
H.value.byteLength;if(!g){I.F(5);break}return D(I,g(H.value),5);case 5:G=Date.now();if(100<G-q||H.done)e(G-q,n-r,x-n),r=n,q=G;H.done?C.close():(C.enqueue(H.value),E());F(I)}})}E()};new k({start:z});return D(B,l.arrayBuffer(),6);case 6:m=B.h;case 5:va(B,3);break;case 2:y=wa(B);if(d.xg)throw new P(1,1,7001,a,b);if(d.mh)throw new P(1,1,1003,a,b);throw new P(1,1,1002,a,y,b);case 3:return A=$u(l.headers),B.return(Su(A,m,l.status,a,l.url,b))}})}
|
|
986
989
|
function $u(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function av(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",Tu);Tu.isSupported=av;Tu.parse=Uu;var Yu=window.fetch,Wu=window.AbortController,Zu=window.ReadableStream,Vu=window.Headers;
|
|
987
990
|
av()&&(nf("http",Uu,2,!0),nf("https",Uu,2,!0),nf("blob",Uu,2,!0));function bv(){}
|
|
988
991
|
function cv(a,b,c,d,e){var f=new dv,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new P(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var q=ev(f);e(q);n=!0}};f.onload=function(){var q=ev(f),u=f.response;try{var v=Su(q,u,f.status,a,f.responseURL,c);l(v)}catch(x){m(x)}};f.onerror=function(q){m(new P(1,1,1002,a,q,
|
|
@@ -1029,22 +1032,22 @@ p.start=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){
|
|
|
1029
1032
|
p.update=function(){};
|
|
1030
1033
|
p.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return d=c.g,e=new Bv,ta(m,2,3),D(m,e.init(),5);case 5:return D(m,Fv(e,d.kb(),d.Oa()),6);case 6:return f=m.h,D(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.F(3);break}return D(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),D(m,e.destroy(),10);case 10:ya(m,0);break;case 2:wa(m),m.F(3)}})};
|
|
1031
1034
|
p.onInitialVariantChosen=function(){};p.banLocation=function(){};yh["application/x-offline-manifest"]=function(){return new bw};function cw(){}function dw(a){var b=Vv(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=df(a)):a=b&&"segment"==b.g?ew(b.key(),b):bf(new P(2,1,9004,a));return a}
|
|
1032
|
-
function ew(a,b){var c=new Bv;return df(void 0).
|
|
1035
|
+
function ew(a,b){var c=new Bv;return df(void 0).Ca(function(){return c.init()}).Ca(function(){return Fv(c,b.kb(),b.Oa())}).Ca(function(d){return d.getSegments([b.key()])}).Ca(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}M("shaka.offline.OfflineScheme",cw);cw.plugin=dw;nf("offline",dw);function fw(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),r=n.next();!r.done;r=n.next()){r=r.value;for(var q=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,gw(v.info,r)){v.sessionIds.push(r.sessionId);q=!0;break}q||m.push({info:r,sessionIds:[r.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.F(4);break}g=f.value;h=hw(a,b,g);return D(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.F(2);break;case 4:return l.return(d)}})}
|
|
1033
1036
|
function hw(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new Ig({rc:b,onError:function(){},we:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ta(f,2),d.configure(a),D(f,Qg(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return wa(f),D(f,d.destroy(),5);case 5:return f.return([]);case 3:return ta(f,6),D(f,ah(d),8);case 8:va(f,7);break;case 6:return wa(f),D(f,d.destroy(),
|
|
1034
1037
|
9);case 9:return f.return([]);case 7:return e=[],D(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==h.g)return ta(h,2),D(h,bh(d,g),4);if(2!=h.g)return e.push(g),va(h,0);wa(h);F(h)})})),10);case 10:return D(f,d.destroy(),11);case 11:return f.return(e)}})}
|
|
1035
1038
|
function gw(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&yc(a.audioCapabilities,b.audioCapabilities,c)&&yc(a.videoCapabilities,b.videoCapabilities,c)};function iw(a,b,c){var d=b.presentationTimeline.getDuration();b=jw(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function kw(a,b){var c=Xv(new Wv(a.kb(),a.Oa()),b),d=b.appMetadata||{};c=jw(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}}
|
|
1036
1039
|
function jw(a){var b=[],c=qe(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(he(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ie(c.value));return b};function lw(){this.g={}}function mw(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 nw(a,b){a.g[b.id]=b.bandwidth||2048}function ow(a,b){a=a.g[b];null==a&&(a=0);return a};function pw(a){var b=this;if(a&&a.constructor!=V)throw new P(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Tb()):(this.h=Jl(),this.g=new mf);this.i=[];this.j=[];var c=!a;this.l=new yf(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return D(k,Promise.all(b.j.map(function(l){return lv(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 D(k,Promise.all(e),3);case 3:if(!c){k.F(4);break}return D(k,b.g.destroy(),4);
|
|
1037
1040
|
case 4:b.h=null,b.g=null,F(k)}})})}function qw(){if(yd())a:{var a=t(Cv.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}p=pw.prototype;p.destroy=function(){return this.l.destroy()};p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=zl(a,b));return Ll(this.h,a)};p.getConfiguration=function(){var a=Jl();Ll(a,this.h,Jl());return a};p.Tb=function(){return this.g};
|
|
1038
1041
|
p.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new kv(this.g);this.j.push(f);b=rw(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return c?h.F(2):D(h,Lk(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=xh(a,c||null);return h.return(g())})},e,f);b=new af(b,function(){return lv(f)});b.finally(function(){xc(d.j,f)});return sw(this,b)};
|
|
1039
|
-
function rw(a,b,c,d,e,f){var g,h,k,l,m,n,r,q,u,v,x,z,y,
|
|
1040
|
-
r,b,c,e,f),v=u.Ei,x=u.lg,D(
|
|
1041
|
-
function zw(a,b,c,d,e,f,g,h,k){var l,m,n,r,q,u,v,x,z,y;return K(function(
|
|
1042
|
-
pv(e),2)}if(!
|
|
1043
|
-
wa(
|
|
1042
|
+
function rw(a,b,c,d,e,f){var g,h,k,l,m,n,r,q,u,v,x,z,y,A;return K(function(B){switch(B.g){case 1:return tw(),h=g=null,k=new Bv,n=m=l=null,ta(B,2,3),D(B,d(),5);case 5:return g=B.h,D(B,uw(a,b,g,e),6);case 6:r=B.h;vw(a);q=!r.presentationTimeline.R()&&!r.presentationTimeline.mc();if(!q)throw new P(2,9,9005,b);return D(B,ww(a,r,function(C){n=n||C},e),7);case 7:h=B.h;vw(a);if(n)throw n;return D(B,xw(r,h,e),8);case 8:return D(B,k.init(),9);case 9:return vw(a),D(B,Dv(k),10);case 10:return l=B.h,vw(a),u=yw(h,
|
|
1043
|
+
r,b,c,e,f),v=u.Ei,x=u.lg,D(B,l.Oa.addManifests([v]),11);case 11:z=B.h;vw(a);m=z[0];vw(a);if(n)throw n;return D(B,zw(a,x,m,v,f,e,l.Oa,r,h),12);case 12:return vw(a),y=new Uv("manifest",l.path.kb,l.path.Oa,m),B.return(kw(y,v));case 3:return xa(B),D(B,k.destroy(),13);case 13:if(!g){B.F(14);break}return D(B,g.stop(),14);case 14:if(!h){B.F(16);break}return D(B,h.destroy(),16);case 16:ya(B,0);break;case 2:A=wa(B);if(null==m){B.F(18);break}return D(B,Aw(m),18);case 18:throw n||A;}})}
|
|
1044
|
+
function zw(a,b,c,d,e,f,g,h,k){var l,m,n,r,q,u,v,x,z,y;return K(function(A){switch(A.g){case 1:l={};m=0;n=function(B,C){var E,H,G,I,J,L,N;return K(function(Q){if(1==Q.g){E={};H=t(B);for(G=H.next();!G.done;E={cc:E.cc},G=H.next())E.cc=G.value,I=hv(E.cc,f),J=E.cc.i,L=E.cc.h,N=function(T){return function(Z){var aa,la,Na;return K(function(Xa){if(1==Xa.g)return D(Xa,g.addSegments([{data:Z}]),2);aa=Xa.h;vw(a);la=T.cc.g;Na=gv(la);l[Na]=aa[0];m+=Z.byteLength;F(Xa)})}}(E),nv(e,E.cc.groupId,I,J,L,N);return D(Q,
|
|
1045
|
+
pv(e),2)}if(!C)return Q.F(0);vw(a);Bw(h,d,k,f);return D(Q,g.updateManifest(c,d),0)})};r=!1;ta(A,2);if(!Cw(h)||!r||Dw(h)){A.F(4);break}return D(A,n(b.filter(function(B){return B.h}),!0),5);case 5:return vw(a),b=b.filter(function(B){return!B.h}),q=l,u=m,l={},m=0,D(A,Ew(g,c,d,q,u,function(){return vw(a)}),6);case 6:vw(a);case 4:if(r){A.F(7);break}return D(A,n(b,!1),8);case 8:return vw(a),v=l,x=m,l={},m=0,D(A,Ew(g,c,d,v,x,function(){return vw(a)}),9);case 9:vw(a);case 7:va(A,0);break;case 2:return z=
|
|
1046
|
+
wa(A),y=Object.values(l),D(A,g.removeSegments(y,function(){}),10);case 10:throw z;}})}function Aw(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new Bv,D(f,b.init(),2);case 2:return D(f,Dv(b),3);case 3:return c=f.h,d=new Uv("manifest",c.path.kb,c.path.Oa,a),D(f,b.destroy(),4);case 4:return e=new pw,D(f,e.remove(d.toString()),0)}})}
|
|
1044
1047
|
function Ew(a,b,c,d,e,f){var g,h,k,l,m,n,r,q,u,v,x;return K(function(z){switch(z.g){case 1:g=!1;ta(z,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),r=n.next();!r.done;r=n.next())q=r.value,u=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=u&&(q.dataKey=u,q.pendingSegmentRefId=void 0),u=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=u&&(q.initSegmentKey=u,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
|
|
1045
1048
|
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return D(z,a.updateManifest(b,c),4);case 4:g=!0;f();va(z,0);break;case 2:return v=wa(z),D(z,Aw(b),5);case 5:if(g){z.F(6);break}x=Object.values(d);return D(z,a.removeSegments(x,function(){}),6);case 6:throw v;}})}
|
|
1046
|
-
function xw(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,
|
|
1047
|
-
for(v=u.next();!v.done;v=u.next())x=v.value,e.push(je(x));return D(Z,c.offline.trackSelectionCallback(e),3);case 3:z=Z.h;y=a.presentationTimeline.getDuration();
|
|
1049
|
+
function xw(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A,B,C,E,H,G,I,J,L,N,Q,T;return K(function(Z){switch(Z.g){case 1:return d={width:Infinity,height:Infinity},Rd(a,c.restrictions,d),D(Z,Ud(b,a,c.offline.usePersistentLicense),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Pd(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(he(m));n=t(a.textStreams);for(r=n.next();!r.done;r=n.next())q=r.value,e.push(ie(q));u=t(a.imageStreams);
|
|
1050
|
+
for(v=u.next();!v.done;v=u.next())x=v.value,e.push(je(x));return D(Z,c.offline.trackSelectionCallback(e),3);case 3:z=Z.h;y=a.presentationTimeline.getDuration();A=0;B=t(z);for(C=B.next();!C.done;C=B.next())E=C.value,H=E.bandwidth*y/8,A+=H;ta(Z,4);return D(Z,c.offline.downloadSizeCallback(A),6);case 6:G=Z.h;if(!G)throw new P(2,9,9014);va(Z,5);break;case 4:I=wa(Z);if(I instanceof P)throw I;throw new P(2,9,9015);case 5:J=new Set;L=new Set;N=new Set;Q=t(z);for(C=Q.next();!C.done;C=Q.next())T=C.value,"variant"==
|
|
1048
1051
|
T.type&&J.add(T.id),"text"==T.type&&L.add(T.id),"image"==T.type&&N.add(T.id);a.variants=a.variants.filter(function(aa){return J.has(aa.id)});a.textStreams=a.textStreams.filter(function(aa){return L.has(aa.id)});a.imageStreams=a.imageStreams.filter(function(aa){return N.has(aa.id)});Fw(a);F(Z)}})}
|
|
1049
1052
|
function yw(a,b,c,d,e,f){var g=iw(c,b,d),h=e.offline.progressCallback;mv(f,function(q,u){g.size=u;h(g,q)},function(q,u){k&&e.offline.usePersistentLicense&&l==u&&Yg(a,"cenc",q)});var k=Cw(b)&&!Dw(b),l=null;k&&(l=Gw.get(a.g.keySystem));for(var m=new lw,n=t(b.textStreams),r=n.next();!r.done;r=n.next())m.g[r.value.id]=52;n=t(b.imageStreams);for(r=n.next();!r.done;r=n.next())nw(m,r.value);r=t(b.variants);for(n=r.next();!n.done;n=r.next())mw(m,n.value);m=Hw(f,m,b,e);f=m.streams;m=m.lg;r=a.g;n=e.offline.usePersistentLicense;
|
|
1050
1053
|
r&&n&&(r.initData=[]);return{Ei:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.md(),streams:f,sessionIds:n?hh(a):[],drmInfo:r,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},lg:m}}function Cw(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
@@ -1071,10 +1074,10 @@ function Zw(){cb.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa(Zw,cb);
|
|
|
1071
1074
|
function hx(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
|
|
1072
1075
|
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",ix);document.addEventListener("webkitfullscreenerror",ix);document.addEventListener("mozfullscreenchange",ix);document.addEventListener("mozfullscreenerror",ix);document.addEventListener("MSFullscreenChange",ix);document.addEventListener("MSFullscreenError",ix)}}
|
|
1073
1076
|
function ix(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}Uw.Fullscreen=gx;gx.install=hx;Xw(hx);function jx(){}function kx(){var a=!0;if(Id()||Dd("PlayStation 5")||Jd()||Dd("Web0S")||Ed()||Dd("CrKey")||Dd("PC=EOS")||Dd("Hisense")||Dd("VIDAA"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),lx=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=mx)}
|
|
1074
|
-
function mx(a){var b,c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,
|
|
1075
|
-
c.transferFunction&&(
|
|
1076
|
-
if(!a.keySystemConfiguration)return b.supported=!0,
|
|
1077
|
-
u);y=(a.video?a.video.contentType:"")+"#"+(a.audio?a.audio.contentType:"")+"#"+a.keySystemConfiguration.keySystem;ta(
|
|
1077
|
+
function mx(a){var b,c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A;return K(function(B){switch(B.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return B.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!yd())return B.return(b);if(c){if(Dd("CrKey"))if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var C=c.contentType;c.width&&c.height&&(C+="; width="+c.width+"; height="+c.height);c.framerate&&(C+="; framerate="+c.framerate);"pq"===
|
|
1078
|
+
c.transferFunction&&(C+="; eotf=smpte2084");e=cast.__platform__.canDisplayType(C)}else e=fc(c.contentType);else Ed()?(f=c.contentType,c.width&&c.height&&(f+="; width="+c.width,f+="; height="+c.height),c.framerate&&(f+="; framerate="+c.framerate),c.bitrate&&(f+="; bitrate="+c.bitrate),e=fc(f)):e=fc(c.contentType);if(!e)return B.return(b)}if(d&&(g=d.contentType,h=fc(g),!h))return B.return(b)}else if("file"==a.type){if(c&&(k=c.contentType,l=zd(k),!l)||d&&(m=d.contentType,n=zd(m),!n))return B.return(b)}else return B.return(b);
|
|
1079
|
+
if(!a.keySystemConfiguration)return b.supported=!0,B.return(Promise.resolve(b));r=a.keySystemConfiguration;q=[];u=[];r.audio&&(v={robustness:r.audio.robustness||"",contentType:a.audio.contentType},q.push(v));r.video&&(x={robustness:r.video.robustness||"",contentType:a.video.contentType},u.push(x));z={initDataTypes:[r.initDataType],distinctiveIdentifier:r.distinctiveIdentifier,persistentState:r.persistentState,sessionTypes:r.sessionTypes};q.length&&(z.audioCapabilities=q);u.length&&(z.videoCapabilities=
|
|
1080
|
+
u);y=(a.video?a.video.contentType:"")+"#"+(a.audio?a.audio.contentType:"")+"#"+a.keySystemConfiguration.keySystem;ta(B,3);if(y in nx){A=nx[y];B.F(5);break}return D(B,navigator.requestMediaKeySystemAccess(r.keySystem,[z]),6);case 6:A=B.h,nx[y]=A;case 5:va(B,4);break;case 3:wa(B);case 4:A&&(b.supported=!0,b.keySystemAccess=A);case 2:return B.return(b)}})}Uw.MediaCapabilities=jx;jx.install=kx;var lx=null;jx.originalMcap=lx;var nx={};jx.memoizedMediaKeySystemAccessRequests_=nx;Xw(kx,-1);function ox(){}function px(){var a=Kd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?qx():a?10>=a?window.MediaSource=null:12>=a?(rx(),sx()):15>=a&&rx():Bd()?tx():(Gd()||Fd()||Dd("Tizen 4"))&&ux());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&vx()}
|
|
1078
1081
|
function rx(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ga.apply(0,arguments));b.abort=function(){};return b}}function sx(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function tx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}
|
|
1079
1082
|
function ux(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=id(b)[0]&&a(b)}}function qx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
|
|
1080
1083
|
function vx(){var a=MediaSource.isTypeSupported;Dd("Web0S")||(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)})}Uw.MediaSource=ox;ox.install=px;Xw(px);function wx(){}function xx(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?yx():void 0!=window.orientation&&zx())}function yx(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
|
|
@@ -1118,9 +1121,9 @@ g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{ec:parseInt(l[1],10),rows:parseInt(l[2],
|
|
|
1118
1121
|
null!=z&&(q.width=Number(z[1]),q.height=Number(z[2]),y||(null!=v&&(q.width=100*q.width/v),null!=x&&(q.height=100*q.height/x)),q.widthUnits=y||null!=v?Tc:0,q.heightUnits=y||null!=x?Tc:0);if(u=Ty(u,h,"origin"))z=(y=Ry.exec(u))||Sy.exec(u),null!=z&&(q.viewportAnchorX=Number(z[1]),q.viewportAnchorY=Number(z[2]),y||(null!=x&&(q.viewportAnchorY=100*q.viewportAnchorY/x),null!=v&&(q.viewportAnchorX=100*q.viewportAnchorX/v)),q.viewportAnchorUnits=y||null!=v?Tc:0)}else q=null;q&&k.push(q)}if(ng(d,"p").length)throw new P(2,
|
|
1119
1122
|
2,2001,"<p> can only be inside <div> in TTML");n=t(ng(d,"div"));for(r=n.next();!r.done;r=n.next())if(ng(r.value,"span").length)throw new P(2,2,2001,"<span> can only be inside <p> in TTML");if(b=Uy(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
|
|
1120
1123
|
function Uy(a,b,c,d,e,f,g,h,k,l,m,n){var r=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var q=document.createElement("span");q.textContent=a.textContent}else q=a;for(var u=null,v=t(Vy),x=v.next();!x.done&&!(u=Wy(q,"backgroundImage",d,"#",x.value)[0]);x=v.next());v=null;var z=sg(q,Vy,"backgroundImage");n&&z&&!z.startsWith("#")&&(x=new kb(n),z=new kb(z),(x=x.resolve(z).toString())&&(v=x));if("p"==a.nodeName||u||v)m=!0;a=m;x="default"==(q.getAttribute("xml:space")||
|
|
1121
|
-
(h?"default":"preserve"));z=Array.from(q.childNodes).every(function(
|
|
1122
|
-
y.end,r=r.parentNode;null==n&&(n=0);n+=b.periodStart;y=null==y?Infinity:y+b.periodStart;n=Math.max(n,b.segmentStart);y=Math.min(y,b.segmentEnd);if(!
|
|
1123
|
-
if(q.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var
|
|
1124
|
+
(h?"default":"preserve"));z=Array.from(q.childNodes).every(function(C){return C.nodeType==Node.TEXT_NODE});h=[];if(!z)for(var y=t(q.childNodes),A=y.next();!A.done;A=y.next())(A=Uy(A.value,b,c,d,e,f,g,x,k,q,m,n))&&h.push(A);d=null!=l;n=/\S/.test(q.textContent);A=q.hasAttribute("begin")||q.hasAttribute("end")||q.hasAttribute("dur");if(!(A||n||"br"==q.tagName||0!=h.length||d&&!x))return null;y=Xy(q,c);n=y.start;for(y=y.end;r&&r.nodeType==Node.ELEMENT_NODE&&"tt"!=r.tagName;)y=Yy(r,c,n,y),n=y.start,y=
|
|
1125
|
+
y.end,r=r.parentNode;null==n&&(n=0);n+=b.periodStart;y=null==y?Infinity:y+b.periodStart;n=Math.max(n,b.segmentStart);y=Math.min(y,b.segmentEnd);if(!A&&0<h.length)for(n=Infinity,y=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),y=Math.max(y,c.endTime);if("br"==q.tagName)return e=new Ac(n,y,""),e.lineBreak=!0,e;b="";z&&(b=q.textContent,x&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new Ac(n,y,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Wy(q,"region",f,"")[0];
|
|
1126
|
+
if(q.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var B=k.getAttribute("xml:id");b.region=g.filter(function(C){return C.id==B})[0]}g=k;l&&d&&!q.getAttribute("region")&&!q.getAttribute("style")&&(g=Wy(l,"region",f,"")[0]);Zy(b,q,g,u,v,e,a,0==h.length);return b}
|
|
1124
1127
|
function Zy(a,b,c,d,e,f,g,h){g=g||h;"rtl"==$y(b,c,f,"direction",g)&&(a.direction="rtl");h=$y(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Ec);(h=$y(b,c,f,"textAlign",!0))?(a.positionAlign=az[h],a.lineAlign=bz[h],a.textAlign=Nc[h.toUpperCase()]):a.textAlign=Dc;if(h=$y(b,c,f,"displayAlign",!0))a.displayAlign=Oc[h.toUpperCase()];if(h=$y(b,c,f,"color",g))a.color=h;if(h=$y(b,c,f,"backgroundColor",
|
|
1125
1128
|
g))a.backgroundColor=h;if(h=$y(b,c,f,"border",g))a.border=h;if(h=$y(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h}(h=$y(b,c,f,"fontWeight",g))&&
|
|
1126
1129
|
"bold"==h&&(a.fontWeight=700);h=$y(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=$y(b,c,f,"lineHeight",g))&&h.match(cz)&&(a.lineHeight=h);(h=$y(b,c,f,"fontSize",g))&&(h.match(cz)||h.match(dz))&&(a.fontSize=h);if(h=$y(b,c,f,"fontStyle",g))a.fontStyle=Sc[h.toUpperCase()];d?(e=d.getAttribute("imageType")||d.getAttribute("imagetype"),h=d.getAttribute("encoding"),d=d.textContent.trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=e);if(d=$y(b,
|
|
@@ -1157,7 +1160,7 @@ b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Cc);else if(d=/^regio
|
|
|
1157
1160
|
function zz(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function rz(a){a=Is(a,vz);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}
|
|
1158
1161
|
function wz(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}M("shaka.text.VttTextParser",qz);qz.prototype.parseMedia=qz.prototype.parseMedia;qz.prototype.setManifestType=qz.prototype.setManifestType;qz.prototype.setSequenceMode=qz.prototype.setSequenceMode;qz.prototype.parseInit=qz.prototype.parseInit;
|
|
1159
1162
|
var vz=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;nd["text/vtt"]=function(){return new qz};nd['text/vtt; codecs="vtt"']=function(){return new qz};nd['text/vtt; codecs="wvtt"']=function(){return new qz};function Az(){this.g=null}Az.prototype.parseInit=function(a){var b=this,c=!1;(new Tf).box("moov",Yf).box("trak",Yf).box("mdia",Yf).V("mdhd",function(d){d=Xh(d.reader,d.version);b.g=d.timescale}).box("minf",Yf).box("stbl",Yf).V("stsd",$f).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new P(2,2,2008);if(!c)throw new P(2,2,2008);};Az.prototype.setSequenceMode=function(){};Az.prototype.setManifestType=function(){};
|
|
1160
|
-
Az.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new P(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Tf).box("moof",Yf).box("traf",Yf).V("tfdt",function(
|
|
1163
|
+
Az.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new P(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Tf).box("moof",Yf).box("traf",Yf).V("tfdt",function(A){g=!0;c=Wh(A.reader,A.version).baseMediaDecodeTime}).V("tfhd",function(A){l=Uh(A.reader,A.flags).Eg}).V("trun",function(A){h=!0;d=Yh(A.reader,A.version,A.flags).$g}).box("mdat",bg(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new P(2,2,2008);a=c;for(var m=new Qf(e,0),n=t(d),r=n.next();!r.done;r=n.next()){r=
|
|
1161
1164
|
r.value;var q=r.Yf||l,u=r.ze?c+r.ze:a;a=u+(q||0);var v=0;do{var x=m.N();v+=x;var z=m.N(),y=null;"vttc"==Xf(z)?8<x&&(y=m.Jb(x-8)):m.skip(x-8);q&&y&&(x=Bz(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(x))}while(r.sampleSize&&v<r.sampleSize)}return f.filter(vd)};function Bz(a,b,c){var d,e,f;(new Tf).box("payl",bg(function(g){d=Kf(g)})).box("iden",bg(function(g){e=Kf(g)})).box("sttg",bg(function(g){f=Kf(g)})).parse(a);return d?Cz(d,e,f,b,c):null}
|
|
1162
1165
|
function Cz(a,b,c,d,e){d=new Ac(d,e,"");uz(a,d,new Map);b&&(d.id=b);if(c)for(a=new Gs(c),b=Js(a);b;)tz(d,b,[]),Hs(a),b=Js(a);return d}M("shaka.text.Mp4VttParser",Az);Az.prototype.parseMedia=Az.prototype.parseMedia;Az.prototype.setManifestType=Az.prototype.setManifestType;Az.prototype.setSequenceMode=Az.prototype.setSequenceMode;Az.prototype.parseInit=Az.prototype.parseInit;nd['application/mp4; codecs="wvtt"']=function(){return new Az};function Dz(){}Dz.prototype.parseInit=function(){};Dz.prototype.setSequenceMode=function(){};Dz.prototype.setManifestType=function(){};Dz.prototype.parseMedia=function(a){var b=Kf(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Gs(c[0]),e=Ez(d),f=Is(d,/,/g);d=Ez(d);if(null==e||null==f||null==d)throw new P(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Ac(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1163
1166
|
function Ez(a){a=Is(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.SbvTextParser",Dz);Dz.prototype.parseMedia=Dz.prototype.parseMedia;Dz.prototype.setManifestType=Dz.prototype.setManifestType;Dz.prototype.setSequenceMode=Dz.prototype.setSequenceMode;Dz.prototype.parseInit=Dz.prototype.parseInit;nd["text/x-subviewer"]=function(){return new Dz};function Fz(){this.g=new qz}Fz.prototype.parseInit=function(){};Fz.prototype.setSequenceMode=function(){};Fz.prototype.setManifestType=function(){};Fz.prototype.parseMedia=function(a,b,c){a=Kf(a);a=Gz(a);a=nc(Of(a));return this.g.parseMedia(a,b,c)};
|
|
@@ -1173,29 +1176,29 @@ function Rz(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1
|
|
|
1173
1176
|
function Sz(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,
|
|
1174
1177
|
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 Tz(a){this.i=a;this.h=0;this.g=new Map}p=Tz.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?fc(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(kd(b)||"mp4a.40.2")+'"':b};p.getOriginalMimeType=function(){return this.i};
|
|
1175
1178
|
p.transmux=function(a,b,c,d){for(var e=nc(a),f=Th(e),g=f.length;g<e.length&&!Rz(e,g);g++);a=1E3*c.endTime;f=Sh(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);c=Qz(e,g);if(!c)return Promise.reject(new P(2,3,3018));b.audioSamplingRate=c.sampleRate;b.channelsCount=c.channelCount;for(f=[];g<e.length;){var h=Pz(e,g);if(!h)return Promise.reject(new P(2,3,3018));var k=h.fe+h.X;g+k<=e.length&&f.push({data:e.subarray(g+h.fe,g+k),size:h.X,
|
|
1176
|
-
duration:1024,gb:0,flags:{ib:0,Za:0,Ya:0,Wa:0,Xa:2,jb:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.sa,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,eb:[],ma:new Uint8Array([]),
|
|
1179
|
+
duration:1024,gb:0,flags:{ib:0,Za:0,Ya:0,Wa:0,Xa:2,jb:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.sa,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,eb:[],ma:new Uint8Array([]),Aa:new Uint8Array([]),data:{vb:this.h,baseMediaDecodeTime:a,ab:f},stream:b};a=new hu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=pu(a),this.g.set(b.id,d));b=Fu(a);this.h++;b=jg(d,b);return Promise.resolve(b)};M("shaka.transmuxer.AacTransmuxer",Tz);
|
|
1177
1180
|
Tz.prototype.transmux=Tz.prototype.transmux;Tz.prototype.getOriginalMimeType=Tz.prototype.getOriginalMimeType;Tz.prototype.convertCodecs=Tz.prototype.convertCodecs;Tz.prototype.isSupported=Tz.prototype.isSupported;Tz.prototype.destroy=Tz.prototype.destroy;Wc("audio/aac",function(){return new Tz("audio/aac")},bd);function Uz(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,
|
|
1178
1181
|
1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,ma:a,X:e}}
|
|
1179
1182
|
function Vz(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function Wz(a){this.i=a;this.h=0;this.g=new Map}p=Wz.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?fc(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};p.getOriginalMimeType=function(){return this.i};
|
|
1180
1183
|
p.transmux=function(a,b,c,d){a=nc(a);for(var e=Th(a),f=e.length;f<a.length&&!Vz(a,f);f++);var g=1E3*c.endTime;e=Sh(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=Uz(a,f);if(!k)return Promise.reject(new P(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ma;h.push({data:a.subarray(f,f+k.X),size:k.X,duration:1536,gb:0,flags:{ib:0,
|
|
1181
|
-
Za:0,Ya:0,Wa:0,Xa:2,jb:0}});f+=k.X}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,eb:[],ma:e,
|
|
1184
|
+
Za:0,Ya:0,Wa:0,Xa:2,jb:0}});f+=k.X}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,eb:[],ma:e,Aa:new Uint8Array([]),data:{vb:this.h,baseMediaDecodeTime:a,ab:h},stream:b};a=new hu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=pu(a),this.g.set(b.id,d));b=Fu(a);this.h++;b=jg(d,b);return Promise.resolve(b)};M("shaka.transmuxer.Ac3Transmuxer",Wz);Wz.prototype.transmux=Wz.prototype.transmux;Wz.prototype.getOriginalMimeType=Wz.prototype.getOriginalMimeType;
|
|
1182
1185
|
Wz.prototype.convertCodecs=Wz.prototype.convertCodecs;Wz.prototype.isSupported=Wz.prototype.isSupported;Wz.prototype.destroy=Wz.prototype.destroy;Wc("audio/ac3",function(){return new Wz("audio/ac3")},bd);function Xz(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new ci(a.subarray(b+2));ei(c,2);ei(c,3);var d=fi(c,11)+1<<1,e=fi(c,2);if(3==e){e=fi(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=fi(c,2);var g=fi(c,3),h=fi(c,1);c=fi(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,ma:a,X:d}};function Yz(a){this.i=a;this.h=0;this.g=new Map}p=Yz.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?fc(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};p.getOriginalMimeType=function(){return this.i};
|
|
1183
1186
|
p.transmux=function(a,b,c,d){a=nc(a);for(var e=Th(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Sh(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=Xz(a,f);if(!k)return Promise.reject(new P(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ma;h.push({data:a.subarray(f,f+k.X),size:k.X,duration:1536,
|
|
1184
|
-
gb:0,flags:{ib:0,Za:0,Ya:0,Wa:0,Xa:2,jb:0}});f+=k.X}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,eb:[],ma:e,
|
|
1187
|
+
gb:0,flags:{ib:0,Za:0,Ya:0,Wa:0,Xa:2,jb:0}});f+=k.X}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,eb:[],ma:e,Aa:new Uint8Array([]),data:{vb:this.h,baseMediaDecodeTime:a,ab:h},stream:b};a=new hu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=pu(a),this.g.set(b.id,d));b=Fu(a);this.h++;b=jg(d,b);return Promise.resolve(b)};M("shaka.transmuxer.Ec3Transmuxer",Yz);Yz.prototype.transmux=Yz.prototype.transmux;
|
|
1185
1188
|
Yz.prototype.getOriginalMimeType=Yz.prototype.getOriginalMimeType;Yz.prototype.convertCodecs=Yz.prototype.convertCodecs;Yz.prototype.isSupported=Yz.prototype.isSupported;Yz.prototype.destroy=Yz.prototype.destroy;Wc("audio/ec3",function(){return new Yz("audio/ec3")},bd);function Zz(a){if(!a.length)return null;var b=a.find(function(m){return 7==m.type});a=a.find(function(m){return 8==m.type});if(!b||!a)return null;var c=new ci(b.data),d=ji(c);ji(c);ji(c);hi(c);if($z.includes(d)&&(d=R(c),3===d&&ei(c,1),hi(c),hi(c),ei(c,1),S(c))){d=3!==d?8:12;for(var e=0;e<d;e++)S(c)&&(6>e?ki(c,16):ki(c,64))}hi(c);d=R(c);if(0===d)R(c);else if(1===d)for(ei(c,1),hi(c),hi(c),d=R(c),e=0;e<d;e++)hi(c);hi(c);ei(c,1);d=R(c);var f=R(c),g=fi(c,1);0===g&&ei(c,1);ei(c,1);var h=e=0,k=0,l=0;S(c)&&
|
|
1186
|
-
(e=R(c),h=R(c),k=R(c),l=R(c));c=(2-g)*(f+1)*16-2*k-2*l;d=16*(d+1)-2*e-2*h;e=[];b=b.na;e.push(b.byteLength>>>8&255);e.push(b.byteLength&255);e=e.concat.apply(e,w(b));b=[];a=a.na;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,w(a));a=new Uint8Array([1,e[3],e[4],e[5],255,225].concat(e,[1],b));return{height:c,width:d,
|
|
1189
|
+
(e=R(c),h=R(c),k=R(c),l=R(c));c=(2-g)*(f+1)*16-2*k-2*l;d=16*(d+1)-2*e-2*h;e=[];b=b.na;e.push(b.byteLength>>>8&255);e.push(b.byteLength&255);e=e.concat.apply(e,w(b));b=[];a=a.na;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,w(a));a=new Uint8Array([1,e[3],e[4],e[5],255,225].concat(e,[1],b));return{height:c,width:d,Aa:a}}
|
|
1187
1190
|
function aA(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=li(new ci(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.na.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(jg(h,f.na)))}return c.length?
|
|
1188
|
-
{data:jg.apply(cg,w(c)),sd:b}:null}var $z=[100,110,122,244,44,83,86,118,128,138,139,134];function bA(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=cA(b.na);a=dA(c.na);var f=eA(d.na);b=fA(b.na,c.na,d.na,{Mf:e.Mf,kg:e.kg,qf:a.qf,rf:a.rf,jf:a.jf,pf:a.pf,kf:a.kf,lf:a.lf,mf:a.mf,nf:a.nf,bf:a.bf,cf:a.cf,df:a.df,ef:a.ef,gf:a.gf,hf:a.hf,Xe:a.Xe,re:a.re,We:a.We,Te:a.Te,Se:a.Se,Qf:f.Qf});return{height:a.height,width:a.width,
|
|
1191
|
+
{data:jg.apply(cg,w(c)),sd:b}:null}var $z=[100,110,122,244,44,83,86,118,128,138,139,134];function bA(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=cA(b.na);a=dA(c.na);var f=eA(d.na);b=fA(b.na,c.na,d.na,{Mf:e.Mf,kg:e.kg,qf:a.qf,rf:a.rf,jf:a.jf,pf:a.pf,kf:a.kf,lf:a.lf,mf:a.mf,nf:a.nf,bf:a.bf,cf:a.cf,df:a.df,ef:a.ef,gf:a.gf,hf:a.hf,Xe:a.Xe,re:a.re,We:a.We,Te:a.Te,Se:a.Se,Qf:f.Qf});return{height:a.height,width:a.width,Aa:b}}
|
|
1189
1192
|
function cA(a){var b=new ci(a,!0);ji(b);ji(b);fi(b,4);fi(b,2);fi(b,6);a=fi(b,3);b=S(b);return{Mf:a+1,kg:b}}
|
|
1190
|
-
function dA(a){a=new ci(a,!0);ji(a);ji(a);var b=0,c=0,d=0,e=0;fi(a,4);var f=fi(a,3);S(a);for(var g=fi(a,2),h=fi(a,1),k=fi(a,5),l=ji(a),m=ji(a),n=ji(a),r=ji(a),q=ji(a),u=ji(a),v=ji(a),x=ji(a),z=ji(a),y=ji(a),
|
|
1193
|
+
function dA(a){a=new ci(a,!0);ji(a);ji(a);var b=0,c=0,d=0,e=0;fi(a,4);var f=fi(a,3);S(a);for(var g=fi(a,2),h=fi(a,1),k=fi(a,5),l=ji(a),m=ji(a),n=ji(a),r=ji(a),q=ji(a),u=ji(a),v=ji(a),x=ji(a),z=ji(a),y=ji(a),A=ji(a),B=[],C=[],E=0;E<f;E++)B.push(S(a)),C.push(S(a));if(0<f)for(E=f;8>E;E++)fi(a,2);for(E=0;E<f;E++)B[E]&&fi(a,88),C[E]&&ji(a);R(a);B=R(a);3==B&&fi(a,1);C=R(a);E=R(a);S(a)&&(b+=R(a),c+=R(a),d+=R(a),e+=R(a));var H=R(a),G=R(a),I=R(a);if(S(a))for(var J=0;J<=f;J++)R(a),R(a),R(a);else R(a),R(a),
|
|
1191
1194
|
R(a);R(a);R(a);R(a);R(a);R(a);R(a);if(S(a)&&S(a))for(J=0;4>J;J++)for(var L=0;L<(3===J?2:6);L++)if(S(a)){var N=Math.min(64,1<<4+(J<<1));1<J&&ii(a);for(var Q=0;Q<N;Q++)ii(a)}else R(a);S(a);S(a);S(a)&&(ji(a),R(a),R(a),S(a));J=R(a);for(N=L=0;N<J;N++)if(Q=!1,0!==N&&(Q=S(a)),Q){N===J&&R(a);S(a);R(a);for(var T=Q=0;T<=L;T++){var Z=S(a),aa=!1;Z||(aa=S(a));(Z||aa)&&Q++}L=Q}else{T=R(a);Q=R(a);L=T+Q;for(Z=0;Z<T;Z++)R(a),S(a);for(T=0;T<Q;T++)R(a),S(a)}if(S(a))for(J=R(a),L=0;L<J;L++){for(N=0;N<I+4;N++)fi(a,1);
|
|
1192
1195
|
fi(a,1)}I=0;S(a);S(a);if(S(a)){S(a)&&255===ji(a)&&(fi(a,16),fi(a,16));S(a)&&S(a);S(a)&&(fi(a,3),S(a),S(a)&&(ji(a),ji(a),ji(a)));S(a)&&(R(a),R(a));S(a);S(a);S(a);if(J=S(a))R(a),R(a),R(a),R(a);if(S(a)&&(fi(a,32),fi(a,32),S(a)&&R(a),S(a))){N=!1;J=S(a);L=S(a);if(J||L){if(N=S(a))ji(a),fi(a,5),S(a),fi(a,5);fi(a,4);fi(a,4);N&&fi(a,4);fi(a,5);fi(a,5);fi(a,5)}for(Q=0;Q<=f;Q++){Z=!0;T=1;S(a)||(Z=S(a));aa=!1;Z?R(a):aa=S(a);aa||(T=R(a)+1);if(J){for(Z=0;Z<T;Z++)R(a),R(a),N&&(R(a),R(a));S(a)}if(L){for(Z=0;Z<T;Z++)R(a),
|
|
1193
|
-
R(a),N&&(R(a),R(a));S(a)}}}S(a)&&(S(a),S(a),S(a),I=R(a),R(a),R(a),R(a),R(a))}return{jf:
|
|
1196
|
+
R(a),N&&(R(a),R(a));S(a)}}}S(a)&&(S(a),S(a),S(a),I=R(a),R(a),R(a),R(a),R(a))}return{jf:A,qf:g,rf:h,pf:k,kf:l,lf:m,mf:n,nf:r,bf:q,cf:u,df:v,ef:x,gf:z,hf:y,re:I,Xe:0,We:B,Te:H,Se:G,width:C-(b+c)*(1===B||2===B?2:1),height:E-(d+e)*(1===B?2:1)}}function eA(a){var b=new ci(a,!0);ji(b);ji(b);R(b);R(b);S(b);S(b);fi(b,3);S(b);S(b);R(b);R(b);ii(b);S(b);S(b);S(b)&&R(b);ii(b);ii(b);S(b);S(b);S(b);S(b);a=S(b);b=S(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Qf:c}}
|
|
1194
1197
|
function fA(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.qf&3)<<6|(d.rf?1:0)<<5|d.pf&31;e[2]=d.kf;e[3]=d.lf;e[4]=d.mf;e[5]=d.nf;e[6]=d.bf;e[7]=d.cf;e[8]=d.df;e[9]=d.ef;e[10]=d.gf;e[11]=d.hf;e[12]=d.jf;e[13]=240|(d.re&3840)>>8;e[14]=d.re&255;e[15]=252|d.Qf&3;e[16]=252|d.We&3;e[17]=248|d.Te&7;e[18]=248|d.Se&7;e[19]=0;e[20]=0;e[21]=(d.Xe&3)<<6|(d.Mf&7)<<3|(d.kg?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
|
|
1195
1198
|
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function gA(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*hA[14*(3===c?3-d:3===d?3:4)+e-1];f=iA[3*(3===c?0:2===c?1:2)+f];c=jA[c][d];var h=kA[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,X:k,Xi:8*c*h}}return null}
|
|
1196
1199
|
function lA(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}var hA=[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],iA=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],jA=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],kA=[0,1,1,4];function mA(a){this.i=a;this.h=0;this.g=new Map}p=mA.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?fc(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};p.getOriginalMimeType=function(){return this.i};
|
|
1197
1200
|
p.transmux=function(a,b,c,d){a=nc(a);for(c=Th(a).length;c<a.length;c++){var e=c;if(e+1<a.length&&lA(a,e)){var f=gA(a,e),g=4;f&&f.X&&(g=f.X);e+=g;e=e===a.length||e+1<a.length&&lA(a,e)}else e=!1;if(e)break}var h;for(e=[];c<a.length;){f=gA(a,c);if(!f)return Promise.reject(new P(2,3,3018));h||(h=f);c+f.X<=a.length&&e.push({data:a.subarray(c,c+f.X),size:f.X,duration:1152,gb:0,flags:{ib:0,Za:0,Ya:0,Wa:0,Xa:2,jb:0}});c+=f.X}if(!h)return Promise.reject(new P(2,3,3018));a=9E4*h.Xi/h.sampleRate*this.h;d={id:b.id,
|
|
1198
|
-
type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:h.sampleRate,duration:d,eb:[],ma:new Uint8Array([]),
|
|
1201
|
+
type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:h.sampleRate,duration:d,eb:[],ma:new Uint8Array([]),Aa:new Uint8Array([]),data:{vb:this.h,baseMediaDecodeTime:a,ab:e},stream:b};h=new hu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=pu(h),this.g.set(b.id,d));b=Fu(h);this.h++;b=jg(d,b);return Promise.resolve(b)};M("shaka.transmuxer.Mp3Transmuxer",mA);mA.prototype.transmux=mA.prototype.transmux;mA.prototype.getOriginalMimeType=mA.prototype.getOriginalMimeType;
|
|
1199
1202
|
mA.prototype.convertCodecs=mA.prototype.convertCodecs;mA.prototype.isSupported=mA.prototype.isSupported;mA.prototype.destroy=mA.prototype.destroy;Wc("audio/mpeg",function(){return new mA("audio/mpeg")},bd);function nA(a){this.h=a;this.g=null}p=nA.prototype;p.destroy=function(){};p.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=kd(a).split(","),c=Jb("audio",b);b=Jb("video",b);return!c||b||"mp3"!=hd(c)?!1:fc(this.convertCodecs("audio",a))};p.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};p.getOriginalMimeType=function(){return this.h};
|
|
1200
1203
|
p.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new mi;a=nc(a);a=this.g.parse(a);if("mp3"!=a.kd().audio||"audio"!=e)return Promise.reject(new P(2,3,3018));e=new Uint8Array([]);a=t(a.hc());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=gA(b,c))?(c+d.X<=b.length&&(e=jg(e,b.subarray(c,c+d.X))),c+=d.X):c++;return Promise.resolve(e)};M("shaka.transmuxer.MpegTsTransmuxer",nA);nA.prototype.transmux=nA.prototype.transmux;nA.prototype.getOriginalMimeType=nA.prototype.getOriginalMimeType;
|
|
1201
1204
|
nA.prototype.convertCodecs=nA.prototype.convertCodecs;nA.prototype.isSupported=nA.prototype.isSupported;nA.prototype.destroy=nA.prototype.destroy;Wc("video/mp2t",function(){return new nA("video/mp2t")},ad);/*
|
|
@@ -1215,16 +1218,16 @@ p.transmux=function(a,b,c){if(!c)return Promise.resolve(nc(a));if(!b.mssPrivateD
|
|
|
1215
1218
|
oA.prototype.convertCodecs=oA.prototype.convertCodecs;oA.prototype.isSupported=oA.prototype.isSupported;oA.prototype.destroy=oA.prototype.destroy;var qA=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);Wc("mss/audio/mp4",function(){return new oA("mss/audio/mp4")},bd);Wc("mss/video/mp4",function(){return new oA("mss/video/mp4")},bd);function sA(a){this.j=a;this.g=0;this.h=new Map;this.i=null}p=sA.prototype;p.destroy=function(){this.h.clear()};p.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=kd(c).split(",");c=Jb("audio",d);d=Jb("video",d);if(c&&(c=hd(c),!tA.includes(c))||d&&(c=hd(d),!uA.includes(c)))return!1;if(b)return fc(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return fc(b)||fc(a)};
|
|
1216
1219
|
p.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=kd(b).replace("mp4a.40.34","mp3").split(",").map(this.Qh).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};p.Qh=function(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}return a};p.getOriginalMimeType=function(){return this.j};
|
|
1217
1220
|
p.transmux=function(a,b,c,d,e){this.i?this.i.clearData():this.i=new mi;a=nc(a);var f=this.i.parse(a);a=[];var g=f.kd();try{var h=null;if("video"==e){switch(g.video){case "avc":var k=[],l=null,m=[],n=f.Fc();if(!n.length)throw new P(2,3,3023);for(var r=0;r<n.length;r++){var q=n[r],u=q.Zb;m=m.concat(u);var v=aA(u);if(v){null==l&&(l=q.dts);var x=void 0;x=r+1<n.length?(n[r+1].dts||0)-(q.dts||0):1<n.length?(q.dts||0)-(n[r-1].dts||0):9E4*(c.endTime-c.startTime);k.push({data:v.data,size:v.data.byteLength,
|
|
1218
|
-
duration:x,gb:Math.round((q.pts||0)-(q.dts||0)),flags:{ib:0,Za:0,Ya:0,Wa:0,Xa:v.sd?2:1,jb:v.sd?0:1}})}}var z=Zz(m);if(!z||null==l)throw new P(2,3,3018);b.height=z.height;b.width=z.width;h={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,eb:[],ma:new Uint8Array([]),
|
|
1219
|
-
z=!1;var y=[],
|
|
1220
|
-
v+1<k.length?(k[v+1].dts||0)-(l.dts||0):1<k.length?(l.dts||0)-(k[v-1].dts||0):9E4*(c.endTime-c.startTime),n.push({data:G.data,size:G.data.byteLength,duration:z,gb:Math.round((l.pts||0)-(l.dts||0)),flags:{ib:0,Za:0,Ya:0,Wa:0,Xa:G.sd?2:1,jb:G.sd?0:1}}))}var I=bA(u);if(!I||null==q)throw new P(2,3,3018);b.height=I.height;b.width=I.width;h={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,eb:[],ma:new Uint8Array([]),
|
|
1221
|
+
duration:x,gb:Math.round((q.pts||0)-(q.dts||0)),flags:{ib:0,Za:0,Ya:0,Wa:0,Xa:v.sd?2:1,jb:v.sd?0:1}})}}var z=Zz(m);if(!z||null==l)throw new P(2,3,3018);b.height=z.height;b.width=z.width;h={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,eb:[],ma:new Uint8Array([]),Aa:z.Aa,data:{vb:this.g,baseMediaDecodeTime:l,ab:k},stream:b};break;case "hvc":n=[];q=null;u=[];k=f.Fc();if(!k.length)throw new P(2,3,3023);for(v=0;v<k.length;v++){l=k[v];m=l.Zb;u=u.concat(m);
|
|
1222
|
+
z=!1;var y=[],A=!1;r=t(m);for(x=r.next();!x.done;x=r.next()){var B=x.value;switch(B.type){case 1:case 0:var C=A=!0;break;case 19:case 20:case 21:z=C=A=!0;break;case 32:C=!0;break;case 33:C=!0;break;case 34:C=!0;break;case 35:A=C=!0;break;case 39:case 40:C=!0;break;default:C=!1}if(A&&C){var E=B.na.byteLength,H=new Uint8Array(4);H[0]=E>>24&255;H[1]=E>>16&255;H[2]=E>>8&255;H[3]=E&255;y.push(jg(H,B.na))}}var G=y.length?{data:jg.apply(cg,w(y)),sd:z}:null;G&&(null==q&&null!=l.dts&&(q=l.dts),z=void 0,z=
|
|
1223
|
+
v+1<k.length?(k[v+1].dts||0)-(l.dts||0):1<k.length?(l.dts||0)-(k[v-1].dts||0):9E4*(c.endTime-c.startTime),n.push({data:G.data,size:G.data.byteLength,duration:z,gb:Math.round((l.pts||0)-(l.dts||0)),flags:{ib:0,Za:0,Ya:0,Wa:0,Xa:G.sd?2:1,jb:G.sd?0:1}}))}var I=bA(u);if(!I||null==q)throw new P(2,3,3018);b.height=I.height;b.width=I.width;h={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,eb:[],ma:new Uint8Array([]),Aa:I.Aa,data:{vb:this.g,baseMediaDecodeTime:q,
|
|
1221
1224
|
ab:n},stream:b}}h&&(a.push(h),h=null)}if("audio"==e){switch(g.audio){case "aac":for(var J=[],L,N=null,Q=t(f.hc()),T=Q.next();!T.done;T=Q.next()){var Z=T.value,aa=Z.data;if(aa){var la=0;L=Qz(aa,la);if(!L)throw new P(2,3,3018);b.audioSamplingRate=L.sampleRate;b.channelsCount=L.channelCount;null==N&&null!==Z.pts&&(N=Z.pts);for(;la<aa.length;){var Na=Pz(aa,la);if(Na){var Xa=Na.fe+Na.X;la+Xa<=aa.length&&J.push({data:aa.subarray(la+Na.fe,la+Xa),size:Na.X,duration:1024,gb:0,flags:{ib:0,Za:0,Ya:0,Wa:0,Xa:2,
|
|
1222
1225
|
jb:0}});la+=Xa}else la++}}}if(!L||null==N){if(!f.Fc().length)throw new P(2,3,3018);N=9E4*c.startTime;var Fb=Jb("audio",b.codecs.split(","));if(!Fb||!b.channelsCount||!b.audioSamplingRate)throw new P(2,3,3018);L={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,sa:Fb};var lb=Sz(Fb,b.channelsCount);if(!lb)throw new P(2,3,3018);var ac=N+9E4*(c.endTime-c.startTime);for(f=N;f<ac;)J.push({data:lb,size:lb.byteLength,duration:1024,gb:0,flags:{ib:0,Za:0,Ya:0,Wa:0,Xa:2,jb:0}}),f+=1024/L.sampleRate*
|
|
1223
|
-
9E4}var Aa=L.sampleRate;f=N/9E4*Aa;h={id:b.id,type:"audio",codecs:L.sa,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Aa,duration:d,eb:[],ma:new Uint8Array([]),
|
|
1224
|
-
ib.channelCount,Aa=ib.sampleRate,J=ib.ma,L.push({data:Gb.subarray(f,f+ib.X),size:ib.X,duration:1536,gb:0,flags:{ib:0,Za:0,Ya:0,Wa:0,Xa:2,jb:0}}),f+=ib.X):f++}}if(0==Aa||0==J.byteLength||null==N)throw new P(2,3,3018);f=N/9E4*Aa;h={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Aa,duration:d,eb:[],ma:J,
|
|
1226
|
+
9E4}var Aa=L.sampleRate;f=N/9E4*Aa;h={id:b.id,type:"audio",codecs:L.sa,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Aa,duration:d,eb:[],ma:new Uint8Array([]),Aa:new Uint8Array([]),data:{vb:this.g,baseMediaDecodeTime:f,ab:J},stream:b};break;case "ac3":L=[];Aa=0;J=new Uint8Array([]);N=null;la=t(f.hc());for(var mb=la.next();!mb.done;mb=la.next()){var hb=mb.value,Gb=hb.data;null==N&&null!==hb.pts&&(N=hb.pts);for(f=0;f<Gb.length;){var ib=Uz(Gb,f);ib?(b.audioSamplingRate=ib.sampleRate,b.channelsCount=
|
|
1227
|
+
ib.channelCount,Aa=ib.sampleRate,J=ib.ma,L.push({data:Gb.subarray(f,f+ib.X),size:ib.X,duration:1536,gb:0,flags:{ib:0,Za:0,Ya:0,Wa:0,Xa:2,jb:0}}),f+=ib.X):f++}}if(0==Aa||0==J.byteLength||null==N)throw new P(2,3,3018);f=N/9E4*Aa;h={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Aa,duration:d,eb:[],ma:J,Aa:new Uint8Array([]),data:{vb:this.g,baseMediaDecodeTime:f,ab:L},stream:b};break;case "ec3":L=[];Aa=0;N=new Uint8Array([]);J=null;for(var Vh=t(f.hc()),Nd=Vh.next();!Nd.done;Nd=
|
|
1225
1228
|
Vh.next()){var Ne=Nd.value,Oe=Ne.data;null==J&&null!==Ne.pts&&(J=Ne.pts);for(f=0;f<Oe.length;){var rb=Xz(Oe,f);rb?(b.audioSamplingRate=rb.sampleRate,b.channelsCount=rb.channelCount,Aa=rb.sampleRate,N=rb.ma,L.push({data:Oe.subarray(f,f+rb.X),size:rb.X,duration:1536,gb:0,flags:{ib:0,Za:0,Ya:0,Wa:0,Xa:2,jb:0}}),f+=rb.X):f++}}if(0==Aa||0==N.byteLength||null==J)throw new P(2,3,3018);f=J/9E4*Aa;h={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Aa,duration:d,eb:[],
|
|
1226
|
-
ma:N,
|
|
1227
|
-
9E4*ju;h={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ju,duration:d,eb:[],ma:new Uint8Array([]),
|
|
1229
|
+
ma:N,Aa:new Uint8Array([]),data:{vb:this.g,baseMediaDecodeTime:f,ab:L},stream:b};break;case "mp3":L=[];var Ci;Aa=null;for(var iu=t(f.hc()),em=iu.next();!em.done;em=iu.next()){var fm=em.value,hg=fm.data;if(hg)for(null==Aa&&null!==fm.pts&&(Aa=fm.pts),f=0;f<hg.length;){var We=gA(hg,f);We?(Ci||(Ci=We),f+We.X<=hg.length&&L.push({data:hg.subarray(f,f+We.X),size:We.X,duration:1152,gb:0,flags:{ib:0,Za:0,Ya:0,Wa:0,Xa:2,jb:0}}),f+=We.X):f++}}if(!Ci||null==Aa)throw new P(2,3,3018);var ju=Ci.sampleRate;f=Aa/
|
|
1230
|
+
9E4*ju;h={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ju,duration:d,eb:[],ma:new Uint8Array([]),Aa:new Uint8Array([]),data:{vb:this.g,baseMediaDecodeTime:f,ab:L},stream:b}}h&&a.push(h)}}catch(gm){return gm&&3023==gm.code?Promise.resolve(new Uint8Array([])):Promise.reject(gm)}if(!a.length)return Promise.reject(new P(2,3,3018));a=new hu(a);this.h.has(b.id)?d=this.h.get(b.id):(d=pu(a),this.h.set(b.id,d));b=Fu(a);this.g++;b=jg(d,b);return Promise.resolve(b)};
|
|
1228
1231
|
M("shaka.transmuxer.TsTransmuxer",sA);sA.prototype.transmux=sA.prototype.transmux;sA.prototype.getOriginalMimeType=sA.prototype.getOriginalMimeType;sA.prototype.convertCodecs=sA.prototype.convertCodecs;sA.prototype.isSupported=sA.prototype.isSupported;sA.prototype.destroy=sA.prototype.destroy;var tA=["aac","ac-3","ec-3","mp3"],uA=["avc","hevc"];Wc("video/mp2t",function(){return new sA("video/mp2t")},$c);/*
|
|
1229
1232
|
@license
|
|
1230
1233
|
EME Encryption Scheme Polyfill
|
|
@@ -1310,20 +1313,20 @@ this.container.appendChild(this.H);kB(this);this.M=!1;this.i=U("div");this.i.id=
|
|
|
1310
1313
|
c.bar.getBoundingClientRect(),f=parseFloat(c.bar.min);d=d.clientX-e.left;pB(c,d,Math.round(f+(parseFloat(c.bar.max)-f)/e.width*d))}else lB(c)});this.eventManager.o(this.container,"mouseleave",function(){c.s.stop();c.s.S(.25)});this.setValue(this.video.currentTime);this.update();mB(this);this.ad&&UA(this.container,!1)}pa(iB,gB);p=iB.prototype;p.release=function(){this.u&&(this.u.stop(),this.u=null,this.K.stop(),this.K=null);this.I.release();gB.prototype.release.call(this)};
|
|
1311
1314
|
p.onChangeStart=function(){this.M=!this.video.paused;this.controls.gg(!0);this.video.pause();this.s.stop();this.L=!0};p.onChange=function(){if(this.video.duration)if(this.update(),this.u.S(.125),this.player.Yd().length){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());pB(this,(d-a)/((b-a)/c.width),d)}else lB(this)};
|
|
1312
1315
|
p.onChangeEnd=function(){this.u.Ma();this.controls.gg(!1);this.M&&this.video.play();this.L&&(this.L=!1,this.s.stop(),this.s.S(.25))};p.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
|
|
1313
|
-
p.update=function(){var a=this.m.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.
|
|
1316
|
+
p.update=function(){var a=this.m.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.Fa(),g=f.end-f.start;this.setRange(f.start,f.end);nB(this)?(UA(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.m.showUnbufferedStart?
|
|
1314
1317
|
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()+")")):UA(this.container,!1)};
|
|
1315
|
-
function jB(a){if(a.D.length){for(var b=a.player.
|
|
1316
|
-
100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.G.style.background="linear-gradient("+d.join(",")+")"}else a.G.style.background="transparent"}function oB(a){jB(a);var b=a.player.
|
|
1317
|
-
function pB(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,
|
|
1318
|
-
-(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";r=g.uris[0].split("#xywh=")[0];if(a.l&&r===a.l.uris[0].split("#xywh=")[0]&&g.segment.Wb()==a.l.segment.Wb()&&g.segment.Sb()==a.l.segment.Sb()){
|
|
1319
|
-
a.j=a.player.Tb().request(q,u,{type:1});return D(
|
|
1320
|
-
a.g.onload=function(){r.startsWith("blob:")&&URL.revokeObjectURL(r)};a.i.insertBefore(a.g,a.i.firstChild);case 3:
|
|
1321
|
-
g.width),a.i.style.height=m+"px",a.i.style.top=-(m-k)+"px",F(
|
|
1318
|
+
function jB(a){if(a.D.length){for(var b=a.player.Fa(),c=b.end-b.start,d=["to right"],e=[],f=a.m.seekBarColors.adBreaks,g=!1,h=t(a.D),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=t(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
|
|
1319
|
+
100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.G.style.background="linear-gradient("+d.join(",")+")"}else a.G.style.background="transparent"}function oB(a){jB(a);var b=a.player.Fa();b=b.end-b.start;a.player.R()&&5<b&&a.K.wa(1)}function nB(a){var b=a.player.Fa();b=b.end-b.start;return a.player.R()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function mB(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
|
|
1320
|
+
function pB(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A,B;K(function(C){switch(C.g){case 1:d=qB(a);if(!d)return lB(a),C.return();0>c&&(c=0);e=a.player.Fa();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));return D(C,a.player.yf(d.id,f),2);case 2:g=C.h;if(!g||!g.uris.length)return lB(a),C.return();a.player.R()?(h=e.end-c,a.C.textContent=1>h?a.localization.resolve("LIVE"):"-"+rB(h)):a.C.textContent=rB(c);k=-10;l=a.i.clientWidth;m=Math.floor(9*l/16);a.i.style.height=m+"px";a.i.style.top=
|
|
1321
|
+
-(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";r=g.uris[0].split("#xywh=")[0];if(a.l&&r===a.l.uris[0].split("#xywh=")[0]&&g.segment.Wb()==a.l.segment.Wb()&&g.segment.Sb()==a.l.segment.Sb()){C.F(3);break}a.l=g;a.j&&(a.j.abort(),a.j=null);if("mjpg"!=d.codecs&&!r.startsWith("offline:")){C.F(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';ta(C,5);q=wf;u=fk(g.segment.aa(),g.segment.Wb(),g.segment.Sb(),a.player.getConfiguration().streaming.retryParameters);
|
|
1322
|
+
a.j=a.player.Tb().request(q,u,{type:1});return D(C,a.j.promise,7);case 7:v=C.h;a.j=null;"mjpg"==d.codecs?(x=(new Tf).box("mdat",bg(function(E){r=URL.createObjectURL(new Blob([E],{type:"image/jpeg"}))})),x.parse(v.data,!1)):(z=d.mimeType||"image/jpeg",y=new Blob([v.data],{type:z}),r=URL.createObjectURL(y));va(C,4);break;case 5:A=wa(C);if(7001==A.code)return C.return();throw A;case 4:try{a.i.removeChild(a.g)}catch(E){}a.g=U("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=r;
|
|
1323
|
+
a.g.onload=function(){r.startsWith("blob:")&&URL.revokeObjectURL(r)};a.i.insertBefore(a.g,a.i.firstChild);case 3:B=l/g.width,g.imageHeight?a.g.height=g.imageHeight:g.sprite||(a.g.style.height="100%",a.g.style.objectFit="contain"),g.imageWidth?a.g.width=g.imageWidth:g.sprite||(a.g.style.width="100%",a.g.style.objectFit="contain"),a.g.style.left="-"+B*g.positionX+"px",a.g.style.top="-"+B*g.positionY+"px",a.g.style.transform="scale("+B+")",a.g.style.transformOrigin="left top",m=Math.floor(l*g.height/
|
|
1324
|
+
g.width),a.i.style.height=m+"px",a.i.style.top=-(m-k)+"px",F(C)}})}
|
|
1322
1325
|
function qB(a){var b=a.player.Yd();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={Ie:c.Ie,Ge:c.Ge},e=d.next())if(c.Ie=e.value,c.Ge=a.player.getStats().estimatedBandwidth,(e=b.filter(function(f){return function(g){return g.mimeType.toLowerCase()===f.Ie&&g.bandwidth<.01*f.Ge}}(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&&
|
|
1323
1326
|
"mjpg"==f.codecs})||b[0]}function lB(a){a.i.style.visibility="hidden";a.C.textContent=""}function rB(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}
|
|
1324
1327
|
function kB(a){function b(){for(var f="und",g=[],h=t(Array.from(a.localization.g)),k=h.next();!k.done&&(f=k.value,g=a.player.vf(f),!g.length);k=h.next());g.length||(f="und",g=a.player.vf(f));h=f!==d;k=e.length!==g.length||!e.some(function(l,m){m=g.at(m);return c(l,m)||g.some(function(n){return c(l,n)})});d=f;e=g;g.length?(h||k)&&sB(a,e):tB(a)}function c(f,g){return!f&&!g||f.id===g.id&&f.title===g.title&&f.startTime===g.startTime&&f.endTime===g.endTime}var d="und",e=[];b();a.eventManager.o(a.player,
|
|
1325
1328
|
"unloading",function(){tB(a);d="und";e=[]});a.eventManager.o(a.player,"trackschanged",b);a.eventManager.o(a.localization,"locale-updated",function(){b()});a.eventManager.o(a.localization,"locale-changed",function(){b()})}
|
|
1326
|
-
function sB(a,b){tB(a);var c=a.player.
|
|
1329
|
+
function sB(a,b){tB(a);var c=a.player.Fa(),d=[];b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,!(e.startTime>=c.end)){var f=e.startTime>c.start?e.startTime:c.start,g=e.endTime<c.end?e.endTime:c.end;d.push({start:f,end:g,size:g-f,title:e.title,id:e.id})}if(!(2>d.length)){c=d.reduce(function(k,l){return k+=l.size},0);var h=[];d=t(d);for(e=d.next();!e.done;e=d.next())b=e.value,e=U("div"),e.classList.add("shaka-chapter"),e.style.width=100*b.size/c+"%",a.H.appendChild(e),f=U("div"),f.style.borderColor=
|
|
1327
1330
|
a.m.seekBarColors.chapterMarks,e.appendChild(f),f=U("p"),f.classList.add("shaka-chapter-label","shaka-hidden"),f.style.color=a.m.seekBarColors.chapterLabels,f.innerText=b.title,e.appendChild(f),h.push({start:b.start,end:b.end,Wd:f});a.I.o(a.bar,"pointermove",function(k){if(k.target){var l=k.target;k=k.offsetX/l.clientWidth;l=parseInt(l.getAttribute("max"),10);l*=k;k=t(h);for(var m=k.next();!m.done;m=k.next())m=m.value,(m.start<=l&&l<m.end)===m.Wd.classList.contains("shaka-hidden")&&m.Wd.classList.toggle("shaka-hidden")}},
|
|
1328
1331
|
{passive:!0});a.I.o(a.bar,"pointerout",function(){for(var k=t(h),l=k.next();!l.done;l=k.next())l=l.value,l.Wd.classList.contains("shaka-hidden")||l.Wd.classList.add("shaka-hidden")},{passive:!0})}}function tB(a){a.I.Kb();Wk(a.H)}M("shaka.ui.SeekBar",iB);function uB(){}uB.prototype.create=function(a,b){return new iB(a,b)};iB.Factory=uB;function Y(a,b,c,d){cb.call(this);var e=this;this.P=!0;this.g=d;this.C=new Ao(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.za=!0;this.u=this.C.Yb();this.s=c;this.D=this.C.Dc();this.qa=a;this.j=b;this.Ua=this.D.Xd();this.l=this.m=null;this.U=!1;this.G=[];this.Qb=[];this.Bb=!1;this.Z=new xd(function(){e.j.style.cursor="none";e.Bb=!1;vB(e)});this.ea=new xd(function(){e.h.removeAttribute("shown");e.I.S(2)});this.I=new xd(function(){for(var f=t(e.G),g=f.next();!g.done;g=f.next())UA(g.value,
|
|
1329
1332
|
!1)});this.Na=new xd(function(){e.nc()&&wB(e)});this.J=null;this.H=[];this.Ia=xB();this.i=new Af;this.configure(this.g);yB(this);this.ha=new Set;zB(this);this.Na.wa(.125);this.i.o(this.Ia,"locale-changed",function(f){e.Ua.setLocale(f.locales[0])})}pa(Y,cb);p=Y.prototype;
|
|
@@ -1350,11 +1353,11 @@ function IB(a){a.L=U("div");a.L.classList.add("shaka-bottom-controls");a.L.class
|
|
|
1350
1353
|
(c=CB.get(c).create(a.T,a),a.H.push(c)):Ua("Unrecognized control panel element requested:",c)}function JB(a){if(a.g.addSeekBar)a.l=RB.create(a.L,a),a.H.push(a.l);else{a=t(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function EB(a){a.M=U("div");a.M.classList.add("shaka-client-side-ad-container");UA(a.M,!1);a.i.o(a.M,"click",function(){PB(a)});a.j.appendChild(a.M)}
|
|
1351
1354
|
function yB(a){a.i.o(a.D,"buffering",function(){a.P&&UA(a.$,a.D.rd())});a.P&&UA(a.$,a.D.rd());a.i.o(window,"keydown",function(b){SB(a,b)});a.i.o(window,"click",function(){return a.Gc()});a.i.o(a,"submenuopen",function(){a.Gc()});a.i.o(a.u,"play",function(){vB(a)});a.i.o(a.u,"pause",function(){vB(a)});a.i.o(a.j,"mousemove",function(b){OB(a,b)});a.i.o(a.j,"touchmove",function(b){OB(a,b)},{passive:!0});a.i.o(a.j,"touchend",function(b){OB(a,b)},{passive:!0});a.i.o(a.j,"mouseleave",function(){a.J||a.Z.Ma()});
|
|
1352
1355
|
a.i.o(a.C,"caststatuschanged",function(){zB(a)});a.i.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.h.contains(c)&&OB(a,b);if(a.g.enableKeyboardPlaybackControls){c=a.g.keyboardSeekDistance;var f=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.l&&!d&&0<c&&(b.preventDefault(),TB(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&!d&&0<c&&(b.preventDefault(),
|
|
1353
|
-
TB(a,a.l.getValue()+c));break;case "PageDown":a.l&&e&&0<c&&(b.preventDefault(),TB(a,a.l.getValue()-f));break;case "PageUp":a.l&&e&&0<c&&(b.preventDefault(),TB(a,a.l.getValue()+f));break;case "Home":a.l&&TB(a,a.D.
|
|
1354
|
-
function(){return K(function(b){return D(b,VB(a),0)})})}function VB(a){return K(function(b){return a.u&&0!=a.u.readyState&&!a.C.
|
|
1356
|
+
TB(a,a.l.getValue()+c));break;case "PageDown":a.l&&e&&0<c&&(b.preventDefault(),TB(a,a.l.getValue()-f));break;case "PageUp":a.l&&e&&0<c&&(b.preventDefault(),TB(a,a.l.getValue()+f));break;case "Home":a.l&&TB(a,a.D.Fa().start);break;case "End":a.l&&TB(a,a.D.Fa().end);break;case " ":e&&UB(a)}}});a.i.o(a.j,"keyup",function(b){a.ha.delete(b.key)});a.i.o(a.Ua,"ad-started",function(b){a.m=b.ad;a.kh()});a.i.o(a.Ua,"ad-stopped",function(){a.m=null;a.Lg()});screen.orientation&&a.i.o(screen.orientation,"change",
|
|
1357
|
+
function(){return K(function(b){return D(b,VB(a),0)})})}function VB(a){return K(function(b){return a.u&&0!=a.u.readyState&&!a.C.Ea()&&a.g.enableFullscreenOnRotation&&a.je()?screen.orientation.type.includes("landscape")&&!a.Ic()?D(b,KB(a),0):screen.orientation.type.includes("portrait")&&a.Ic()?D(b,LB(a),0):b.F(0):b.return()})}
|
|
1355
1358
|
function OB(a,b){"mousemove"==b.type&&(a.h.classList.remove("shaka-keyboard-navigation"),vB(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.Bb=!0,a.I.stop(),a.nc()||(wB(a),vB(a)),a.Z.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.Z.S(3))}function WB(a){return window.matchMedia("hover: hover").matches?a.Qb.some(function(b){return b.matches(":hover")}):!1}
|
|
1356
1359
|
function vB(a){var b=a.m?a.m.isPaused():!1,c=a.u.paused&&!a.U,d=a.h.classList.contains("shaka-keyboard-navigation");b||(!a.m||!a.m.isLinear())&&c||a.Bb||d||WB(a)?(wB(a),a.h.setAttribute("shown","true"),a.ea.stop()):a.ea.S(a.g.fadeDelay)}function PB(a){a.P&&(a.Qd()?a.I.Ma():a.g.singleClickForPlayAndPause&&UB(a))}function UB(a){a.m&&a.m.isLinear()?$A(a):aB(a)}
|
|
1357
|
-
function zB(a){var b=a.C.
|
|
1360
|
+
function zB(a){var b=a.C.Ea();a.dispatchEvent(new O("caststatuschanged",(new Map).set("newStatus",b)));b?a.h.setAttribute("casting","true"):a.h.removeAttribute("casting")}p.nc=function(){return this.P?null!=this.h.getAttribute("shown")||null!=this.h.getAttribute("casting"):!1};function TB(a,b){a.l.changeTo(b);a.nc()&&wB(a)}
|
|
1358
1361
|
function wB(a){if(a.l)if(a.l.setValue(a.u.currentTime),a.l.update(),a.l.isShowing())for(var b=t(a.G),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=t(a.G),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new O("timeandseekrangeupdated"))}
|
|
1359
1362
|
function SB(a,b){a.ha.add(b.key);var c=a.Qd();"Tab"==b.key&&(a.h.classList.add("shaka-keyboard-navigation"),vB(a),a.i.o(window,"mousedown",function(){a.i.bc(window,"mousedown")}));"Escape"==b.key&&a.I.Ma();c&&a.ha.has("Tab")&&XB(a,b)}
|
|
1360
1363
|
function XB(a,b){var c=a.G.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.ha.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
|
|
@@ -1433,15 +1436,15 @@ function jC(a){var b={controlPanelElements:"play_pause time_and_duration spacer
|
|
|
1433
1436
|
"picture_in_picture","statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",castAndroidReceiverCompatible:!1,clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)",chapterMarks:"rgb(27, 27, 27)",chapterLabels:"rgb(255, 255, 255)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",
|
|
1434
1437
|
level:"rgb(255, 255, 255)"},trackLabelFormat:kC,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5,keyboardLargeSeekDistance:60,fullScreenElement:a.j,preferDocumentPictureInPicture:!0,showAudioChannelCountVariants:!0};"remote"in HTMLMediaElement.prototype?b.overflowMenuButtons.push("remote"):window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");
|
|
1435
1438
|
a.Bf()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
|
|
1436
|
-
function lC(){var a,b,c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,
|
|
1437
|
-
h.replaceChild(g,f);g.appendChild(f);k=null;l=t(c);for(m=l.next();!m.done;m=l.next())if(n=m.value,n.parentElement==g){k=n;break}k||(k=document.createElement("canvas"),k.classList.add("shaka-canvas-container"),g.appendChild(k));oC(g,f,k)}
|
|
1438
|
-
y=null;
|
|
1439
|
+
function lC(){var a,b,c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,A,B;return K(function(C){switch(C.g){case 1:Vw();if(!cm())return mC("shaka-ui-load-failed",nC),C.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");if(!b.length&&!a.length){C.F(2);break}if(b.length&&!a.length){d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,!f.ui){g=document.createElement("div");h=f.parentElement;
|
|
1440
|
+
h.replaceChild(g,f);g.appendChild(f);k=null;l=t(c);for(m=l.next();!m.done;m=l.next())if(n=m.value,n.parentElement==g){k=n;break}k||(k=document.createElement("canvas"),k.classList.add("shaka-canvas-container"),g.appendChild(k));oC(g,f,k)}C.F(2);break}r=t(a);q=r.next();case 4:if(q.done){C.F(2);break}u=q.value;if(u.ui){C.F(5);break}v=null;x=t(b);for(e=x.next();!e.done;e=x.next())if(z=e.value,z.parentElement==u){v=z;break}v||(v=document.createElement("video"),v.setAttribute("playsinline",""),u.appendChild(v));
|
|
1441
|
+
y=null;A=t(c);for(m=A.next();!m.done;m=A.next())if(B=m.value,B.parentElement==u){y=B;break}y||(y=document.createElement("canvas"),y.classList.add("shaka-canvas-container"),u.appendChild(y));ta(C,7);return D(C,oC(u,v,y),9);case 9:va(C,5);break;case 7:return wa(C),mC("shaka-ui-load-failed",pC),C.return();case 5:q=r.next();C.F(4);break;case 2:mC("shaka-ui-loaded"),F(C)}})}function mC(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
|
|
1439
1442
|
function oC(a,b,c){var d,e,f,g,h,k,l,m,n;return K(function(r){switch(r.g){case 1:d=new V;e=new iC(d,a,b);d.vg(c);f="";g=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(f=a.dataset.shakaPlayerCastReceiverId,g="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(f=b.dataset.shakaPlayerCastReceiverId,g="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);f.length&&e.configure({castReceiverAppId:f,castAndroidReceiverCompatible:g});b.controls&&
|
|
1440
1443
|
e.g.fh(!0);if(h=b.getAttribute("src"))k=document.createElement("source"),k.setAttribute("src",h),b.appendChild(k),b.removeAttribute("src");l=t(b.querySelectorAll("source"));m=l.next();case 2:if(m.done){r.F(4);break}n=m.value;ta(r,5);return D(r,e.g.Dc().load(n.getAttribute("src")),7);case 7:r.F(4);break;case 5:wa(r);case 3:m=l.next();r.F(2);break;case 4:return D(r,d.yc(b),0)}})}M("shaka.ui.Overlay",iC);iC.prototype.setEnabled=iC.prototype.dj;iC.prototype.getControls=iC.prototype.Oh;
|
|
1441
1444
|
iC.prototype.configure=iC.prototype.configure;iC.prototype.getConfiguration=iC.prototype.getConfiguration;iC.prototype.isMobile=iC.prototype.Bf;iC.prototype.destroy=iC.prototype.destroy;var kC=0;iC.TrackLabelFormat={LANGUAGE:kC,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var nC=0,pC=1;iC.FailReasonCode={NO_BROWSER_SUPPORT:nC,PLAYER_FAILED_TO_LOAD:pC};"complete"==document.readyState?K(function(a){if(1==a.g)return D(a,Promise.resolve(),2);lC();F(a)}):window.addEventListener("load",lC);function qC(a,b,c,d,e,f,g,h){function k(H){var G="";5<=H&&(G=" "+f.resolve("SURROUND"));return G}function l(H,G,I,J){H=[H,G];h&&null!=J&&H.push(J);I&&3==g&&H.push(I);return H.join(": ")}function m(H){return"variant"==H.type?H.audioRoles?H.audioRoles.join(", "):void 0:H.roles.join(", ")}var n=a.find(function(H){return 1==H.active}),r=QA(b);Wk(b);b.appendChild(r);r=new Map;for(var q=t(a),u=q.next();!u.done;u=q.next())u=u.value,r.has(u.language)||r.set(u.language,new Set),r.get(u.language).add(m(u));
|
|
1442
|
-
r=new Set;n=n?l(n.language,m(n),n.label,n.channelsCount):"";q={};a=t(a);for(u=a.next();!u.done;q={pb:q.pb},u=a.next()){q.pb=u.value;u=q.pb.language;var v=q.pb.forced,x=f.resolve("SUBTITLE_FORCED"),z=m(q.pb),y=q.pb.label,
|
|
1443
|
-
(E.textContent+=k(
|
|
1444
|
-
"true",e.textContent=E.textContent);b.appendChild(
|
|
1445
|
+
r=new Set;n=n?l(n.language,m(n),n.label,n.channelsCount):"";q={};a=t(a);for(u=a.next();!u.done;q={pb:q.pb},u=a.next()){q.pb=u.value;u=q.pb.language;var v=q.pb.forced,x=f.resolve("SUBTITLE_FORCED"),z=m(q.pb),y=q.pb.label,A=q.pb.channelsCount,B=l(u,z,y,A);if(!r.has(B)){r.add(B);var C=Vk();C.addEventListener("click",function(H){return function(){c(H.pb)}}(q));var E=U("span");C.appendChild(E);E.textContent=rC(u,f);switch(g){case kC:h&&(E.textContent+=k(A));v&&(E.textContent+=" ("+x+")");break;case 1:h&&
|
|
1446
|
+
(E.textContent+=k(A));z?E.textContent=z:(Ua("Track #"+q.pb.id+" does not have a role, but the UI is configured to only show role."),E.textContent="?");v&&(E.textContent+=" ("+x+")");break;case 2:h&&(E.textContent+=k(A));z&&(E.textContent+=": "+z);v&&(E.textContent+=" ("+x+")");break;case 3:y?E.textContent=y:(Ua("Track #"+q.pb.id+" does not have a label, but the UI is configured to only show labels."),E.textContent="?")}d&&B==n&&(C.appendChild(TA()),E.classList.add("shaka-chosen-item"),C.ariaSelected=
|
|
1447
|
+
"true",e.textContent=E.textContent);b.appendChild(C)}}}function rC(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Ub(a);return a in LA?LA[a].A:c in LA?LA[c].A+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function sC(a,b,c){PA.call(this,a,b);var d=this;tC(this,c);uC(this);vC(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new O("submenuopen")),UA(d.menu,!0),SA(d.menu)):UA(d.menu,!1)})}pa(sC,PA);
|
|
1445
1448
|
function tC(a,b){a.button=Vk();a.button.classList.add("shaka-overflow-button");a.icon=U("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);b=U("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");a.nameSpan=U("span");b.appendChild(a.nameSpan);a.currentSelection=U("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
|
|
1446
1449
|
function uC(a){a.menu=U("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Vk();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.Gc()});var b=U("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
|
|
1447
1450
|
U("span");a.backButton.appendChild(a.backSpan);a.controls.h.appendChild(a.menu)}function vC(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}UA(a.parent,!0);fb(a.parent.childNodes,b)&&gb(a.parent.childNodes,b)[0].focus();vB(a.controls)}))}M("shaka.ui.SettingsMenu",sC);function wC(a,b){sC.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){xC(c)});this.eventManager.o(this.localization,"locale-changed",function(){xC(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.hb().length;UA(c.button,d);yC(c)});this.eventManager.o(this.player,"variantchanged",
|
|
@@ -1449,8 +1452,8 @@ function(){yC(c)});xC(this);yC(this)}pa(wC,sC);
|
|
|
1449
1452
|
function yC(a){var b=a.player.hb();qC(b,a.menu,function(c){c.channelsCount&&a.controls.g.showAudioChannelCountVariants?a.player.Ae(c.language,c.roles[0],c.channelsCount):a.player.Ae(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);SA(a.menu);a.controls.dispatchEvent(new O("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
|
|
1450
1453
|
function xC(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}M("shaka.ui.AudioLanguageSelection",wC);function zC(){}zC.prototype.create=function(a,b){return new wC(a,b)};bC("language",new zC);BB("language",new zC);function AC(a,b){PA.call(this,a,b);var c=this;this.h=this.controls.C;this.g=Vk();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=U("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=U("span");a.appendChild(this.l);this.j=U("span");this.j.classList.add("shaka-current-selection-span");
|
|
1451
1454
|
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);BC(this);CC(this);this.eventManager.o(this.localization,"locale-updated",function(){BC(c)});this.eventManager.o(this.localization,"locale-changed",function(){BC(c)});this.eventManager.o(this.g,"click",function(){DC(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){CC(c)})}pa(AC,PA);
|
|
1452
|
-
function DC(a){var b;K(function(c){if(1==c.g){if(a.h.
|
|
1453
|
-
function EC(a){a.j.textContent=a.h.
|
|
1455
|
+
function DC(a){var b;K(function(c){if(1==c.g){if(a.h.Ea())return a.h.lh(),c.F(0);ta(c,3);a.g.disabled=!0;return D(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=wa(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));F(c)})}function CC(a){var b=a.h.Ue()&&a.controls.za,c=a.h.Ea();UA(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");EC(a)}
|
|
1456
|
+
function EC(a){a.j.textContent=a.h.Ea()?a.h.ye():a.localization.resolve("OFF")}function BC(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");EC(a)}M("shaka.ui.CastButton",AC);function FC(){}FC.prototype.create=function(a,b){return new AC(a,b)};bC("cast",new FC);BB("cast",new FC);function GC(a,b){PA.call(this,a,b);var c=this;this.g=Vk();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);HC(this);this.h=this.controls.g.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){HC(c)});this.eventManager.o(this.localization,"locale-changed",function(){HC(c)});
|
|
1454
1457
|
this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ub())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Gd(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(GC,PA);function HC(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}M("shaka.ui.FastForwardButton",GC);function IC(){}IC.prototype.create=function(a,b){return new GC(a,b)};BB("fast_forward",new IC);function JC(a,b){PA.call(this,a,b);var c=this;this.h=this.controls.s;this.g=Vk();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");KC(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);LC(this);this.eventManager.o(this.localization,"locale-updated",function(){LC(c)});this.eventManager.o(this.localization,"locale-changed",function(){LC(c)});this.eventManager.o(this.g,"click",function(){return K(function(d){return D(d,
|
|
1455
1458
|
c.controls.mg(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.Ic()?"fullscreen_exit":"fullscreen";LC(c)});this.eventManager.o(this.h,"loadedmetadata",function(){KC(c)});this.eventManager.o(this.h,"loadeddata",function(){KC(c)})}pa(JC,PA);function KC(a){a.controls.je()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function LC(a){a.g.ariaLabel=a.localization.resolve(a.controls.Ic()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
|
|
1456
1459
|
M("shaka.ui.FullscreenButton",JC);function MC(){}MC.prototype.create=function(a,b){return new JC(a,b)};BB("fullscreen",new MC);function NC(a,b){PA.call(this,a,b);var c=this;this.g=Vk();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=U("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=U("span");this.j.textContent=this.localization.resolve("LOOP");a.appendChild(this.j);this.l=U("span");this.l.classList.add("shaka-current-selection-span");
|
|
@@ -1465,7 +1468,7 @@ function VC(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var
|
|
|
1465
1468
|
ZC.prototype.create=function(a,b){return new UC(a,b)};bC("picture_in_picture",new ZC);BB("picture_in_picture",new ZC);eB("picture_in_picture",new ZC);function $C(a,b){sC.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){aD(c)});this.eventManager.o(this.localization,"locale-changed",function(){aD(c)});this.eventManager.o(this.player,"ratechange",function(){bD(c,c.player.Ub())});this.g=new Map(this.controls.g.playbackRates.map(function(d){return[d+
|
|
1466
1469
|
"x",d]}));aD(this);cD(this);bD(this,this.player.Ub())}pa($C,sC);function aD(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
|
|
1467
1470
|
function bD(a,b){var c=RA(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(TA()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
|
|
1468
|
-
"x")}function cD(a){for(var b={},c=t(a.g.keys()),d=c.next();!d.done;b={Wc:b.Wc},d=c.next()){b.Wc=d.value;d=Vk();var e=U("span");e.textContent=b.Wc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.Wc);a.video.defaultPlaybackRate=a.g.get(f.Wc)}}(b));a.menu.appendChild(d)}SA(a.menu)}M("shaka.ui.PlaybackRateSelection",$C);function dD(){}dD.prototype.create=function(a,b){return new $C(a,b)};bC("playback_rate",new dD);BB("playback_rate",new dD);function eD(a,b){PA.call(this,a,b);var c=this;this.g=Vk();this.g.classList.add("shaka-current-time");fD(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.R()&&(c.video.currentTime=c.player.
|
|
1471
|
+
"x")}function cD(a){for(var b={},c=t(a.g.keys()),d=c.next();!d.done;b={Wc:b.Wc},d=c.next()){b.Wc=d.value;d=Vk();var e=U("span");e.textContent=b.Wc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.Wc);a.video.defaultPlaybackRate=a.g.get(f.Wc)}}(b));a.menu.appendChild(d)}SA(a.menu)}M("shaka.ui.PlaybackRateSelection",$C);function dD(){}dD.prototype.create=function(a,b){return new $C(a,b)};bC("playback_rate",new dD);BB("playback_rate",new dD);function eD(a,b){PA.call(this,a,b);var c=this;this.g=Vk();this.g.classList.add("shaka-current-time");fD(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.R()&&(c.video.currentTime=c.player.Fa().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.U,e=c.controls.Jg(),f=c.player.Fa(),g=f.end-f.start;c.player.R()?(e=Math.max(0,Math.floor(f.end-e)),g=3600<=g,1<=e||d?(fD(c,"- "+VA(e,g)),c.g.disabled=!1):(fD(c,c.localization.resolve("LIVE")),
|
|
1469
1472
|
c.g.disabled=!0)):(d=3600<=g,e=VA(Math.max(0,e-f.start),d),g&&(e+=" / "+VA(g,d)),fD(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.R()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}pa(eD,PA);function fD(a,b){b!=a.g.textContent&&(a.g.textContent=b)}M("shaka.ui.PresentationTimeTracker",eD);function gD(){}gD.prototype.create=function(a,b){return new eD(a,b)};BB("time_and_duration",new gD);function hD(a,b){PA.call(this,a,b);var c=this;this.g=Vk();this.g.classList.add("shaka-remote-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=U("i");this.i.classList.add("material-icons-round");a="cast";(b=Kd())&&13<=b&&(a="airplay");this.i.textContent=a;this.g.appendChild(this.i);a=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=U("span");a.appendChild(this.l);this.j=U("span");this.j.classList.add("shaka-current-selection-span");
|
|
1470
1473
|
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;iD(this);UA(this.g,!1);!this.video.remote||this.video.disableRemotePlayback?this.g.classList.add("shaka-hidden"):(this.eventManager.o(this.localization,"locale-updated",function(){iD(c)}),this.eventManager.o(this.localization,"locale-changed",function(){iD(c)}),this.eventManager.o(this.controls,"caststatuschanged",function(){jD(c)}),this.eventManager.o(this.g,"click",function(){c.video.remote.prompt()}),this.eventManager.o(this.video.remote,
|
|
1471
1474
|
"connect",function(){jD(c)}),this.eventManager.o(this.video.remote,"connecting",function(){jD(c)}),this.eventManager.o(this.video.remote,"disconnect",function(){jD(c)}),this.eventManager.o(this.player,"loaded",function(){jD(c)}),jD(this))}pa(hD,PA);hD.prototype.release=function(){this.video.remote&&-1!=this.h&&this.video.remote.cancelWatchAvailability(this.h).catch(function(){});PA.prototype.release.call(this)};
|
|
@@ -1493,8 +1496,8 @@ DD.prototype.create=function(a,b){return new AD(a,b)};bC("statistics",new DD);eB
|
|
|
1493
1496
|
function ID(a){a.player.pc()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new O("captionselectionupdated"))}
|
|
1494
1497
|
function HD(a){var b=a.player.Xb();qC(b,a.menu,function(c){return KD(a,c)},a.player.pc(),a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);b=Vk();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.hg(!1);HD(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.pc()||(b.ariaSelected="true",b.appendChild(TA()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));
|
|
1495
1498
|
a.button.setAttribute("shaka-status",a.currentSelection.textContent);SA(a.menu);a.controls.dispatchEvent(new O("captionselectionupdated"))}function KD(a,b){return K(function(c){a.player.$f(b);return D(c,a.player.hg(!0),0)})}
|
|
1496
|
-
function GD(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}function JD(a){var b=0<a.player.Xb().length;UA(a.button,b);HD(a)}M("shaka.ui.TextSelection",ED);function LD(){}LD.prototype.create=function(a,b){return new ED(a,b)};bC("captions",new LD);BB("captions",new LD);function MD(a,b){gB.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.g=this.controls.g;this.eventManager.o(this.video,"volumechange",function(){return ND(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return OD(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return OD(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return ND(c)});this.eventManager.o(this.localization,"locale-updated",function(){return PD(c)});
|
|
1497
|
-
this.eventManager.o(this.localization,"locale-changed",function(){return PD(c)});ND(this);PD(this);if(this.ad)this.onChange()}pa(MD,gB);MD.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function ND(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);QD(a)}function OD(a){var b=a.ad.getVolume();a.setValue(b);QD(a)}
|
|
1498
|
-
function QD(a){var b=a.g.volumeBarColors,c=["to right"];c.push(b.level+
|
|
1499
|
+
function GD(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}function JD(a){var b=0<a.player.Xb().length;UA(a.button,b);HD(a)}M("shaka.ui.TextSelection",ED);function LD(){}LD.prototype.create=function(a,b){return new ED(a,b)};bC("captions",new LD);BB("captions",new LD);function MD(a,b){gB.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.g=this.controls.g;this.setRange(0,100);this.eventManager.o(this.video,"volumechange",function(){return ND(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return OD(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return OD(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return ND(c)});this.eventManager.o(this.localization,"locale-updated",function(){return PD(c)});
|
|
1500
|
+
this.eventManager.o(this.localization,"locale-changed",function(){return PD(c)});ND(this);PD(this);if(this.ad)this.onChange()}pa(MD,gB);MD.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()/100):(this.video.volume=this.getValue()/100,this.video.muted=0==this.video.volume?!0:!1)};function ND(a){a.video.muted?a.setValue(0):a.setValue(100*a.video.volume);QD(a)}function OD(a){var b=a.ad.getVolume();a.setValue(100*b);QD(a)}
|
|
1501
|
+
function QD(a){var b=a.g.volumeBarColors,c=["to right"];c.push(b.level+a.getValue()+"%");c.push(b.base+a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function PD(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}M("shaka.ui.VolumeBar",MD);function RD(){}RD.prototype.create=function(a,b){return new MD(a,b)};BB("volume",new RD);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
|
|
1499
1502
|
|
|
1500
1503
|
//# sourceMappingURL=shaka-player.ui.map
|