shaka-player 4.3.14 → 4.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/shaka-bot-commands/lib.sh +37 -12
- package/.github/workflows/shaka-bot-commands/main.sh +4 -2
- package/.github/workflows/talk-to-shaka-bot.yaml +1 -0
- package/CHANGELOG.md +9 -0
- package/dist/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/locales.js +32 -32
- package/dist/shaka-player.compiled.debug.js +14 -12
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +113 -113
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.debug.js +16 -15
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +227 -227
- package/dist/shaka-player.ui.map +2 -2
- package/lib/deprecate/deprecate.js +1 -1
- package/lib/hls/hls_parser.js +16 -1
- package/lib/media/manifest_parser.js +2 -1
- package/lib/player.js +2 -2
- package/lib/polyfill/mediasource.js +5 -36
- package/lib/text/vtt_text_parser.js +2 -1
- package/lib/util/error.js +1 -0
- package/package.json +2 -2
- package/test/hls/hls_parser_unit.js +28 -0
- package/test/player_integration.js +9 -1
- package/test/player_load_graph_integration.js +13 -7
- package/test/player_src_equals_integration.js +2 -2
- package/test/player_unit.js +9 -3
- package/test/text/vtt_text_parser_unit.js +31 -0
- package/ui/less/containers.less +1 -0
|
@@ -155,7 +155,7 @@ d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.A)?1:Math.abs(this.A),g=f*e.band
|
|
|
155
155
|
r.segmentDownloaded=function(a,b){this.i.sample(a,b);if(null!=this.s&&this.o)a:{if(!this.F){a=this.i;if(!(a.g>=a.i))break a;this.F=!0}else if(Date.now()-this.s<1E3*this.g.switchInterval)break a;a=this.chooseVariant();this.i.getBandwidthEstimate(ue(this));a&&this.l(a)}};r.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(ue(this))};r.setVariants=function(a){this.m=a};r.playbackRateChanged=function(a){this.A=a};
|
|
156
156
|
r.setMediaElement=function(a){var b=this;this.j=a;this.h&&(this.h.disconnect(),this.h=null);this.j&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.D.O(ve)}),this.h.observe(this.j))};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};function ue(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}
|
|
157
157
|
function te(a,b,c,d){a&&(b=b.filter(function(e){return Qd(e,a,{width:d,height:c})}));return b.sort(function(e,f){return e.bandwidth-f.bandwidth})}G("shaka.abr.SimpleAbrManager",se);se.prototype.configure=se.prototype.configure;se.prototype.setMediaElement=se.prototype.setMediaElement;se.prototype.playbackRateChanged=se.prototype.playbackRateChanged;se.prototype.setVariants=se.prototype.setVariants;se.prototype.getBandwidthEstimate=se.prototype.getBandwidthEstimate;se.prototype.segmentDownloaded=se.prototype.segmentDownloaded;
|
|
158
|
-
se.prototype.disable=se.prototype.disable;se.prototype.enable=se.prototype.enable;se.prototype.chooseVariant=se.prototype.chooseVariant;se.prototype.init=se.prototype.init;se.prototype.release=se.prototype.release;se.prototype.stop=se.prototype.stop;var ve=1;function we(a,b){this.g=a;this.h=b}we.prototype.toString=function(){return"v"+this.g+"."+this.h};function xe(a,b){var c=new we(5,0),d=ye,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function ze(a,b,c,d){cb([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Ae(a,b,c,d){bb([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var ye=null;G("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function Be(a,b){this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value)}Be.prototype.add=function(a){return Ce(this.h,a)?(this.g.add(a),!0):!1};
|
|
158
|
+
se.prototype.disable=se.prototype.disable;se.prototype.enable=se.prototype.enable;se.prototype.chooseVariant=se.prototype.chooseVariant;se.prototype.init=se.prototype.init;se.prototype.release=se.prototype.release;se.prototype.stop=se.prototype.stop;var ve=1;function we(a,b){this.g=a;this.h=b}we.prototype.toString=function(){return"v"+this.g+"."+this.h};function xe(a,b){var c=new we(5,0),d=ye,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function ze(a,b,c,d){cb([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Ae(a,b,c,d){bb([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var ye=null;G("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function Be(a,b){this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value)}Be.prototype.add=function(a){return Ce(this.h,a)?(this.g.add(a),!0):!1};
|
|
159
159
|
function Ce(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&De(c,d)&&Ee(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(a=a.video,b=b.video,c=!(De(a,b)&&Ee(a.roles,b.roles)));return c?!1:!0}Be.prototype.values=function(){return this.g.values()};
|
|
160
160
|
function De(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return ed(d)[0]});b=b.codecs.split(",").map(function(d){return ed(d)[0]});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function Ee(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function Fe(a){this.g=a;this.h=new Ge(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Fe.prototype.create=function(a){var b=this,c=a.filter(function(d){return Ce(b.g,d)});return c.length?new Be(c[0],c):this.h.create(a)};function Ge(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
|
|
161
161
|
Ge.prototype.create=function(a){var b=[];b=He(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Ie(b,this.j);a.length&&(b=a);this.g&&(a=Fd(b,this.g),a.length&&(b=a));this.h&&(a=Je(b,this.h),a.length&&(b=a));a=new Be(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,Ce(a.h,c)&&a.add(c);return a};function He(a,b){b=ud(b);var c=Bd(b,a.map(function(d){return Ad(d)}));return c?a.filter(function(d){return c==Ad(d)}):[]}
|
|
@@ -238,7 +238,7 @@ function wg(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseSer
|
|
|
238
238
|
function Ng(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={qa:g.qa},h=a.next()){g.qa=h.value;b.includes(g.qa.licenseServerUri)||b.push(g.qa.licenseServerUri);d.includes(g.qa.serverCertificateUri)||d.push(g.qa.serverCertificateUri);g.qa.serverCertificate&&(c.some(function(m){return function(n){return Lb(n,m.qa.serverCertificate)}}(g))||c.push(g.qa.serverCertificate));if(g.qa.initData){h={};for(var k=t(g.qa.initData),l=k.next();!l.done;h={Ic:h.Ic},l=k.next())h.Ic=l.value,e.some(function(m){return function(n){var p=
|
|
239
239
|
m.Ic;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Lb(n.initData,p.initData)}}(h))||e.push(h.Ic)}if(g.qa.keyIds)for(h=t(g.qa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
|
|
240
240
|
function yg(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(b=b.get(e)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||(a.serverCertificate=
|
|
241
|
-
c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var Ug=1,Qg=5,Rg=.5,Wg=new oc(function(){return Ob(new Uint8Array([0]))});function Xg(){}function Yg(a,b,c,d){var e,f,g,h;return D(function(k){if(1==k.g){if(d&&(e=Zg[d.toLowerCase()]))return k.return(e);if(f=$g(a))if(g=ah[f])return k.return(g);return d?k.B(2):u(k,bh(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=Zg[d]))return k.return(h);throw new L(2,4,4E3,a);})}function bh(a,b,c){var d,e,f;return D(function(g){if(1==g.g)return d=jf([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g.return(f?f.toLowerCase().split(";").shift():"")})}
|
|
241
|
+
c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var Ug=1,Qg=5,Rg=.5,Wg=new oc(function(){return Ob(new Uint8Array([0]))});function Xg(){}function Yg(a,b,c,d){var e,f,g,h;return D(function(k){if(1==k.g){if(d&&(e=Zg[d.toLowerCase()]))return k.return(e);if(f=$g(a))if(g=ah[f])return k.return(g);return d?k.B(2):u(k,bh(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=Zg[d]))return k.return(h);throw new L(2,4,4E3,a,d);})}function bh(a,b,c){var d,e,f;return D(function(g){if(1==g.g)return d=jf([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g.return(f?f.toLowerCase().split(";").shift():"")})}
|
|
242
242
|
function $g(a){a=(new Tb(a)).ta.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}G("shaka.media.ManifestParser",Xg);Xg.unregisterParserByMime=function(a){delete Zg[a]};Xg.registerParserByMime=function(a,b){Zg[a]=b};Xg.registerParserByExtension=function(a,b){ah[a]=b};var Zg={},ah={};function ch(a){function b(){d=!0}function c(l){f.push(l);Kf(l)}a=Nb(a);var d=!1,e,f=[],g=[];(new Ff).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).M("stsd",function(l){e=l;f.push(l);Mf(l)}).M("encv",b).M("enca",b).M("dvav",function(l){g.push({box:l,xa:1701733238})}).M("dva1",function(l){g.push({box:l,xa:1701733238})}).M("dvh1",function(l){g.push({box:l,xa:1701733238})}).M("dvhe",function(l){g.push({box:l,xa:1701733238})}).M("hev1",function(l){g.push({box:l,xa:1701733238})}).M("hvc1",
|
|
243
243
|
function(l){g.push({box:l,xa:1701733238})}).M("avc1",function(l){g.push({box:l,xa:1701733238})}).M("avc3",function(l){g.push({box:l,xa:1701733238})}).M("ac-3",function(l){g.push({box:l,xa:1701733217})}).M("ec-3",function(l){g.push({box:l,xa:1701733217})}).M("ac-4",function(l){g.push({box:l,xa:1701733217})}).M("mp4a",function(l){g.push({box:l,xa:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw ib(Qc(a)),new L(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,
|
|
244
244
|
a=dh(a,e,k.box,f,k.xa);return a}
|
|
@@ -447,13 +447,14 @@ enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},upda
|
|
|
447
447
|
function em(a,b){var c,d,e,f;return D(function(g){return 1==g.g?(c=Date.now()/1E3,d=!0,a.m=Dm(a,{rb:a.F,onError:function(h){um(a,h)},gd:function(h){Em(a,h)},onExpirationUpdated:function(h,k){Fm(a,h,k)},onEvent:function(h){a.dispatchEvent(h);"drmsessionupdate"==h.type&&d&&(d=!1,a.o.j=Date.now()/1E3-c,a.L&&(h=a.L,h.g&&h.h.classList.add("shaka-hidden")))}}),a.m.configure(a.h.drm),(e=Rd(a.i.variants,a.h.restrictions,a.Cb))&&a.j&&Gm(a),f=oe(a.i.variants),u(g,sg(a.m,f,a.i.offlineSessionIds),2)):3!=g.g?
|
|
448
448
|
u(g,a.m.ac(b.mediaElement),3):u(g,zm(a,a.i),0)})}
|
|
449
449
|
function fm(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C,A;return D(function(z){switch(z.g){case 1:b.startTime=c.startTime;null!=a.qc&&(b.startTime=a.qc,a.qc=null);d=b.mediaElement;e=b.uri;a.bc=e;a.J=new Vj({Wc:function(){return d.playbackRate},kc:function(){return d.defaultPlaybackRate},qe:function(E){d.playbackRate=E},Se:function(E){d.currentTime+=E}});f=function(){return Hm(a)};g=function(){return Im(a)};a.u.C(d,"playing",f);a.u.C(d,"pause",f);a.u.C(d,"ended",f);a.u.C(d,"ratechange",g);mm(a,a.h);
|
|
450
|
-
h=a.h.abrFactory;a.s&&a.Ud==h||(a.Ud=h,a.s=h(),"function"!=typeof a.s.setMediaElement&&(xe("AbrManager","Please use an AbrManager with setMediaElement function."),a.s.setMediaElement=function(){}),a.s.configure(a.h.abr));a.Ab=new Ge(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Bb=a.h.preferredTextLanguage;a.ic=a.h.preferredTextRole;a.hc=a.h.preferForcedSubs;Jm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.s.init(function(E,
|
|
451
|
-
Km(a,E,!0,void 0===F?!1:F,void 0===H?0:H)});a.s.setMediaElement(d);Dd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Lm(a);a.j.configure(a.h.streaming);a.l=Mm;d.textTracks&&a.u.C(d.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":Nm(a,E)}});a.dispatchEvent(jm("streaming"));k=null;(l=a.j.l)||(k=km(a));m=[];n=l||k;p=t([n.video,n.audio]);for(q=p.next();!q.done;q=p.next())(v=
|
|
452
|
-
m.push(v.createSegmentIndex());if(!(0<m.length)){z.B(2);break}return u(z,Promise.all(m),2);case 2:if(a.D&&a.D.onInitialVariantChosen)a.D.onInitialVariantChosen(n);Jm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.A=Om(a,b.startTime);a.yb=Pm(a,b.kd);w=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Qm(a,w);if(l){z.B(4);break}Km(a,k,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){z.B(4);break}x=a.A.Mc();return u(z,Rm(k,x),6);case 6:y=z.h,a.A.Fd(y);
|
|
453
|
-
C=a.Kb().find(function(E){return E.active}),C||((A=pe(a.i.textStreams,a.Bb,a.ic,a.hc)[0]||null)&&Ul(a.o.h,A,!0),k&&(A?(k.audio&&Sm(a,k.audio,A)&&(a.ea=!0),a.ea&&a.H.m.setTextVisibility(!0),Tm(a)):a.ea=!1),A&&(a.h.streaming.alwaysStreamText||a.Md())&&Qk(a.j,A)),u(z,a.j.start(),7);case 7:a.h.abr.enabled&&(a.s.enable(),Um(a)),Ud(a.j?a.j.l:null,a.i),Vm(a.i),Gm(a),Wm(a),a.i.variants.some(function(E){return E.primary}),a.jc=!0,a.u.ca(d,"loadedmetadata",function(){a.o.m=Date.now()/
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
450
|
+
h=a.h.abrFactory;a.s&&a.Ud==h||(a.Ud=h,a.s=h(),"function"!=typeof a.s.setMediaElement&&(xe("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),a.s.setMediaElement=function(){}),a.s.configure(a.h.abr));a.Ab=new Ge(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Bb=a.h.preferredTextLanguage;a.ic=a.h.preferredTextRole;a.hc=a.h.preferForcedSubs;Jm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.s.init(function(E,
|
|
451
|
+
F,H){a.j&&E!=a.j.l&&Km(a,E,!0,void 0===F?!1:F,void 0===H?0:H)});a.s.setMediaElement(d);Dd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Lm(a);a.j.configure(a.h.streaming);a.l=Mm;d.textTracks&&a.u.C(d.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":Nm(a,E)}});a.dispatchEvent(jm("streaming"));k=null;(l=a.j.l)||(k=km(a));m=[];n=l||k;p=t([n.video,n.audio]);for(q=p.next();!q.done;q=p.next())(v=
|
|
452
|
+
q.value)&&!v.segmentIndex&&m.push(v.createSegmentIndex());if(!(0<m.length)){z.B(2);break}return u(z,Promise.all(m),2);case 2:if(a.D&&a.D.onInitialVariantChosen)a.D.onInitialVariantChosen(n);Jm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.A=Om(a,b.startTime);a.yb=Pm(a,b.kd);w=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Qm(a,w);if(l){z.B(4);break}Km(a,k,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){z.B(4);break}x=a.A.Mc();return u(z,Rm(k,x),6);case 6:y=z.h,a.A.Fd(y);
|
|
453
|
+
case 4:return a.A.Ed(),C=a.Kb().find(function(E){return E.active}),C||((A=pe(a.i.textStreams,a.Bb,a.ic,a.hc)[0]||null)&&Ul(a.o.h,A,!0),k&&(A?(k.audio&&Sm(a,k.audio,A)&&(a.ea=!0),a.ea&&a.H.m.setTextVisibility(!0),Tm(a)):a.ea=!1),A&&(a.h.streaming.alwaysStreamText||a.Md())&&Qk(a.j,A)),u(z,a.j.start(),7);case 7:a.h.abr.enabled&&(a.s.enable(),Um(a)),Ud(a.j?a.j.l:null,a.i),Vm(a.i),Gm(a),Wm(a),a.i.variants.some(function(E){return E.primary}),a.jc=!0,a.u.ca(d,"loadedmetadata",function(){a.o.m=Date.now()/
|
|
454
|
+
1E3-c.kd}),B(z)}})}
|
|
455
|
+
function gm(a,b,c){var d,e,f,g,h,k,l;return D(function(m){return 1==m.g?(d=mc,e=Date.now()/1E3,f=!0,a.m=Dm(a,{rb:a.F,onError:function(n){um(a,n)},gd:function(n){Em(a,n)},onExpirationUpdated:function(n,p){Fm(a,n,p)},onEvent:function(n){a.dispatchEvent(n);"drmsessionupdate"==n.type&&f&&(f=!1,a.o.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=$g(g),k=nm[h],"application/x-mpegurl"==k&&zc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,primary:!1,
|
|
456
|
+
audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?fd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.ra,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
457
|
+
a.m.W=!0,u(m,sg(a.m,[l],[]),2)):u(m,a.m.ac(b.mediaElement),0)})}
|
|
457
458
|
function hm(a,b,c){function d(){return Hm(a)}b.uri=c.uri;b.startTime=c.startTime;a.bc=b.uri;var e=b.mediaElement;a.A=new Jj(e);var f=!1;a.fc.push(function(){f=!0});null!=b.startTime&&a.A.Fd(b.startTime);a.J=new Vj({Wc:function(){return e.playbackRate},kc:function(){return e.defaultPlaybackRate},qe:function(k){e.playbackRate=k},Se:function(k){e.currentTime+=k}});Qm(a,a.h.streaming.rebufferingGoal);a.u.C(e,"playing",d);a.u.C(e,"pause",d);a.u.C(e,"ended",d);a.u.C(e,"ratechange",function(){return Im(a)});
|
|
458
459
|
"none"!=e.preload&&a.u.ca(e,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.kd});e.audioTracks&&(a.u.C(e.audioTracks,"addtrack",function(){return Gm(a)}),a.u.C(e.audioTracks,"removetrack",function(){return Gm(a)}),a.u.C(e.audioTracks,"change",function(){return Gm(a)}));e.textTracks&&(a.u.C(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Xm(a,k);break;case "chapters":Nm(a,k);break;default:Gm(a)}}),a.u.C(e.textTracks,"removetrack",function(){return Gm(a)}),
|
|
459
460
|
a.u.C(e.textTracks,"change",function(){return Gm(a)}));var g=$g(b.uri);e.src=vk(a.V,b.uri,nm[g]);(wc()||vc("Web0S"))&&e.load();a.l=Ym;a.dispatchEvent(jm("streaming"));var h=new nc;Aj(e,HTMLMediaElement.HAVE_METADATA,a.u,function(){a.A.Ed();h.resolve()});Aj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.u,function(){var k;return D(function(l){if(1==l.g)return Zm(a),k=$m(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.ea=!0),l.B(2)):u(l,new Promise(function(m){a.u.ca(e.textTracks,"change",
|
|
@@ -539,14 +540,14 @@ U.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return D(function(h
|
|
|
539
540
|
qc()?!!ah[p]:rc(l[p]);c=k;p='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",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(ka(ej));
|
|
540
541
|
k={};p=t(p);for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=qc()?hd(l)?!0:jb(l)||Wc(l):rc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=yn;for(g in f)e[g]=f[g]();return h.return(e)})};
|
|
541
542
|
U.isBrowserSupported=function(){window.Promise||cb("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||vc("Trident/"))return!1;var a=Bc();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:qc()?!0:rc("application/x-mpegurl")};U.setAdManagerFactory=function(a){Zl=a};
|
|
542
|
-
U.registerSupportPlugin=function(a,b){yn[a]=b};U.prototype.destroy=U.prototype.destroy;var om=0,Wl=1,Mm=2,Ym=3;U.LoadMode={DESTROYED:om,NOT_LOADED:Wl,MEDIA_SOURCE:Mm,SRC_EQUALS:Ym};U.version="v4.3.
|
|
543
|
+
U.registerSupportPlugin=function(a,b){yn[a]=b};U.prototype.destroy=U.prototype.destroy;var om=0,Wl=1,Mm=2,Ym=3;U.LoadMode={DESTROYED:om,NOT_LOADED:Wl,MEDIA_SOURCE:Mm,SRC_EQUALS:Ym};U.version="v4.3.15";var zn=["4","3"];ye=new function(a){this.g=a;this.i=ze;this.h=Ae}(new we(Number(zn[0]),Number(zn[1])));
|
|
543
544
|
var xn=["output-restricted","internal-error"],yn={},Zl=null,nm={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},rn={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
544
545
|
ssa:"text/x-ssa",ass:"text/x-ssa"};function An(){this.h=[];this.j=this.i=this.g=0};function W(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.j=this.g.getVolume();this.l=new sf;this.l.C(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.l.C(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=W.prototype;r.getDuration=function(){return this.h.getDuration()};r.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.g.getRemainingTime()};r.isPaused=function(){return this.i};
|
|
545
546
|
r.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.g.getAdSkippableState()};r.skip=function(){return this.g.skip()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.resume()};r.getVolume=function(){return this.g.getVolume()};r.setVolume=function(a){return this.g.setVolume(a)};r.isMuted=function(){return 0==this.g.getVolume()};
|
|
546
547
|
r.isLinear=function(){return this.h.isLinear()};r.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.g.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){a?(this.j=this.getVolume(),this.setVolume(0)):this.setVolume(this.j)};r.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};
|
|
547
548
|
r.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.h.getTitle()};r.getDescription=function(){return this.h.getDescription()};r.release=function(){this.g=this.h=null};G("shaka.ads.ClientSideAd",W);W.prototype.release=W.prototype.release;W.prototype.getDescription=W.prototype.getDescription;W.prototype.getTitle=W.prototype.getTitle;W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;
|
|
548
549
|
W.prototype.getSequenceLength=W.prototype.getSequenceLength;W.prototype.setMuted=W.prototype.setMuted;W.prototype.resize=W.prototype.resize;W.prototype.isLinear=W.prototype.isLinear;W.prototype.isMuted=W.prototype.isMuted;W.prototype.setVolume=W.prototype.setVolume;W.prototype.getVolume=W.prototype.getVolume;W.prototype.play=W.prototype.play;W.prototype.pause=W.prototype.pause;W.prototype.skip=W.prototype.skip;W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;
|
|
549
|
-
W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function Bn(a,b,c,d){var e=this;this.o=a;this.i=b;this.u=!1;this.s=null;this.A=NaN;this.l=d;this.j=null;this.h=new sf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.3.
|
|
550
|
+
W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function Bn(a,b,c,d){var e=this;this.o=a;this.i=b;this.u=!1;this.s=null;this.A=NaN;this.l=d;this.j=null;this.h=new sf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.3.15");this.g=null;this.h.ca(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Cn(e,f)});this.h.C(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
550
551
|
function(f){Dn(e,f)});this.h.C(this.i,"ended",function(){e.m.contentComplete()});this.h.ca(this.i,"play",function(){e.u=!0})}Bn.prototype.stop=function(){this.g&&this.g.stop();this.o&&tl(this.o)};Bn.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function Dn(a,b){b.getError();En(a,null);a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
551
552
|
function Cn(a,b){a.l(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.A)));a.g=b.getAdsManager(a.i);a.l(new O("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){b=[];c=t(c);for(var d=c.next();!d.done;d=c.next())b.push({start:d.value,end:null});a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Fn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Gn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.C(a.i,"loadeddata",
|
|
552
553
|
function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Gn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Gn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)):a.h.C(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Gn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.u?a.g.start():a.h.ca(a.i,"play",
|
|
@@ -569,8 +570,8 @@ f;e.i(new O("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}In.prototyp
|
|
|
569
570
|
function Jn(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.F||a.h.C(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){$e.call(this);this.g=this.i=null;this.h=new An;this.j=navigator.language}ta(Y,$e);r=Y.prototype;r.setLocale=function(a){this.j=a};r.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new L(2,10,1E4);this.i&&this.i.release();this.i=new Bn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
570
571
|
r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);$e.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new O("ad-stopped"));this.h=new An};r.requestClientSideAds=function(a){if(!this.i)throw new L(1,10,10001);var b=this.i;b.A=Date.now()/1E3;b.m.requestAds(a)};
|
|
571
572
|
r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new L(2,10,10002);this.g&&this.g.release();this.g=new In(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
572
|
-
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new L(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&cb('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.3.
|
|
573
|
-
(c.F=!0),c.j=new nc,c.g.requestStream(a),c.A=b||"",c.G=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new L(1,10,10003);(a.mpt||a.mpv)&&cb('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.3.
|
|
573
|
+
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new L(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&cb('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.3.15";c=this.g;c.j?a=Promise.reject(new L(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
574
|
+
(c.F=!0),c.j=new nc,c.g.requestStream(a),c.A=b||"",c.G=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new L(1,10,10003);(a.mpt||a.mpv)&&cb('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.3.15";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new L(1,10,10003);return this.g.D};
|
|
574
575
|
r.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};G("shaka.ads.AdManager",Y);
|
|
575
576
|
Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.getStats=Y.prototype.getStats;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;
|
|
576
577
|
Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.setLocale=Y.prototype.setLocale;Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";
|
|
@@ -783,8 +784,8 @@ function dr(a,b){b=jf([b],a.g.retryParameters);a.j.modifyManifestRequest(b,{form
|
|
|
783
784
|
function Vr(a,b,c){if(!a.H)throw new L(2,7,7001);b=a.j.networkingEngine.request(c,b);df(a.H,b);return b.promise}G("shaka.hls.HlsParser",ar);
|
|
784
785
|
var sr={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},tr={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"},ur={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"},as={audio:tr,video:ur,text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
785
786
|
vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Lr={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new L(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new L(2,4,4041);return hc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Hq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
|
|
786
|
-
b=Hq(a,"URI");b=$q(b);b=Nb(b.data);b=hc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Hq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Hq(a,"URI");a=$q(a);a=Nb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Qf(a,b,new Set,0);return hc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a
|
|
787
|
-
Hq(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?hc("org.w3.clearkey",null):null}},cr="VOD",Wr="EVENT",Er="LIVE",ir={lf:cr,Tg:Wr,Xg:Er};vc("Tizen 3")||vc("Tizen 2")||xc()||(ah.m3u8=function(){return new ar},Zg["application/x-mpegurl"]=function(){return new ar},Zg["application/vnd.apple.mpegurl"]=function(){return new ar});function bs(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=Ic(b)}catch(g){}throw new L(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function cs(){}function ds(a,b,c,d,e){var f=new es;zf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new fs,h={De:!1,ff:!1};a=gs(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 Re(a,function(){h.De=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new M(function(){h.ff=!0;g.abort()});k.O(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
787
|
+
b=Hq(a,"URI");b=$q(b);b=Nb(b.data);b=hc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Hq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Hq(a,"URI");a=$q(a);a=Nb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Qf(a,b,new Set,0);return hc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a,
|
|
788
|
+
b){if("video/mp2t"==b)throw new L(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new L(2,4,4041);a=Hq(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?hc("org.w3.clearkey",null):null}},cr="VOD",Wr="EVENT",Er="LIVE",ir={lf:cr,Tg:Wr,Xg:Er};vc("Tizen 3")||vc("Tizen 2")||xc()||(ah.m3u8=function(){return new ar},Zg["application/x-mpegurl"]=function(){return new ar},Zg["application/vnd.apple.mpegurl"]=function(){return new ar});function bs(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=Ic(b)}catch(g){}throw new L(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function cs(){}function ds(a,b,c,d,e){var f=new es;zf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new fs,h={De:!1,ff:!1};a=gs(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 Re(a,function(){h.De=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new M(function(){h.ff=!0;g.abort()});k.O(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
788
789
|
function gs(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,w,x,y,C,A;return D(function(z){switch(z.g){case 1:return h=hs,k=is,p=n=0,q=Date.now(),xa(z,2),u(z,h(a,c),4);case 4:l=z.h;f(js(l.headers));if("HEAD"==c.method){z.B(5);break}v=l.clone().body.getReader();x=(w=l.headers.get("Content-Length"))?parseInt(w,10):0;y=function(E){function F(){var H,I;return D(function(J){switch(J.g){case 1:return xa(J,2),u(J,v.read(),4);case 4:H=J.h;za(J,3);break;case 2:return Aa(J),J.return();case 3:if(H.done){J.B(5);break}n+=
|
|
789
790
|
H.value.byteLength;if(!g){J.B(5);break}return u(J,g(H.value),5);case 5:I=Date.now();if(100<I-q||H.done)e(I-q,n-p,x-n),p=n,q=I;H.done?E.close():(E.enqueue(H.value),F());B(J)}})}F()};new k({start:y});return u(z,l.arrayBuffer(),6);case 6:m=z.h;case 5:za(z,3);break;case 2:C=Aa(z);if(d.De)throw new L(1,1,7001,a,b);if(d.ff)throw new L(1,1,1003,a,b);throw new L(1,1,1002,a,C,b);case 3:return A=js(l.headers),z.return(bs(A,m,l.status,a,l.url,b))}})}
|
|
790
791
|
function js(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function ks(){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)}G("shaka.net.HttpFetchPlugin",cs);cs.isSupported=ks;cs.parse=ds;var hs=window.fetch,fs=window.AbortController,is=window.ReadableStream,es=window.Headers;
|
|
@@ -877,115 +878,114 @@ function ru(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=docum
|
|
|
877
878
|
function vu(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C;return D(function(A){switch(A.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return A.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!qc())return A.return(b);if(c){if(yc())if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var z=c.contentType;c.width&&c.height&&(z+="; width="+c.width+"; height="+c.height);c.framerate&&(z+="; framerate="+c.framerate);"pq"===c.transferFunction&&
|
|
878
879
|
(z+="; eotf=smpte2084");e=cast.__platform__.canDisplayType(z)}else e=jb(c.contentType);else wc()?(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=jb(f)):e=jb(c.contentType);if(!e)return A.return(b)}if(d&&(yc()&&d.spatialRendering?(h=d.contentType+"; spatialRendering=true",g=jb(h)):g=jb(d.contentType),!g))return A.return(b)}else if("file"==a.type){if(c&&(k=c.contentType,l=rc(k),
|
|
879
880
|
!l)||d&&(m=d.contentType,n=rc(m),!n))return A.return(b)}else return A.return(b);if(!a.keySystemConfiguration)return b.supported=!0,A.return(Promise.resolve(b));p=a.keySystemConfiguration;q=[];v=[];p.audio&&(w={robustness:p.audio.robustness||"",contentType:a.audio.contentType},wc()&&a.audio.contentType.includes('codecs="ac-3"')&&(w={robustness:w.robustness,contentType:'audio/mp4; codecs="ec-3"'}),q.push(w));p.video&&(x={robustness:p.video.robustness||"",contentType:a.video.contentType},v.push(x));
|
|
880
|
-
y={initDataTypes:[p.initDataType],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};q.length&&(y.audioCapabilities=q);v.length&&(y.videoCapabilities=v);xa(A,3);return u(A,navigator.requestMediaKeySystemAccess(p.keySystem,[y]),5);case 5:C=A.h;za(A,4);break;case 3:Aa(A);case 4:C&&(b.supported=!0,b.keySystemAccess=C);case 2:return A.return(b)}})}du.MediaCapabilities=su;su.install=tu;var uu=null;su.originalMcap=uu;eu(tu,-1);function wu(){}function xu(){var a=Bc();window.MediaSource&&(
|
|
881
|
-
function
|
|
882
|
-
function Cu(){var a=MediaSource.isTypeSupported;
|
|
883
|
-
function
|
|
884
|
-
function
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
function
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
Qu;
|
|
891
|
-
function Ru(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
881
|
+
y={initDataTypes:[p.initDataType],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};q.length&&(y.audioCapabilities=q);v.length&&(y.videoCapabilities=v);xa(A,3);return u(A,navigator.requestMediaKeySystemAccess(p.keySystem,[y]),5);case 5:C=A.h;za(A,4);break;case 3:Aa(A);case 4:C&&(b.supported=!0,b.keySystemAccess=C);case 2:return A.return(b)}})}du.MediaCapabilities=su;su.install=tu;var uu=null;su.originalMcap=uu;eu(tu,-1);function wu(){}function xu(){var a=Bc();window.MediaSource&&(yc()?yu():a?12>=a?(zu(),Au()):15>=a&&zu():tc()?yu():(vc("Tizen 2")||vc("Tizen 3")||vc("Tizen 4"))&&Bu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Cu()}function zu(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Na.apply(0,arguments));b.abort=function(){};return b}}
|
|
882
|
+
function Au(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function yu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}function Bu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=ed(b)[0]&&a(b)}}
|
|
883
|
+
function Cu(){var a=MediaSource.isTypeSupported;vc("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)})}du.MediaSource=wu;wu.install=xu;eu(xu);function Du(){}function Eu(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?Fu():void 0!=window.orientation&&Gu())}function Fu(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
|
|
884
|
+
function Gu(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new Hu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new O("change");b.dispatchEvent(c)})}du.Orientation=Du;Du.install=Eu;function Hu(){$e.call(this);this.type="";this.angle=0}ta(Hu,$e);
|
|
885
|
+
Hu.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
|
|
886
|
+
Hu.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};eu(Eu);function Iu(){}var Ju,Ku,Lu,Mu,Nu,Ou;function Pu(a,b){try{var c=new Qu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Ru(a){var b=this.mediaKeys;b&&b!=a&&Su(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Su(a,this):Promise.resolve()}
|
|
887
|
+
function Tu(a){a=Nb(a.initData);if(Rb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Gc(a.subarray(4),!0);a=Jc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Ob(a);this.dispatchEvent(b)}du.PatchedMediaKeysApple=Iu;
|
|
888
|
+
Iu.uninstall=function(){Ju&&(Ju=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Ku),HTMLMediaElement.prototype.setMediaKeys=Lu,window.MediaKeys=Mu,window.MediaKeySystemAccess=Nu,navigator.requestMediaKeySystemAccess=Ou,Ku=Ou=Lu=Nu=Mu=null,window.shakaMediaKeysPolyfill=!1)};
|
|
889
|
+
Iu.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)Ju=!0,Ku=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Lu=HTMLMediaElement.prototype.setMediaKeys,Mu=window.MediaKeys,Nu=window.MediaKeySystemAccess,Ou=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Ru;window.MediaKeys=Uu;window.MediaKeySystemAccess=Qu;navigator.requestMediaKeySystemAccess=
|
|
890
|
+
Pu;window.shakaMediaKeysPolyfill=!0}};
|
|
891
|
+
function Qu(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
892
892
|
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
893
|
-
|
|
894
|
-
function
|
|
895
|
-
r.generateRequest=function(a,b){var c=this;this.h=new nc;try{var d=this.l.createSession("video/mp4",Nb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.C(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Jb()?"license-request":"license-renewal").set("message",Ob(e.message));e=new O("message",e);c.dispatchEvent(e)});this.j.C(d,"webkitkeyadded",function(){c.g&&(
|
|
896
|
-
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:
|
|
897
|
-
r.update=function(a){this.g=new nc;try{this.i.update(Nb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ma()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function
|
|
898
|
-
function
|
|
899
|
-
function
|
|
900
|
-
function
|
|
901
|
-
function
|
|
902
|
-
function
|
|
893
|
+
Qu.prototype.createMediaKeys=function(){var a=new Uu(this.keySystem);return Promise.resolve(a)};Qu.prototype.getConfiguration=function(){return this.g};function Uu(a){this.h=new WebKitMediaKeys(a);this.g=new sf}Uu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Vu(this.h,a)};Uu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
894
|
+
function Su(a,b){a.g.Ma();if(!b)return Promise.resolve();a.g.C(b,"webkitneedkey",Tu);try{return Aj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Vu(a){$e.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new sf;this.sessionId="";this.expiration=NaN;this.closed=new nc;this.keyStatuses=new Wu}ta(Vu,$e);r=Vu.prototype;
|
|
895
|
+
r.generateRequest=function(a,b){var c=this;this.h=new nc;try{var d=this.l.createSession("video/mp4",Nb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.C(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Jb()?"license-request":"license-renewal").set("message",Ob(e.message));e=new O("message",e);c.dispatchEvent(e)});this.j.C(d,"webkitkeyadded",function(){c.g&&(Xu(c,"usable"),c.g.resolve(),c.g=null)});this.j.C(d,"webkitkeyerror",
|
|
896
|
+
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Xu(c,"output-not-allowed");break;default:Xu(c,"internal-error")}});Xu(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
897
|
+
r.update=function(a){this.g=new nc;try{this.i.update(Nb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ma()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Xu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new O("keystatuseschange");a.dispatchEvent(b)}
|
|
898
|
+
function Wu(){this.size=0;this.g=void 0}r=Wu.prototype;r.Jb=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,Wg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Wg.value();return this.g&&Lb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};function Yu(){}function Zu(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=$u,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=av,window.MediaKeys=bv,window.MediaKeySystemAccess=cv,window.shakaMediaKeysPolyfill=!0)}function $u(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
899
|
+
function av(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}du.PatchedMediaKeysNop=Yu;Yu.install=Zu;function bv(){throw new TypeError("Illegal constructor.");}bv.prototype.createSession=function(){};bv.prototype.setServerCertificate=function(){};function cv(){this.keySystem="";throw new TypeError("Illegal constructor.");}cv.prototype.getConfiguration=function(){};cv.prototype.createMediaKeys=function(){};eu(Zu,-10);function dv(){}
|
|
900
|
+
function ev(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)fv="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=gv;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=hv;window.MediaKeys=iv;window.MediaKeySystemAccess=jv;window.shakaMediaKeysPolyfill=!0}}
|
|
901
|
+
function kv(a){var b=fv;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function gv(a,b){try{var c=new jv(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function hv(a){var b=this.mediaKeys;b&&b!=a&&lv(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&lv(a,this);return Promise.resolve()}du.PatchedMediaKeysWebkit=dv;dv.install=ev;
|
|
902
|
+
function jv(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
|
|
903
903
|
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
|
|
904
|
-
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
905
|
-
function
|
|
906
|
-
d.g&&d.g.resolve(),d.g=null}),a.g.C(b,c+"keyerror",function(d){var e=
|
|
907
|
-
function
|
|
908
|
-
r.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?
|
|
909
|
-
function
|
|
910
|
-
function
|
|
911
|
-
function
|
|
912
|
-
r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=
|
|
913
|
-
r.forEach=function(a){this.g&&a(this.g,Wg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Wg.value();return this.g&&Lb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var
|
|
914
|
-
function
|
|
915
|
-
function
|
|
916
|
-
function
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{columns:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?Vf(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var p=t(e),q=p.next();!q.done;q=p.next()){var v=q.value;q=new rb;var w=v.getAttribute("xml:id");if(w){q.id=w;var x=null;n&&(x=
|
|
920
|
-
|
|
921
|
-
100*q.viewportAnchorX/w)),q.viewportAnchorUnits=y||null!=w?Ib:0}else q=null;q&&k.push(q)}if(Sf(d,"p").length)throw new L(2,2,2001,"<p> can only be inside <div> in TTML");n=t(Sf(d,"div"));for(p=n.next();!p.done;p=n.next())if(Sf(p.value,"span").length)throw new L(2,2,2001,"<span> can only be inside <p> in TTML");if(b=
|
|
922
|
-
function
|
|
923
|
-
(h?"default":"preserve"));y=Array.from(q.childNodes).every(function(E){return E.nodeType==Node.TEXT_NODE});h=[];if(!y)for(var C=t(q.childNodes),A=C.next();!A.done;A=C.next())(A=
|
|
924
|
-
C.end,p=p.parentNode;null==n&&(n=0);n+=b.periodStart;C=null==C?Infinity:C+b.periodStart;n=Math.max(n,b.segmentStart);C=Math.min(C,b.segmentEnd);if(!A&&0<h.length)for(n=Infinity,C=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),C=Math.max(C,c.endTime);if("br"==q.tagName)return e=new pb(n,C,""),e.lineBreak=!0,e;b="";y&&(b=q.textContent,x&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new pb(n,C,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=
|
|
925
|
-
if(q.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(E){return E.id==z})[0]}g=k;l&&d&&!q.getAttribute("region")&&!q.getAttribute("style")&&(g=
|
|
926
|
-
function
|
|
927
|
-
g))a.backgroundColor=h;if(h=
|
|
928
|
-
"bold"==h&&(a.fontWeight=700);h=
|
|
929
|
-
c,f,"textOutline",g))d=d.split(" "),d[0].match(
|
|
930
|
-
function
|
|
931
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&mb(a.textDecoration,"overline")}}function
|
|
932
|
-
function
|
|
933
|
-
function
|
|
934
|
-
function
|
|
935
|
-
function
|
|
936
|
-
function
|
|
937
|
-
function
|
|
938
|
-
var
|
|
939
|
-
end:"end"},
|
|
940
|
-
G("shaka.text.Mp4TtmlParser",
|
|
941
|
-
|
|
904
|
+
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}jv.prototype.createMediaKeys=function(){var a=new iv(this.g);return Promise.resolve(a)};jv.prototype.getConfiguration=function(){return this.h};function iv(a){this.l=a;this.h=null;this.g=new sf;this.i=[];this.j=new Map}
|
|
905
|
+
function lv(a,b){a.h=b;a.g.Ma();var c=fv;b&&(a.g.C(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Ob(d.initData);a.h.dispatchEvent(e)}),a.g.C(b,c+"keymessage",function(d){var e=mv(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Jb()?"licenserequest":"licenserenewal").set("message",d.message),d=new O("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.C(b,c+"keyadded",function(d){if(d=mv(a,d.sessionId))nv(d,"usable"),
|
|
906
|
+
d.g&&d.g.resolve(),d.g=null}),a.g.C(b,c+"keyerror",function(d){var e=mv(a,d.sessionId);e&&e.handleError(d)}))}iv.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new ov(b,this.l,a);this.i.push(a);return a};iv.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
907
|
+
function mv(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function ov(a,b,c){$e.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new nc;this.keyStatuses=new pv}ta(ov,$e);r=ov.prototype;
|
|
908
|
+
r.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?nv(this,"output-restricted"):1==b?nv(this,"expired"):nv(this,"internal-error"))};
|
|
909
|
+
function qv(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Nb(Jc("LOAD_SESSION|"+c));else{var e=Jc("PERSISTENT|");d=Rc(e,b)}else d=Nb(b)}catch(g){return Promise.reject(g)}a.h=new nc;var f=kv("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new M(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).O(.01)}return a.h}
|
|
910
|
+
function rv(a,b,c){if(a.g)a.g.then(function(){return rv(a,b,c)}).catch(function(){return rv(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Fc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Oc(e.keys[0].k);e=Oc(e.keys[0].kid)}else d=Nb(c),e=null;var f=kv("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
911
|
+
function nv(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new O("keystatuseschange");a.dispatchEvent(b)}r.generateRequest=function(a,b){return qv(this,b,null)};r.load=function(a){return"persistent-license"==this.l?qv(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new nc;rv(this,b,a);return b};
|
|
912
|
+
r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=kv("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function pv(){this.size=0;this.g=void 0}r=pv.prototype;r.Jb=function(){return this.g};
|
|
913
|
+
r.forEach=function(a){this.g&&a(this.g,Wg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Wg.value();return this.g&&Lb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var fv="";eu(ev);function sv(){}function tv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=uv,Object.defineProperty(a,"disablePictureInPicture",{get:vv,set:wv,enumerable:!0,configurable:!0}),document.exitPictureInPicture=xv,document.addEventListener("webkitpresentationmodechanged",yv,!0))}}
|
|
914
|
+
function yv(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
|
|
915
|
+
function uv(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function xv(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
916
|
+
function vv(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function wv(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}du.PiPWebkit=sv;sv.install=tv;eu(tv);function zv(){}function Av(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Bv))}function Bv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}du.RandomUUID=zv;zv.install=Av;eu(Av);function Cv(){}function Dv(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Ev)}function Ev(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}du.StorageEstimate=Cv;Cv.install=Dv;eu(Dv);function Fv(){}function Gv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Hv})}function Hv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}du.Symbol=Fv;Fv.install=Gv;eu(Gv);function Iv(){}function Jv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}du.VideoPlayPromise=Iv;Iv.install=Jv;eu(Jv);function Kv(){}function Lv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||xc())&&(a.getVideoPlaybackQuality=Mv)}}function Mv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}du.VideoPlaybackQuality=Kv;Kv.install=Lv;eu(Lv);function Nv(){}function Ov(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Pv;else if(6==b)a=Qv;else{try{var c=!!Pv(1,2,"")}catch(d){c=!1}c&&(a=Pv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Pv(a,b,c){return new window.TextTrackCue(a,b,c)}function Qv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}du.VTTCue=Nv;Nv.install=Ov;eu(Ov);function Rv(){}Rv.prototype.parseInit=function(){};Rv.prototype.setSequenceMode=function(){};Rv.prototype.parseMedia=function(a,b){var c=null,d=[];a=Fc(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=Sv.exec(e))){var f=Tv.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new pb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};G("shaka.text.LrcTextParser",Rv);Rv.prototype.parseMedia=Rv.prototype.parseMedia;
|
|
917
|
+
Rv.prototype.setSequenceMode=Rv.prototype.setSequenceMode;Rv.prototype.parseInit=Rv.prototype.parseInit;var Sv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Tv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;id["application/x-subtitle-lrc"]=function(){return new Rv};function Uv(){}Uv.prototype.parseInit=function(){};Uv.prototype.setSequenceMode=function(){};
|
|
918
|
+
Uv.prototype.parseMedia=function(a,b,c){var d=Fc(a);a=[];if(""==d)return a;var e=ig(d,"tt");if(!e)throw new L(2,2,2005,"Failed to parse TTML.");d=e.getElementsByTagName("body")[0];if(!d)return[];var f=Xf(e,Vv,"frameRate"),g=Xf(e,Vv,"subFrameRate"),h=Xf(e,Vv,"frameRateMultiplier"),k=Xf(e,Vv,"tickRate"),l=Xf(e,Vv,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=Xf(e,Wv,"extent");if("default"!=m&&"preserve"!=m)throw new L(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new Xv(f,
|
|
919
|
+
g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{columns:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?Vf(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var p=t(e),q=p.next();!q.done;q=p.next()){var v=q.value;q=new rb;var w=v.getAttribute("xml:id");if(w){q.id=w;var x=null;n&&(x=Yv.exec(n)||Zv.exec(n));w=x?Number(x[1]):null;x=x?Number(x[2]):null;var y,C=$v(v,h,"extent");if(C){var A=(y=Yv.exec(C))||
|
|
920
|
+
Zv.exec(C);null!=A&&(q.width=Number(A[1]),q.height=Number(A[2]),y||(null!=w&&(q.width=100*q.width/w),null!=x&&(q.height=100*q.height/x)),q.widthUnits=y||null!=w?Ib:0,q.heightUnits=y||null!=x?Ib:0)}if(v=$v(v,h,"origin"))if(A=(y=Yv.exec(v))||Zv.exec(v),null!=A)q.viewportAnchorX=Number(A[1]),q.viewportAnchorY=Number(A[2]),y?C||(q.width=100-q.viewportAnchorX,q.widthUnits=Ib,q.height=100-q.viewportAnchorY,q.heightUnits=Ib):(null!=x&&(q.viewportAnchorY=100*q.viewportAnchorY/x),null!=w&&(q.viewportAnchorX=
|
|
921
|
+
100*q.viewportAnchorX/w)),q.viewportAnchorUnits=y||null!=w?Ib:0}else q=null;q&&k.push(q)}if(Sf(d,"p").length)throw new L(2,2,2001,"<p> can only be inside <div> in TTML");n=t(Sf(d,"div"));for(p=n.next();!p.done;p=n.next())if(Sf(p.value,"span").length)throw new L(2,2,2001,"<span> can only be inside <p> in TTML");if(b=aw(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
|
|
922
|
+
function aw(a,b,c,d,e,f,g,h,k,l,m,n){var p=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 v=null,w=t(bw),x=w.next();!x.done&&!(v=cw(q,"backgroundImage",d,"#",x.value)[0]);x=w.next());w=null;var y=Xf(q,bw,"backgroundImage");n&&y&&!y.startsWith("#")&&(x=new Tb(n),y=new Tb(y),(x=x.resolve(y).toString())&&(w=x));if("p"==a.nodeName||v||w)m=!0;a=m;x="default"==(q.getAttribute("xml:space")||
|
|
923
|
+
(h?"default":"preserve"));y=Array.from(q.childNodes).every(function(E){return E.nodeType==Node.TEXT_NODE});h=[];if(!y)for(var C=t(q.childNodes),A=C.next();!A.done;A=C.next())(A=aw(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;C=dw(q,c);n=C.start;for(C=C.end;p&&p.nodeType==Node.ELEMENT_NODE&&"tt"!=p.tagName;)C=ew(p,c,n,C),n=C.start,C=
|
|
924
|
+
C.end,p=p.parentNode;null==n&&(n=0);n+=b.periodStart;C=null==C?Infinity:C+b.periodStart;n=Math.max(n,b.segmentStart);C=Math.min(C,b.segmentEnd);if(!A&&0<h.length)for(n=Infinity,C=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),C=Math.max(C,c.endTime);if("br"==q.tagName)return e=new pb(n,C,""),e.lineBreak=!0,e;b="";y&&(b=q.textContent,x&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new pb(n,C,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=cw(q,"region",f,"")[0];
|
|
925
|
+
if(q.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(E){return E.id==z})[0]}g=k;l&&d&&!q.getAttribute("region")&&!q.getAttribute("style")&&(g=cw(l,"region",f,"")[0]);fw(b,q,g,v,w,e,a,0==h.length);return b}
|
|
926
|
+
function fw(a,b,c,d,e,f,g,h){g=g||h;"rtl"==gw(b,c,f,"direction",g)&&(a.direction="rtl");h=gw(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=qb);(h=gw(b,c,f,"textAlign",!0))?(a.positionAlign=hw[h],a.lineAlign=iw[h],a.textAlign=Bb[h.toUpperCase()]):a.textAlign=tb;if(h=gw(b,c,f,"displayAlign",!0))a.displayAlign=Cb[h.toUpperCase()];if(h=gw(b,c,f,"color",g))a.color=h;if(h=gw(b,c,f,"backgroundColor",
|
|
927
|
+
g))a.backgroundColor=h;if(h=gw(b,c,f,"border",g))a.border=h;if(h=gw(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=gw(b,c,f,"fontWeight",g))&&
|
|
928
|
+
"bold"==h&&(a.fontWeight=700);h=gw(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=gw(b,c,f,"lineHeight",g))&&h.match(jw)&&(a.lineHeight=h);(h=gw(b,c,f,"fontSize",g))&&(h.match(jw)||h.match(kw))&&(a.fontSize=h);if(h=gw(b,c,f,"fontStyle",g))a.fontStyle=Hb[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=gw(b,
|
|
929
|
+
c,f,"textOutline",g))d=d.split(" "),d[0].match(jw)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(jw)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=gw(b,c,f,"letterSpacing",g))&&d.match(jw)&&(a.letterSpacing=d);(d=gw(b,c,f,"linePadding",g))&&d.match(jw)&&(a.linePadding=d);if(g=gw(b,c,f,"opacity",g))a.opacity=parseFloat(g);(c=$v(c,f,"textDecoration"))&&lw(a,c);(b=mw(b,f,"textDecoration"))&&lw(a,b)}
|
|
930
|
+
function lw(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&mb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&mb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
931
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&mb(a.textDecoration,"overline")}}function gw(a,b,c,d,e){e=void 0===e?!0:e;return(a=mw(a,c,d))?a:e?$v(b,c,d):null}function $v(a,b,c){if(!a)return null;var d=Xf(a,Wv,c);return d?d:nw(a,b,c)}function mw(a,b,c){var d=Xf(a,Wv,c);return d?d:nw(a,b,c)}
|
|
932
|
+
function nw(a,b,c){a=cw(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Wf(a[e],"urn:ebu:tt:style",c);f||(f=Xf(a[e],Wv,c));f||(f=mw(a[e],b,c));f&&(d=f)}return d}
|
|
933
|
+
function cw(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Wf(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function ew(a,b,c,d){a=dw(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
|
|
934
|
+
function dw(a,b){var c=ow(a.getAttribute("begin"),b),d=ow(a.getAttribute("end"),b);a=ow(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
|
|
935
|
+
function ow(a,b){var c=null;if(pw.test(a)){a=pw.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(qw.test(a))c=rw(qw,a);else if(sw.test(a))c=rw(sw,a);else if(tw.test(a))a=tw.exec(a),c=Number(a[1])/b.frameRate;else if(uw.test(a))a=uw.exec(a),c=Number(a[1])/b.g;else if(vw.test(a))c=rw(vw,a);else if(a)throw new L(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
936
|
+
function rw(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}G("shaka.text.TtmlTextParser",Uv);Uv.prototype.parseMedia=Uv.prototype.parseMedia;Uv.prototype.setSequenceMode=Uv.prototype.setSequenceMode;Uv.prototype.parseInit=Uv.prototype.parseInit;
|
|
937
|
+
function Xv(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
|
|
938
|
+
var Yv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,kw=/^(\d{1,2}(?:\.\d+)?|100)%$/,jw=/^(\d+px|\d+em|\d*\.?\d+c)$/,Zv=/^(\d+)px (\d+)px$/,pw=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,qw=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,sw=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,tw=/^(\d*(?:\.\d*)?)f$/,uw=/^(\d*(?:\.\d*)?)t$/,vw=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),iw={left:wb,center:"center",right:"end",start:wb,
|
|
939
|
+
end:"end"},hw={left:"line-left",center:"center",right:"line-right"},Vv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Wv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],bw=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];id["application/ttml+xml"]=function(){return new Uv};function ww(){this.g=new Uv}ww.prototype.parseInit=function(a){var b=!1;(new Ff).box("moov",Kf).box("trak",Kf).box("mdia",Kf).box("minf",Kf).box("stbl",Kf).M("stsd",Mf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new L(2,2,2007);};ww.prototype.setSequenceMode=function(){};ww.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Ff).box("mdat",Of(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new L(2,2,2007);return f};
|
|
940
|
+
G("shaka.text.Mp4TtmlParser",ww);ww.prototype.parseMedia=ww.prototype.parseMedia;ww.prototype.setSequenceMode=ww.prototype.setSequenceMode;ww.prototype.parseInit=ww.prototype.parseInit;id['application/mp4; codecs="stpp"']=function(){return new ww};id['application/mp4; codecs="stpp.ttml"']=function(){return new ww};id['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new ww};id['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new ww};function xw(){this.g=!1}xw.prototype.parseInit=function(){};xw.prototype.setSequenceMode=function(a){this.g=a};
|
|
941
|
+
xw.prototype.parseMedia=function(a,b){a=Fc(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new L(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.g){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=yw(new Pq(d[1]));if(null==a)throw new L(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
|
|
942
942
|
e/9E4-a}}b=[];e=t(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new Pq(d);var f=new rb;Sq(d);Qq(d);for(var g=Sq(d);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?
|
|
943
|
-
(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Qq(d);g=Sq(d)}b.push(f)}e=new Map;
|
|
943
|
+
(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Qq(d);g=Sq(d)}b.push(f)}e=new Map;zw(e);d=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&
|
|
944
944
|
(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=e.get(g))||(l=new pb(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var q=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=q;break;case "color":m=!0;l.color=q;break;case "font-family":m=!0;l.fontFamily=q;break;case "font-size":m=!0;l.fontSize=q;break;case "font-weight":if(700<=parseInt(q,10)||"bold"==
|
|
945
945
|
q)m=!0,l.fontWeight=700;break;case "font-style":switch(q){case "normal":m=!0;l.fontStyle=zb;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(q);break;case "text-shadow":m=!0;l.textShadow=q;break;case "white-space":m=!0,l.wrapLine="noWrap"!=q}}}m&&e.set(g,l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else{h=null;f[0].includes("--\x3e")||(h=f[0],f.splice(0,1));
|
|
946
|
-
g=new Pq(f[0]);k=
|
|
947
|
-
function
|
|
948
|
-
function
|
|
949
|
-
1:">"===a[e]&&0<f&&(f=a.substr(f,e-f),f.match(
|
|
950
|
-
(g=h+1,"v"!=e[g]&&(g=-1)):">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),d+=e[h];e=t(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),d=d.replace("<"+f+">","<"+g+">"),d=d.replace("</"+f+">","</"+g+">"),a||(d+="</"+g+">");a=d}if(e=ig("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.payload=
|
|
951
|
-
|
|
952
|
-
function
|
|
953
|
-
e.fontFamily),e.fontSize=
|
|
954
|
-
a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=
|
|
955
|
-
function
|
|
956
|
-
"end"==b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=
|
|
957
|
-
function
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
var q=p.ie||l,v=p.jd?c+p.jd:a;a=v+(q||0);var w=0;do{var x=m.K();w+=x;var y=m.K(),C=null;"vttc"==Jf(y)?8<x&&(C=m.cb(x-8)):m.skip(x-8);q&&C&&(x=
|
|
961
|
-
function
|
|
962
|
-
function
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
[];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={Bd:e.Bd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=
|
|
966
|
-
function
|
|
946
|
+
g=new Pq(f[0]);k=yw(g);n=Rq(g,/[ \t]+--\x3e[ \t]+/g);l=yw(g);if(null==k||null==n||null==l)throw new L(2,2,2001,"Could not parse cue time range in WebVTT");k+=m;l+=m;f=f.slice(1).join("\n").trim();e.has("global")?(m=e.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new pb(k,l,"");Qq(g);for(k=Sq(g);k;)Aw(m,k,b),Qq(g),k=Sq(g);Bw(f,m,e);null!=h&&(m.id=h);f=m}f&&d.push(f)}return d};
|
|
947
|
+
function zw(a){for(var b=t(Object.entries(Eb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new pb(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(Fb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new pb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
948
|
+
function Bw(a,b,c){if(a.includes("<")){0===c.size&&zw(c);a:{var d=a;a=[];for(var e=-1,f="",g=0;g<d.length;g++)if("/"===d[g]&&0<g&&"<"===d[g-1]){var h=d.indexOf(">",g);if(h<=g){a=d;break a}if((h=d.substring(g+1,h))&&"c"===h){var k=a.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=d[g]:f+=d[g]}else f+=d[g]}else"<"===d[g]?(e=g+1,"c"!=d[e]&&(e=-1)):">"===d[g]&&0<e&&(a.push(d.substr(e,g-e)),e=-1),f+=d[g];a=f}d=[];f=-1;for(e=0;e<a.length;e++)"<"===a[e]?f=e+
|
|
949
|
+
1:">"===a[e]&&0<f&&(f=a.substr(f,e-f),f.match(Cw)&&d.push(f),f=-1);d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,a=a.replace("<"+e+">",'<div time="'+e+'">'),a+="</div>";a:{e=a;f=[];g=-1;d="";a=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){a=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)d+="/"+k+">";else{if(!l.startsWith("v")){d+=e[h];continue}d+="/"+l+">"}h+=k.length+1}else d+=e[h]}else d+=e[h]}else"<"===e[h]?
|
|
950
|
+
(g=h+1,"v"!=e[g]&&(g=-1)):">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),d+=e[h];e=t(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),d=d.replace("<"+f+">","<"+g+">"),d=d.replace("</"+f+">","</"+g+">"),a||(d+="</"+g+">");a=d}if(e=ig("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.payload=Dw(a);return}a=t(e);for(e=a.next();!e.done;e=a.next())Ew(e.value,b,d,c);b.nestedCues=d}else b.payload=
|
|
951
|
+
Dw(a)}else b.payload=Dw(a)}function Fw(a,b){return a&&0<a.length?a:b}
|
|
952
|
+
function Ew(a,b,c,d){var e=b.clone();e.nestedCues=[];e.payload="";e.line=null;e.region=new rb;e.position=null;e.size=0;if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=t(a.nodeName.split(/(?=[ .])+/g)),g=f.next();!g.done;g=f.next()){var h=g=g.value;if(h.startsWith(".voice-")){var k=h.split("-").pop();h='v[voice="'+k+'"]';d.has(h)||(h="v[voice="+k+"]")}d.has(h)&&(h=d.get(h))&&(e.backgroundColor=Fw(h.backgroundColor,e.backgroundColor),e.color=Fw(h.color,e.color),e.fontFamily=Fw(h.fontFamily,
|
|
953
|
+
e.fontFamily),e.fontSize=Fw(h.fontSize,e.fontSize),e.textShadow=Fw(h.textShadow,e.textShadow),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine);switch(g){case "br":g=b.clone();g.lineBreak=!0;c.push(g);break;case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=yw(new Pq(g)))e.startTime=g}}if(Zf(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=
|
|
954
|
+
d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=Dw(a),c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())Ew(a.value,e,c,d)}
|
|
955
|
+
function Aw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=tb:a.textAlign=Bb[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||
|
|
956
|
+
"end"==b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Gw(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=Db[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=vb,a.line=Number(c[1]),c[2]&&(a.lineAlign=Db[c[2].toUpperCase()])}function Gw(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
|
|
957
|
+
function yw(a){a=Rq(a,Cw);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)}function Dw(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||""}G("shaka.text.VttTextParser",xw);xw.prototype.parseMedia=xw.prototype.parseMedia;
|
|
958
|
+
xw.prototype.setSequenceMode=xw.prototype.setSequenceMode;xw.prototype.parseInit=xw.prototype.parseInit;var Cw=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;id["text/vtt"]=function(){return new xw};id['text/vtt; codecs="vtt"']=function(){return new xw};id['text/vtt; codecs="wvtt"']=function(){return new xw};function Hw(){this.g=null}Hw.prototype.parseInit=function(a){var b=this,c=!1;(new Ff).box("moov",Kf).box("trak",Kf).box("mdia",Kf).M("mdhd",function(d){d=mi(d.reader,d.version);b.g=d.timescale}).box("minf",Kf).box("stbl",Kf).M("stsd",Mf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new L(2,2,2008);if(!c)throw new L(2,2,2008);};Hw.prototype.setSequenceMode=function(){};
|
|
959
|
+
Hw.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new L(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Ff).box("moof",Kf).box("traf",Kf).M("tfdt",function(A){g=!0;c=li(A.reader,A.version).Be}).M("tfhd",function(A){l=ki(A.reader,A.flags).He}).M("trun",function(A){h=!0;d=ni(A.reader,A.version,A.flags).We}).box("mdat",Of(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new L(2,2,2008);a=c;for(var m=new Cf(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=p.value;
|
|
960
|
+
var q=p.ie||l,v=p.jd?c+p.jd:a;a=v+(q||0);var w=0;do{var x=m.K();w+=x;var y=m.K(),C=null;"vttc"==Jf(y)?8<x&&(C=m.cb(x-8)):m.skip(x-8);q&&C&&(x=Iw(C,b.periodStart+v/this.g,b.periodStart+a/this.g),f.push(x))}while(p.sampleSize&&w<p.sampleSize)}return f.filter(rd)};function Iw(a,b,c){var d,e,f;(new Ff).box("payl",Of(function(g){d=Fc(g)})).box("iden",Of(function(g){e=Fc(g)})).box("sttg",Of(function(g){f=Fc(g)})).parse(a);return d?Jw(d,e,f,b,c):null}
|
|
961
|
+
function Jw(a,b,c,d,e){d=new pb(d,e,"");Bw(a,d,new Map);b&&(d.id=b);if(c)for(a=new Pq(c),b=Sq(a);b;)Aw(d,b,[]),Qq(a),b=Sq(a);return d}G("shaka.text.Mp4VttParser",Hw);Hw.prototype.parseMedia=Hw.prototype.parseMedia;Hw.prototype.setSequenceMode=Hw.prototype.setSequenceMode;Hw.prototype.parseInit=Hw.prototype.parseInit;id['application/mp4; codecs="wvtt"']=function(){return new Hw};function Kw(){}Kw.prototype.parseInit=function(){};Kw.prototype.setSequenceMode=function(){};Kw.prototype.parseMedia=function(a){var b=Fc(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 Pq(c[0]),e=Lw(d),f=Rq(d,/,/g);d=Lw(d);if(null==e||null==f||null==d)throw new L(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new pb(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
962
|
+
function Lw(a){a=Rq(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)}G("shaka.text.SbvTextParser",Kw);Kw.prototype.parseMedia=Kw.prototype.parseMedia;Kw.prototype.setSequenceMode=Kw.prototype.setSequenceMode;Kw.prototype.parseInit=Kw.prototype.parseInit;id["text/x-subviewer"]=function(){return new Kw};function Mw(){this.g=new xw}Mw.prototype.parseInit=function(){};Mw.prototype.setSequenceMode=function(){};Mw.prototype.parseMedia=function(a,b,c){a=Fc(a);a=Nw(a);a=Nb(Jc(a));return this.g.parseMedia(a,b,c)};function Nw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}G("shaka.text.SrtTextParser",Mw);
|
|
963
|
+
Mw.srt2webvtt=Nw;Mw.prototype.parseMedia=Mw.prototype.parseMedia;Mw.prototype.setSequenceMode=Mw.prototype.setSequenceMode;Mw.prototype.parseInit=Mw.prototype.parseInit;id["text/srt"]=function(){return new Mw};function Ow(){}Ow.prototype.parseInit=function(){};Ow.prototype.setSequenceMode=function(){};
|
|
964
|
+
Ow.prototype.parseMedia=function(a){var b="",c="";a=Fc(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=Pw.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Qw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Rw);else if("Style"==e){e=f.split(Rw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
|
|
965
|
+
[];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={Bd:e.Bd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Qw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Rw);else if("Dialogue"==f){g=g.split(Rw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Sw(f.Start);var k=Sw(f.End);g=new pb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Bd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Bd}}(e)))&&Tw(g,f);d.push(g)}return d};
|
|
966
|
+
function Tw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Uw(c))a.color=c;if(c=b.BackColour)if(c=Uw(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=xb;a.textAlign="start";break;case 2:a.displayAlign=xb;a.textAlign=tb;break;case 3:a.displayAlign=xb;a.textAlign="end";
|
|
967
967
|
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=tb;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=tb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
|
|
968
|
-
function
|
|
969
|
-
var
|
|
968
|
+
function Uw(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function Sw(a){a=Vw.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}G("shaka.text.SsaTextParser",Ow);Ow.prototype.parseMedia=Ow.prototype.parseMedia;Ow.prototype.setSequenceMode=Ow.prototype.setSequenceMode;Ow.prototype.parseInit=Ow.prototype.parseInit;
|
|
969
|
+
var Pw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Qw=/^\s*([^:]+):\s*(.*)/,Rw=/\s*,\s*/,Vw=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;id["text/x-ssa"]=function(){return new Ow};/*
|
|
970
970
|
@license
|
|
971
971
|
EME Encryption Scheme Polyfill
|
|
972
972
|
Copyright 2019 Google LLC
|
|
973
973
|
SPDX-License-Identifier: Apache-2.0
|
|
974
974
|
*/
|
|
975
|
-
function
|
|
976
|
-
function
|
|
975
|
+
function Ww(){}var Xw;function Yw(){Xw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Xw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Zw):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
976
|
+
function Zw(a,b){var c=this,d;return D(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,Xw.call(c,a,b),2);d=e.h;if($w(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Xw,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=ax;return e.return(ax.call(c,
|
|
977
977
|
a,b))})}
|
|
978
|
-
function
|
|
979
|
-
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(q,
|
|
980
|
-
function
|
|
981
|
-
function
|
|
982
|
-
navigator.mediaCapabilities.decodingInfo=
|
|
983
|
-
function
|
|
984
|
-
new
|
|
985
|
-
function
|
|
986
|
-
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}G("McEncryptionSchemePolyfill",
|
|
987
|
-
|
|
988
|
-
function
|
|
989
|
-
function
|
|
978
|
+
function ax(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return D(function(q){if(1==q.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=bx(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=cx(h.videoCapabilities,d),l=cx(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
|
|
979
|
+
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(q,Xw.call(c,a,e),2)}p=q.h;return q.return(new dx(p,d))})}function cx(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}G("EmeEncryptionSchemePolyfill",Ww);Ww.install=Yw;function ex(){}var fx;
|
|
980
|
+
function gx(){fx?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(fx=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=hx):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
981
|
+
function hx(a){var b=this,c,d,e;return D(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,fx.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&$w(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=fx,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
982
|
+
navigator.mediaCapabilities.decodingInfo=ix;if(d){f.B(3);break}e=c;return u(f,jx(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(ix.call(b,a))}})}
|
|
983
|
+
function ix(a){var b=this,c,d,e,f,g,h,k,l;return D(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=bx(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):u(m,fx.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
984
|
+
new dx(k.keySystemAccess,c);m.B(3);break}if(!a.keySystemConfiguration){m.B(3);break}l=k;return u(m,jx(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
|
|
985
|
+
function jx(a){var b,c;return D(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return u(d,
|
|
986
|
+
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}G("McEncryptionSchemePolyfill",ex);ex.install=gx;function dx(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
|
|
987
|
+
dx.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};dx.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
|
|
988
|
+
function bx(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function $w(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
|
|
989
|
+
function kx(){}function ou(){Yw();gx()}G("EncryptionSchemePolyfills",kx);kx.install=ou;"undefined"!==typeof module&&module.exports&&(module.exports=kx);}).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})();
|
|
990
990
|
|
|
991
991
|
//# sourceMappingURL=shaka-player.compiled.map
|