shaka-player 3.3.17 → 3.3.18
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/build-and-test.yaml +4 -4
- package/.github/workflows/demo-version-index.yaml +6 -0
- package/.github/workflows/selenium-lab-tests.yaml +55 -16
- package/.github/workflows/update-screenshots.yaml +142 -0
- package/CHANGELOG.md +22 -0
- package/demo/common/asset.js +15 -0
- package/demo/common/assets.js +4 -2
- package/demo/common/message_ids.js +1 -0
- package/demo/custom.js +19 -0
- package/demo/locales/en.json +1 -0
- package/demo/locales/source.json +4 -0
- package/demo/main.js +14 -0
- package/dist/demo.compiled.debug.js +146 -144
- package/dist/demo.compiled.debug.map +3 -3
- package/dist/demo.compiled.js +146 -144
- package/dist/demo.compiled.map +3 -3
- package/dist/deps.js +1 -1
- package/dist/locales.js +31 -31
- package/dist/receiver.compiled.debug.js +15 -15
- package/dist/receiver.compiled.debug.map +2 -2
- package/dist/receiver.compiled.js +15 -15
- package/dist/receiver.compiled.map +2 -2
- package/dist/shaka-player.compiled.d.ts +7 -0
- package/dist/shaka-player.compiled.debug.d.ts +7 -0
- package/dist/shaka-player.compiled.debug.js +31 -31
- package/dist/shaka-player.compiled.debug.map +2 -2
- package/dist/shaka-player.compiled.js +92 -91
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.d.ts +7 -0
- package/dist/shaka-player.ui.debug.d.ts +7 -0
- package/dist/shaka-player.ui.debug.js +33 -33
- package/dist/shaka-player.ui.debug.map +2 -2
- package/dist/shaka-player.ui.js +60 -59
- package/dist/shaka-player.ui.map +3 -3
- package/docs/tutorials/errors.md +94 -0
- package/docs/tutorials/index.json +2 -0
- package/docs/tutorials/widevine-service-certs.md +45 -0
- package/externs/ima.js +9 -0
- package/lib/ads/client_side_ad_manager.js +6 -3
- package/lib/hls/hls_parser.js +2 -0
- package/lib/media/transmuxer.js +13 -7
- package/lib/media/video_wrapper.js +3 -3
- package/lib/offline/indexeddb/storage_mechanism.js +1 -1
- package/lib/player.js +3 -1
- package/lib/polyfill/media_capabilities.js +2 -8
- package/lib/polyfill/mediasource.js +7 -2
- package/lib/text/ui_text_displayer.js +1 -0
- package/lib/text/vtt_text_parser.js +4 -5
- package/lib/util/mime_utils.js +1 -1
- package/lib/util/stream_utils.js +26 -14
- package/package.json +1 -1
- package/test/polyfill/media_capabilities_unit.js +20 -22
- package/test/text/vtt_text_parser_unit.js +26 -2
- package/test/text/web_vtt_layout_integration.js +0 -3
package/dist/shaka-player.ui.js
CHANGED
|
@@ -15,7 +15,7 @@ fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("
|
|
|
15
15
|
fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(aa(this))}})}return a});function ha(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
|
|
16
16
|
function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ia(a){if(!(a instanceof Array)){a=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var la="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ma;
|
|
17
17
|
if("function"==typeof Object.setPrototypeOf)ma=Object.setPrototypeOf;else{var na;a:{var oa={a:!0},pa={};try{pa.__proto__=oa;na=pa.a;break a}catch(a){}na=!1}ma=na?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var qa=ma;
|
|
18
|
-
function u(a,b){a.prototype=la(b.prototype);a.prototype.constructor=a;if(qa)qa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.
|
|
18
|
+
function u(a,b){a.prototype=la(b.prototype);a.prototype.constructor=a;if(qa)qa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Ni=b.prototype}function ra(){this.A=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function sa(a){if(a.A)throw new TypeError("Generator is already running");a.A=!0}ra.prototype.B=function(a){this.h=a};
|
|
19
19
|
function ta(a,b){a.i={cf:b,pf:!0};a.g=a.m||a.j}ra.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function A(a,b,c){a.g=c;return{value:b}}ra.prototype.D=function(a){this.g=a};function D(a){a.g=0}function E(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b,c){a.g=b;a.m=c||0}function I(a,b){a.m=b||0;var c=a.i.cf;a.i=null;return c}function wa(a){a.C=[a.i];a.m=0;a.j=0}
|
|
20
20
|
function xa(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.pf?a.g=a.m||a.j:void 0!=c.D&&a.j<c.D?(a.g=c.D,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new ra;this.h=a}function za(a,b){sa(a.g);var c=a.g.l;if(c)return Aa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ba(a)}
|
|
21
21
|
function Aa(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.A=!1,e;var f=e.value}catch(g){return a.g.l=null,ta(a.g,g),Ba(a)}a.g.l=null;d.call(a.g,f);return Ba(a)}
|
|
@@ -94,8 +94,8 @@ q.Ve=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a
|
|
|
94
94
|
q.ea=function(a,b,c){a=Qb(a);void 0===c&&(c=ac);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=ac||d.set(f,e)});this.h.set(a,d);$b(this);this.dispatchEvent(new O("locale-updated"));return this};q.ah=function(a){for(var b=r(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new O("unknown-localization",a));return""};
|
|
95
95
|
function $b(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=r(d),h=g.next();!h.done;f={Yb:f.Yb},h=g.next()){f.Yb=h.value;e.add(f.Yb);e.add(Vb(f.Yb));h=hb(b.keys(),function(l){return function(m){return Ub(m,l.Yb)}}(f));h.sort();var k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=hb(b.keys(),function(l){return function(m){return Vb(m)==l.Yb}}(f));h.sort();k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=r(e);for(h=e.next();!h.done;h=e.next())(h=b.get(h.value))&&c.push(h);
|
|
96
96
|
c.reverse();a.i.clear();b=r(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=r(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,bc(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new O("missing-localizations",d)))}function bc(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}N("shaka.ui.Localization",Zb);Zb.prototype.resolve=Zb.prototype.resolve;
|
|
97
|
-
Zb.prototype.resolveDictionary=Zb.prototype.ah;Zb.prototype.insert=Zb.prototype.ea;Zb.prototype.changeLocale=Zb.prototype.Ve;Zb.prototype.release=Zb.prototype.release;var ac=1;Zb.ConflictResolution={USE_OLD:0,USE_NEW:ac};Zb.UNKNOWN_LOCALES="unknown-locales";Zb.UNKNOWN_LOCALIZATION="unknown-localization";Zb.MISSING_LOCALIZATIONS="missing-localizations";Zb.LOCALE_CHANGED="locale-changed";Zb.LOCALE_UPDATED="locale-updated";var dc={
|
|
98
|
-
|
|
97
|
+
Zb.prototype.resolveDictionary=Zb.prototype.ah;Zb.prototype.insert=Zb.prototype.ea;Zb.prototype.changeLocale=Zb.prototype.Ve;Zb.prototype.release=Zb.prototype.release;var ac=1;Zb.ConflictResolution={USE_OLD:0,USE_NEW:ac};Zb.UNKNOWN_LOCALES="unknown-locales";Zb.UNKNOWN_LOCALIZATION="unknown-localization";Zb.MISSING_LOCALIZATIONS="missing-localizations";Zb.LOCALE_CHANGED="locale-changed";Zb.LOCALE_UPDATED="locale-updated";var dc={Ih:"EXIT_PICTURE_IN_PICTURE",yh:"CAST",Hi:"VOLUME",ri:"STATISTICS",Dh:"ENTER_LOOP_MODE",Hh:"EXIT_LOOP_MODE",ci:"PAUSE",Nh:"LANGUAGE",Gh:"EXIT_FULL_SCREEN",ji:"RESOLUTION",ei:"PLAY",Zh:"ON",mi:"SEEK",AD_PROGRESS:"AD_PROGRESS",oi:"SKIP_TO_LIVE",Fi:"UNRECOGNIZED_LANGUAGE",ph:"AD_TIME",xh:"CAPTIONS",Uh:"MUTE",Xh:"NOT_APPLICABLE",Mh:"FULL_SCREEN",Di:"UNDETERMINED_LANGUAGE",qh:"AIRPLAY",sh:"AUTO_QUALITY",Ei:"UNMUTE",Kf:"SUBTITLE_FORCED",ii:"REPLAY",ni:"SKIP_AD",di:"PICTURE_IN_PICTURE",Th:"MULTIPLE_LANGUAGES",
|
|
98
|
+
Yh:"OFF",ki:"REWIND",Re:"LIVE",Eh:"ENTER_PICTURE_IN_PICTURE",gi:"PLAYBACK_RATE",Sh:"MORE_SETTINGS",BACK:"BACK",oh:"AD_DURATION",Oh:"LOOP",Lh:"FAST_FORWARD"};function ec(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}ec.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function fc(a){return a.h/(1-Math.pow(a.g,a.i))};function gc(){this.h=new ec(2);this.j=new ec(5);this.g=0;this.i=128E3;this.l=16E3}gc.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};gc.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};gc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(fc(this.h),fc(this.j))};function hc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ic(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function jc(a,b,c){c||(c=hc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Gd:d.Gd},e=a.next()){d.Gd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Gd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
99
99
|
function kc(a,b,c){c||(c=hc);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function lc(a,b,c){this.startTime=a;this.direction=mc;this.endTime=b;this.payload=c;this.region=new nc;this.position=null;this.positionAlign=oc;this.size=0;this.textAlign=pc;this.writingMode=qc;this.lineInterpretation=rc;this.line=null;this.lineHeight="";this.lineAlign=sc;this.displayAlign=tc;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=uc;this.fontStyle=vc;this.linePadding=this.letterSpacing=
|
|
100
100
|
this.fontFamily="";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}lc.prototype.clone=function(){var a=new lc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
101
101
|
function wc(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!kc(a.nestedCues,b.nestedCues,wc))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!kc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}N("shaka.text.Cue",lc);var oc="auto";
|
|
@@ -112,9 +112,9 @@ function jd(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)r
|
|
|
112
112
|
function kd(a){if(window.TextEncoder&&!bd()){var b=new TextEncoder;return Jc(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Jc(b)}function ld(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}N("shaka.util.StringUtils",fd);fd.resetFromCharCode=function(){id.g=void 0};fd.toUTF16=ld;fd.toUTF8=kd;fd.fromBytesAutoDetect=jd;fd.fromUTF16=hd;
|
|
113
113
|
fd.fromUTF8=gd;var id=new Qc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={vb:65536};0<b.vb;b={vb:b.vb},b.vb/=2)if(a(b.vb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.vb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.vb));return e}}(b);return null});function md(){}function nd(a){a=Ic(a);a=id.value()(a);return btoa(a)}function od(a,b){b=void 0==b?!0:b;var c=nd(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function pd(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function qd(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
|
|
114
114
|
function rd(a){var b=Ic(a);a="";b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function sd(){for(var a=Fa.apply(0,arguments),b=0,c=r(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Ic(d),c),c+=d.byteLength;return b}N("shaka.util.Uint8ArrayUtils",md);md.concat=sd;md.toHex=rd;md.fromHex=qd;md.fromBase64=pd;md.toBase64=od;md.toStandardBase64=nd;
|
|
115
|
-
md.equal=function(a,b){zb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Gc(a,b)};function td(){var a=this;this.A=Nc.get("muxjs")();this.
|
|
115
|
+
md.equal=function(a,b){zb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Gc(a,b)};function td(){var a=this;this.A=Nc.get("muxjs")();this.h=this.g=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.A&&(this.g=new this.A.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(sd(b.initSegment,b.data))}),this.g.on("done",function(){var b={data:sd.apply(md,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1}))}td.prototype.destroy=function(){this.g&&this.g.dispose();this.g=null;return Promise.resolve()};
|
|
116
116
|
function ud(a,b){if(!Nc.get("muxjs")()||!vd(a))return!1;if(b)return MediaSource.isTypeSupported(wd(b,a));var c=wd("audio",a),d=wd("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function vd(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
|
|
117
|
-
function wd(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function xd(a,b){a.l=!0;a.h=new Pc;a.m=[];a.j=[];a.i=[];var c=Ic(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new P(2,3,3018));return a.h};function yd(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function zd(a,b,c){
|
|
117
|
+
function wd(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function xd(a,b){a.l=!0;a.h=new Pc;a.m=[];a.j=[];a.i=[];var c=Ic(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new P(2,3,3018));return a.h};function yd(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function zd(a,b,c){b=yd(a,b);if(vd(b)){if(Nc.get("muxjs")())return wd(c,b)}else if("video/mp2t"!=a&&"audio"==c)return b.replace("video","audio");return b}
|
|
118
118
|
function Ad(a){var b=Bd(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";
|
|
119
119
|
case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function Cd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Bd(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}
|
|
120
120
|
(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Dd(a){this.l=null;this.i=a;this.j=this.C=0;this.m=Infinity;this.h=this.g=null;this.B="";this.A=new Map}function Ed(a){return Fd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Dd.prototype.destroy=function(){this.i=this.l=null;this.A.clear();return Promise.resolve()};
|
|
@@ -136,9 +136,9 @@ function fe(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;return M(function(v){if(d=a.some(fu
|
|
|
136
136
|
function je(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Jb("video",g);f=ge(f);g=Jb("audio",g);g=zd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=ge(f);f=zd(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
|
|
137
137
|
break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=he(d.codecs),f=zd(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
|
|
138
138
|
f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=r(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=r(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,t=r(h.initData),v=t.next();!v.done;v=t.next())p.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
|
|
139
|
-
(m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}
|
|
140
|
-
function ge(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function ce(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!ke(d,a.audio)||c&&a&&a.video&&!ke(c,a.video)?!1:!0})}
|
|
141
|
-
function ee(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(Zc()||Yc()||$c())&&c.push("image/webp");return c.includes(b.mimeType)})}function ke(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
|
|
139
|
+
(m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(""!=h.audioRobustness?m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness}:m.audio||(m.audio={}));e&&(""!=h.videoRobustness?m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness}:m.video||(m.video={}))}l.keySystemConfiguration=m;a.push(l)}return a}
|
|
140
|
+
function he(a){return Yc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}function ge(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function ce(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!ke(d,a.audio)||c&&a&&a.video&&!ke(c,a.video)?!1:!0})}
|
|
141
|
+
function de(a){a.textStreams=a.textStreams.filter(function(b){return Ed(yd(b.mimeType,b.codecs))})}function ee(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(Zc()||Yc()||$c())&&c.push("image/webp");return c.includes(b.mimeType)})}function ke(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
|
|
142
142
|
function le(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=new Set;if(b)for(var l=r(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=r(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,
|
|
143
143
|
frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,roles:Array.from(k),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||
|
|
144
144
|
null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=b.label,a.audioRoles=b.roles);return a}
|
|
@@ -183,8 +183,8 @@ function If(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION
|
|
|
183
183
|
function Lf(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
|
|
184
184
|
function Mf(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function Nf(a){a=Number(a);return 0===a%1?a:null}function Of(a){a=Number(a);return 0===a%1&&0<a?a:null}function Pf(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Qf(a){a=Number(a);return isNaN(a)?null:a}function Rf(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
185
185
|
function Sf(a,b){var c=new DOMParser,d=Tf.value()(a),e=null;try{e=c.parseFromString(d,"text/xml")}catch(f){return null}c=e.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(e=document.createNodeIterator(e,NodeFilter.SHOW_ALL);d=e.nextNode();)if(d instanceof HTMLElement||d instanceof SVGElement)return null;return c}function Uf(a,b){try{var c=gd(a);return Sf(c,b)}catch(d){return null}}
|
|
186
|
-
var Tf=new Qc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Vf(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.H=new Set;this.l=this.B=null;this.
|
|
187
|
-
function Yf(a){return M(function(b){switch(b.g){case 1:return a.A.release(),a.A=null,a.C.reject(),a.
|
|
186
|
+
var Tf=new Qc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Vf(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.H=new Set;this.l=this.B=null;this.va=this.Z=!1;this.I=0;this.g=null;this.A=new pf;this.i=new Map;this.F=[];this.C=new Pc;this.h=null;this.m=function(d){c.C.reject(d);a.onError(d)};this.ba=new Map;this.$=new Map;this.S=new Q(function(){return Wf(c)});this.K=!1;this.J=[];this.N=!1;this.aa=(new Q(function(){Xf(c)})).ha(b);this.C["catch"](function(){});this.j=new nf(function(){return Yf(c)});this.X=!1}q=Vf.prototype;q.destroy=function(){return this.j.destroy()};
|
|
187
|
+
function Yf(a){return M(function(b){switch(b.g){case 1:return a.A.release(),a.A=null,a.C.reject(),a.aa.stop(),a.aa=null,a.S.stop(),a.S=null,A(b,Zf(a),2);case 2:if(!a.l){b.D(3);break}E(b,4);return A(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:I(b);case 5:a.l=null;case 3:a.g=null,a.H.clear(),a.B=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.X=!1,D(b)}})}q.configure=function(a){this.h=a};function $f(a,b,c){a.va=!0;a.F=[];a.K=c;return ag(a,b)}
|
|
188
188
|
function bg(a,b,c){a.F=c;a.K=0<c.length;return ag(a,b)}function cg(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return dg(a,g,[])}
|
|
189
189
|
function ag(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w;return M(function(y){if(1==y.g){if(c=eg(a))for(d=r(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(x){return x.video&&x.video.drmInfos.length||x.audio&&x.audio.drmInfos.length?!0:!1});g||(h=xf(a.h.servers),fg(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=gg(l),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,hg(t,xf(a.h.servers),xf(a.h.advanced||{}));return A(y,
|
|
190
190
|
fe(b,a.K,a.X),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.Z=!0,y["return"](Promise.resolve());w=dg(a,void 0,b);return y["return"](g?w:w["catch"](function(){}))})}
|
|
@@ -216,7 +216,7 @@ c.close()["catch"](function(){}));xg(a)&&(a.C.resolve(),a.S.R(Bg))}function Wf(a
|
|
|
216
216
|
function Cg(){var a,b,c,d,e,f,g,h;return M(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
|
|
217
217
|
c],f=new Map,g=function(l){var m,n,p;return M(function(t){switch(t.g){case 1:return E(t,2),A(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Xc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),A(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:I(t),f.set(l,null),D(t)}})},h=a.map(function(l){return g(l)}),A(k,Promise.all(h),2)):k["return"](yf(f))})}
|
|
218
218
|
function Dg(a){var b;return M(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Q(e)).R(Eg)}),E(c,2),A(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);I(c);D(c)})}
|
|
219
|
-
function Zf(a){var b;return M(function(c){b=Array.from(a.i.entries());a.i.clear();return A(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return M(function(g){if(1==g.g)return E(g,2),a.
|
|
219
|
+
function Zf(a){var b;return M(function(c){b=Array.from(a.i.entries());a.i.clear();return A(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return M(function(g){if(1==g.g)return E(g,2),a.va||a.F.includes(e.sessionId)||"persistent-license"!==f.type?A(g,Dg(e),5):A(g,e.remove(),5);if(2!=g.g)return va(g,0);I(g);D(g)})})),0)})}
|
|
220
220
|
function Fg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=r(b),h=g.next();!h.done;f={Ua:f.Ua},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ua=[];f.Ua=f.Ua.concat(e.initData||[]);f.Ua=f.Ua.concat(h.initData||[]);f.Ua=f.Ua.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ua.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
|
|
221
221
|
e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,serverCertificateUri:e.serverCertificateUri||h.serverCertificateUri,
|
|
222
222
|
initData:f.Ua,keyIds:g});break}}return c}function gg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Xf(a){a.i.forEach(function(b,c){var d=b.je,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.je=e)})}function xg(a){a=a.i.values();return eb(a,function(b){return b.loaded})}
|
|
@@ -258,7 +258,7 @@ d=1===(d&1);if(c.h!==yh){f=c.g;if(c.h===xh&&e!==f.g){var k=1+e-f.h;th(f,k,1+f.g-
|
|
|
258
258
|
function ci(a,b){var c=[];try{for(;b.Ea();){var d=Qh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Qh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Rh(e));for(var g=a.j.get(e),h=b.ia();b.ia()-h<f;){e=b;var k=Qh(e),l=k.value,m=k.pts;if(16===l){var n=Qh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!Jh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.F-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=Kh(t,p,g.i));if(t.h+1>=t.H){p=t;for(var v=0,w=1;16>w;w++,
|
|
259
259
|
v++)p.i[v]=p.i[w];for(w=0;1>w;w++,v++)p.i[v]=Hh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=Kh(t,p,g.i));t.i[t.h]=Hh();t.g=0;break;case 12:t.isVisible()&&(e=Kh(t,p,g.i)),Gh(t),p=t,p.h=0,p.g=0}var y=e}else y=null}else if(128<=l&&159>=l)y=Sh(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Ih(g.g,"\u266a"):Ih(g.g,
|
|
260
260
|
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Ih(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Yh.has(e)){var x=Yh.get(e);Ih(g.g,x)}else Ih(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Ih(g.g,"_"):Ih(g.g,"[CC]"));y=null}(e=y)&&c.push(e)}}}}catch(C){if(C instanceof P&&3E3===C.code)Ta("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function di(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function ei(a,b){var c=null,d=null,e=a.P();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.P());b&16&&(d=a.P());return{trackId:e,$e:c,Vf:d}}function fi(a,b){return{Ud:1==b?a.mc():a.P()}}function gi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.P()}}
|
|
261
|
-
function hi(a,b,c){var d=a.P(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={re:null,sampleSize:null,wd:null};c&256&&(g.re=a.P());c&512&&(g.sampleSize=a.P());c&1024&&a.skip(4);c&2048&&(g.wd=0==b?a.P():a.vf());e.push(g)}return{
|
|
261
|
+
function hi(a,b,c){var d=a.P(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={re:null,sampleSize:null,wd:null};c&256&&(g.re=a.P());c&512&&(g.sampleSize=a.P());c&1024&&a.skip(4);c&2048&&(g.wd=0==b?a.P():a.vf());e.push(g)}return{Mi:d,yf:e}};function ii(){this.i=new Map;this.h=this.g=0}
|
|
262
262
|
ii.prototype.init=function(a){var b=this,c=[],d=[];(new Qg).box("moov",Ug).box("mvex",Ug).V("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.P();f=f.P();b.g=e;b.h=f}).box("trak",Ug).V("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.P();c.push(e)}).box("mdia",Ug).V("mdhd",function(e){e=gi(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new P(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
|
|
263
263
|
ii.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Qg).box("moof",Ug).box("traf",Ug).V("trun",function(k){f=hi(k.reader,k.version,k.flags).yf}).V("tfhd",function(k){k=ei(k.reader,k.flags);d=k.$e||b.g;e=k.Vf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).V("tfdt",function(k){g=fi(k.reader,k.version).Ud}).box("mdat",function(k){if(null===g)throw new P(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,t=f,v=0,w=p;for(t.length&&(w=t[0].sampleSize||p);k.Ea();){var y=k.P();if(6==
|
|
264
264
|
(k.ka()&31)){var x=0;t.length>v&&(x=t[v].wd||0);x=(l+x)/m;for(var C=[],z,B=k.Cb(y-1),F=z=0;F<B.length;)2==z&&3==B[F]?(z=0,B=[].concat(ia(B)),B.splice(F,1),B=new Uint8Array(B)):0==B[F]?z++:z=0,F++;z=B;for(F=0;F<z.length;){for(B=0;255==z[F];)B+=255,F++;B+=z[F++];for(var G=0;255==z[F];)G+=255,F++;G+=z[F++];4==B&&C.push(z.subarray(F,F+G));F+=G}C=r(C);for(z=C.next();!z.done;z=C.next())c.push({Rg:z.value,pts:x})}else try{k.skip(y-1)}catch(H){break}w-=y+4;0==w&&(l=t.length>v?l+(t[v].re||n):l+n,v++,w=t.length>
|
|
@@ -287,7 +287,7 @@ R.prototype.setUserSeekStart=R.prototype.Ef;R.prototype.getSegmentAvailabilitySt
|
|
|
287
287
|
R.prototype.setSegmentAvailabilityDuration=R.prototype.Ce;R.prototype.setStatic=R.prototype.Qc;R.prototype.setClockOffset=R.prototype.Bf;R.prototype.getPresentationStartTime=R.prototype.vg;R.prototype.setDuration=R.prototype.cb;R.prototype.getMaxSegmentDuration=R.prototype.qg;R.prototype.getDuration=R.prototype.getDuration;function Oi(a,b){this.j=a;this.m=Pi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.A=b;this.i=function(){}}Oi.prototype.release=function(){this.j=null;this.i=function(){}};function Qi(a,b){a.i=b}function Ri(a){this.g=a}function Pi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(oi(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function Si(a,b,c,d,e){var f=this;this.g=a;this.F=b;this.l=c;this.C=e;this.i=new pf;this.B=!1;this.G=a.readyState;this.j=!1;this.h=d;this.A=!1;this.i.o(a,"waiting",function(){return Ti(f)});this.m=(new Q(function(){Ti(f)})).ha(.25)}Si.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.F=this.C=null};Si.prototype.ke=function(){this.A=!0;Ti(this)};
|
|
288
288
|
function Ti(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.B)return}else a.B=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.G&&(a.j=!1,a.G=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Pi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.l.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=pi(b,g,a.l.gapDetectionThreshold);if(!(null==
|
|
289
289
|
c||0==c&&!a.A||(d=b.start(c),d>=a.F.ob()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new O("largegap",g),g.cancelable=!0,a.C(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function Ui(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Vi.value().get(b),c.Ga(a,b,d))}var Vi=new Qc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Wi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new pf;this.i=new Xi(a);Ui(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Yi(d,d.j)})}Wi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Zi(a){return a.m?a.g.currentTime:a.j}function $i(a,b){0<a.g.readyState?dj(a.i,b):Ui(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Yi(a,a.j)})}
|
|
290
|
-
function Yi(a,b){.001>Math.abs(a.g.currentTime-b)?ej(a):(a.h.Ga(a.g,"seeking",function(){ej(a)}),dj(a.i,0
|
|
290
|
+
function Yi(a,b){.001>Math.abs(a.g.currentTime-b)?ej(a):(a.h.Ga(a.g,"seeking",function(){ej(a)}),dj(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function ej(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function Xi(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Q(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Xi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
|
|
291
291
|
function dj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ha(.1)};function fj(a){this.g=a;this.j=!1;this.h=null;this.i=new pf}q=fj.prototype;q.Sd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.Ga(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Ui(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.Td=function(a){this.h=this.j?this.h:a};q.Xc=function(){return(this.j?this.g.currentTime:this.h)||0};q.tf=function(){};
|
|
292
292
|
function gj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.C=b.minBufferTime||0;this.l=c;this.B=e;this.A=null;this.j=new Si(a,b.presentationTimeline,c,hj(a,c),f);this.h=new Wi(a,function(){a:{var h=g.j;h.B=!0;h.A=!1;h.j=!1;var k=Zi(g.h);h=ij(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.A||g.A<k-1)){g.A=k;$i(g.h,h);h=void 0;break a}g.B();h=void 0}return h},jj(this,d));this.m=new Q(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Zi(g.h),k=g.g.cc(),l=g.g.ob();3>l-k&&(k=l-
|
|
293
293
|
3);h<k&&(h=ij(g,h),g.i.currentTime=h)}})}q=gj.prototype;q.Sd=function(){this.m.ha(.25)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.B=function(){}};q.Td=function(a){$i(this.h,a)};q.Xc=function(){var a=Zi(this.h);return 0<this.i.readyState&&!this.i.paused?kj(this,a):a};
|
|
@@ -332,7 +332,7 @@ function hk(a,b,c){var d,e,f,g;return M(function(h){if(1==h.g){d=Math.max(a.h.bu
|
|
|
332
332
|
function ek(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=mf,f=Ej(c.Ka(),c.Ha,c.ya,a.h.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof Li,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Qb.request(e,f),b.Na=h,A(l,h.promise,2);k=l.h;b.Na=null;return l["return"](k.data)})}
|
|
333
333
|
function Sj(a,b,c,d){var e,f;return M(function(g){if(1==g.g)return b.Eb=!1,b.Cd=!1,b.bd=0,b.zc=!0,b.Sa=null,b.ld=null,b.ua=null,d?(e=a.g.gd(),f=a.g.W.getDuration(),A(g,a.g.W.remove(b.type,e+d,f),3)):A(g,Gi(a.g.W,b.type),4);if(3!=g.g)return of(a.i),c?A(g,a.g.W.flush(b.type),3):g.D(3);of(a.i);b.zc=!1;b.endOfStream=!1;b.La||b.fb||Mj(a,b,0);D(g)})}
|
|
334
334
|
function Mj(a,b,c){var d=b.type;if(d!=Mb||a.j.has(d))b.fb=(new Rc(function(){var e;return M(function(f){if(1==f.g)return E(f,2),A(f,Vj(a,b),4);if(2!=f.g)return va(f,0);e=I(f);if(a.g)a.g.onError(e);D(f)})})).R(c)}function Hj(a){null!=a.fb&&(a.fb.stop(),a.fb=null)}function Ij(a){return M(function(b){return a.Na?A(b,a.Na.abort(),0):b.D(0)})}function Xj(a,b){return M(function(c){if(1==c.g)return A(c,Qe(a.G),2);of(a.i);a.g.onError(b);b.handled||a.h.failureCallback(b);D(c)})};function ik(a,b){var c=jk(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return kk(d)});this.B=new nf(function(){return lk(d)})}ik.prototype.destroy=function(){return this.B.destroy()};function lk(a){var b,c,d;return M(function(e){if(1==e.g)return a.h&&a.h.abort(),mk(a),A(e,a.C,2);a.g&&a.g.bb.Sb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.bb.Sb();a.g=null;a.m=[];a.j=null;D(e)})}
|
|
335
|
-
function nk(a,b){var c={jc:function(){},qd:function(){},Sb:function(){},onError:function(){},sd:function(){},
|
|
335
|
+
function nk(a,b){var c={jc:function(){},qd:function(){},Sb:function(){},onError:function(){},sd:function(){},Li:function(){}};a.m.push({create:b,bb:c});a.h&&a.h.abort();mk(a);return c}
|
|
336
336
|
function kk(a){return M(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Lb)var c=!1;else{a.g&&(a.g.bb.Sb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.bb.jc(),a.g={node:d.node,payload:d.payload,Lb:d.Lb,bb:c.bb}):c.bb.sd();c=!0}c?c=Promise.resolve():a.g?c=ok(a):(a.j.Og(a.i),a.A=new Pc,c=a.A);b=A(b,c,1)}return b})}
|
|
337
337
|
function ok(a){var b,c;return M(function(d){switch(d.g){case 1:return a.i=a.j.sg(a.i,a.l,a.g.node,a.g.payload),E(d,2),a.h=a.j.Xf(a.i,a.l,a.g.payload),A(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.bb.qd(),a.g=null);va(d,0);break;case 2:b=I(d);if(7001==b.code)a.g.bb.Sb();else a.g.bb.onError(b);a.g=null;a.h=null;c=a;return A(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,D(d)}})}function mk(a){a.A&&(a.A.resolve(),a.A=null)};function pk(a){this.g=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=pk.prototype;q.remove=function(a,b){if(!this.g)return!1;qk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
338
338
|
q.append=function(a){function b(h,k){for(var l=r(h),m=l.next();!m.done;m=l.next())if(m=m.value,m.isContainer)b(m.nestedCues,k);else{var n=m.clone();n.nestedCues=[];n.payload=c(m);k.push(n)}return k}function c(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,t){return p+"<"+t+">"},"");k=k.reduceRight(function(p,t){return p+"</"+t+">"},"");return h.lineBreak||h.spacer?(h.spacer&&zb("shaka.extern.Cue",
|
|
@@ -346,7 +346,7 @@ function yk(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.
|
|
|
346
346
|
t.startTime?p.startTime-t.startTime:p.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.Nc?(c.appendChild(d.Nc),d.Nc.appendChild(d.Vd)):c.appendChild(d.Vd)}}function wk(a,b){if(a.g){var c=a.F.currentTime;if(!a.j||(void 0===b?0:b)){for(var d=r(a.A.values()),e=d.next();!e.done;e=d.next())uk(e.value);uk(a.g);a.h.clear();a.A.clear()}if(a.j){d=new Map;e=r(a.h.keys());for(var f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));yk(a,a.i,a.g,c,[])}}}
|
|
347
347
|
function zk(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&zb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=S(e);"br"!=e&&Ak(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,e=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==Dc?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==Dc?"%":"px"),a.A.has(e))c=a.A.get(e);else{var g=S("span"),h=c.heightUnits==Dc?"%":"px",k=c.widthUnits==Dc?
|
|
348
348
|
"%":"px",l=c.viewportAnchorUnits==Dc?"%":"px";g.id="shaka-text-region---"+e;g.classList.add("shaka-text-region");g.style.height=c.height+h;g.style.width=c.width+k;g.style.position="absolute";g.style.top=c.viewportAnchorY+l;g.style.left=c.viewportAnchorX+l;g.style.display="flex";g.style.flexDirection="column";g.style.alignItems="center";g.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.A.set(e,g);c=g}e=f;d&&(e=S("span"),e.classList.add("shaka-text-wrapper"),
|
|
349
|
-
e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{Vd:f,Jf:e,Nc:c})}
|
|
349
|
+
e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.h.set(b,{Vd:f,Jf:e,Nc:c})}
|
|
350
350
|
function Ak(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Bk(c.linePadding,c,a.m);f.paddingRight=Bk(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
|
|
351
351
|
"no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=S("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Ck(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?
|
|
352
352
|
"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Bk(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",c.writingMode==qc?(f.width="100%",c.lineAlign==sc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==sc?f.left=c.line+"%":"end"==c.lineAlign&&
|
|
@@ -361,7 +361,7 @@ function Ik(a){var b=a.type;if(a.init)return Yk;if("video"==b)return a.codecs.in
|
|
|
361
361
|
function Ok(a,b){var c=a.h.ab();if(!c.length)return NaN;var d=c[0];c=r(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case Jk:return d.videoBandwidth||NaN;case Kk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
|
|
362
362
|
function Tk(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=r(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
|
|
363
363
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Xk(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=r(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=Tk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
364
|
-
function Uk(a,b){if(!b||a.includes("offline:"))return a;var c=new jb(a);c.g.set("CMCD",b);return c.toString()}var Sk="m",Kk="a",Jk="v",Lk="av",Yk="i",Wk="c",Mk="tt",Hk="v",Gk="l";N("shaka.util.CmcdManager.StreamingFormat",{
|
|
364
|
+
function Uk(a,b){if(!b||a.includes("offline:"))return a;var c=new jb(a);c.g.set("CMCD",b);return c.toString()}var Sk="m",Kk="a",Jk="v",Lk="av",Yk="i",Wk="c",Mk="tt",Hk="v",Gk="l";N("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",pi:"s",$h:"o"});function Zk(){}
|
|
365
365
|
function $k(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=Ye(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Ye(l)),k=$k(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Qa("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Sa("Unexpected number of arguments for "+k),a[h]=b[h]):(Qa("Invalid config, unrecognized key "+
|
|
366
366
|
k),g=!1)}return g}function al(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function bl(a,b){return a&&b}N("shaka.util.ConfigUtils",Zk);Zk.convertToConfigObject=al;Zk.mergeConfigObjects=$k;function cl(){}
|
|
367
367
|
function dl(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Pe(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:yg,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:Pe(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,
|
|
@@ -374,10 +374,10 @@ maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:In
|
|
|
374
374
|
function fl(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return $k(a,b,c||dl(),d,"")}
|
|
375
375
|
function el(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Yb(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Qb(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
|
|
376
376
|
2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Mb&&"image"!=g.type||c.push(g);return c}N("shaka.util.PlayerConfiguration",cl);cl.mergeConfigObjects=fl;function gl(){this.g=null;this.h=[]}function hl(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function il(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=r(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
|
|
377
|
-
function jl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function kl(){this.i=this.h=null;this.g=[]}function ll(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function ml(){this.C=this.F=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.J=this.K=this.N=this.l=this.A=NaN;this.g=new gl;this.h=new kl};function T(a,b){cb.call(this);var c=this;this.l=nl;this.jd=this.g=null;this.
|
|
378
|
-
this.xb=this.h.preferForcedSubs;this.jb=[];this.Hc=null;b&&b(this);this.H=pl(this);this.H.ye(this.h.streaming.forceHTTPS);this.G=null;ql&&(this.G=Gb(ql));this.nd.o(window,"online",function(){c.pe()});this.S={name:"detach"};this.Z={name:"attach"};this.
|
|
379
|
-
function(e,f){return Ve(rl(c,e,f))});d.set(this.S,function(e){e.M&&(c.gb.sb(),e.M=null);c.G&&c.G.release();c.g=null;e=Promise.resolve();return Ve(e)});d.set(this.
|
|
380
|
-
d.set(this.Za,function(e,f){return zl(c,e,f)});this.wa=new ik(this.S,{sg:function(e,f,g,h){var k=null;e==c.S&&(k=g==c.S?c.S:c.Z);e==c.Z&&(k=g==c.S||f.M!=h.M?c.S:g==c.Z?c.Z:g==c.Xa||g==c.$?c.Xa:g==c.Za?c.Qe:null);e==c.Xa&&(k=g==c.$&&f.M==h.M?c.Pe:c.
|
|
377
|
+
function jl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function kl(){this.i=this.h=null;this.g=[]}function ll(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function ml(){this.C=this.F=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.J=this.K=this.N=this.l=this.A=NaN;this.g=new gl;this.h=new kl};function T(a,b){cb.call(this);var c=this;this.l=nl;this.jd=this.g=null;this.aa=!1;this.nd=new pf;this.gb=new pf;this.A=new pf;this.le=this.C=this.ib=this.i=this.pd=this.J=this.j=this.ma=this.X=this.na=this.K=this.kd=this.I=this.Ya=this.F=this.N=this.m=this.H=null;this.Oe=1E9;this.h=ol(this);this.Ne={width:Infinity,height:Infinity};this.B=null;this.Ca=new Ge(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Pa=this.h.preferredTextLanguage;this.Bc=this.h.preferredTextRole;
|
|
378
|
+
this.xb=this.h.preferForcedSubs;this.jb=[];this.Hc=null;b&&b(this);this.H=pl(this);this.H.ye(this.h.streaming.forceHTTPS);this.G=null;ql&&(this.G=Gb(ql));this.nd.o(window,"online",function(){c.pe()});this.S={name:"detach"};this.Z={name:"attach"};this.ba={name:"unload"};this.Pe={name:"manifest-parser"};this.Ke={name:"manifest"};this.Xa={name:"media-source"};this.me={name:"drm-engine"};this.$={name:"load"};this.Qe={name:"src-equals-drm-engine"};this.Za={name:"src-equals"};var d=new Map;d.set(this.Z,
|
|
379
|
+
function(e,f){return Ve(rl(c,e,f))});d.set(this.S,function(e){e.M&&(c.gb.sb(),e.M=null);c.G&&c.G.release();c.g=null;e=Promise.resolve();return Ve(e)});d.set(this.ba,function(e){return Ve(sl(c,e))});d.set(this.Xa,function(e){e=tl(c,e);return Ve(e)});d.set(this.Pe,function(e,f){var g=ul(c,e,f);return Ve(g)});d.set(this.Ke,function(e){return vl(c,e)});d.set(this.me,function(e){e=wl(c,e);return Ve(e)});d.set(this.$,function(e,f){return Ve(xl(c,e,f))});d.set(this.Qe,function(e,f){var g=yl(c,e,f);return Ve(g)});
|
|
380
|
+
d.set(this.Za,function(e,f){return zl(c,e,f)});this.wa=new ik(this.S,{sg:function(e,f,g,h){var k=null;e==c.S&&(k=g==c.S?c.S:c.Z);e==c.Z&&(k=g==c.S||f.M!=h.M?c.S:g==c.Z?c.Z:g==c.Xa||g==c.$?c.Xa:g==c.Za?c.Qe:null);e==c.Xa&&(k=g==c.$&&f.M==h.M?c.Pe:c.ba);e==c.Pe&&(k=Al(c.$,c.Ke,c.ba,g,f,h));e==c.Ke&&(k=Al(c.$,c.me,c.ba,g,f,h));e==c.me&&(k=Al(c.$,c.$,c.ba,g,f,h));e==c.Qe&&(k=g==c.Za&&f.M==h.M?c.Za:c.ba);if(e==c.$||e==c.Za)k=c.ba;e==c.ba&&(k=h.M&&f.M==h.M?c.Z:c.S);return k},Xf:function(e,f,g){c.dispatchEvent(Bl(Cl,
|
|
381
381
|
(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return M(function(f){return 1==f.g?A(f,sl(c,e),2):f["return"](e.M?c.Z:c.S)})},Og:function(e){c.dispatchEvent(Bl(Dl,(new Map).set("state",e.name)))}});a&&this.yc(a,!0)}u(T,cb);function Bl(a,b){return new O(a,b)}q=T.prototype;
|
|
382
382
|
q.destroy=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(a.l==El)return c["return"]();a.l=El;b=nk(a.wa,function(){return{node:a.S,payload:jk(),Lb:!1}});return A(c,new Promise(function(d){b.jc=function(){};b.qd=function(){d()};b.Sb=function(){d()};b.onError=function(){d()};b.sd=function(){d()}}),2);case 2:return A(c,a.wa.destroy(),3);case 3:a.nd&&(a.nd.release(),a.nd=null);a.gb&&(a.gb.release(),a.gb=null);a.A&&(a.A.release(),a.A=null);a.le=null;a.C=null;a.h=null;a.B=null;a.jd=null;
|
|
383
383
|
a.X=null;if(!a.H){c.D(4);break}return A(c,a.H.destroy(),5);case 5:a.H=null;case 4:cb.prototype.release.call(a),D(c)}})};
|
|
@@ -399,15 +399,15 @@ function wl(a,b){var c,d;return M(function(e){return 1==e.g?(c=Date.now()/1E3,d=
|
|
|
399
399
|
function xl(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v;return M(function(w){switch(w.g){case 1:b.startTime=c.startTime;null!=a.Hc&&(b.startTime=a.Hc,a.Hc=null);d=b.M;e=b.uri;a.ib=e;a.I=new qj({hd:function(){return d.playbackRate},ed:function(){return d.defaultPlaybackRate},Ae:function(y){d.playbackRate=y},rf:function(y){d.currentTime+=y}});f=function(){return dm(a)};g=function(){return em(a)};a.A.o(d,"playing",f);a.A.o(d,"pause",f);a.A.o(d,"ended",f);a.A.o(d,"ratechange",g);h=a.h.abrFactory;a.C&&a.le==h||
|
|
400
400
|
(a.le=h,a.C=Gb(h),"function"!=typeof a.C.playbackRateChanged&&(zb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.C.playbackRateChanged=function(){}),a.C.configure(a.h.abr));a.Ca=new Ge(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Pa=a.h.preferredTextLanguage;a.Bc=a.h.preferredTextRole;a.xb=a.h.preferForcedSubs;fm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C.init(function(y,x,C){a.j&&y!=a.j.l&&gm(a,y,!0,void 0===
|
|
401
401
|
x?!1:x,void 0===C?0:C)});a.F=hm(a,b.startTime);a.Ya=im(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);jm(a,k);Nd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=km(a);a.j.configure(a.h.streaming);a.l=lm;d.textTracks&&a.A.o(d.textTracks,"addtrack",function(y){if(y.track)switch(y=y.track,y.kind){case "chapters":mm(a,y)}});a.dispatchEvent(Bl(nm));l=null;if(m=a.ab().find(function(y){return y.active})){w.D(2);break}l=
|
|
402
|
-
om(a)?a.C.chooseVariant():null;gm(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){w.D(3);break}n=a.F.Xc();return A(w,pm(l,n),4);case 4:p=w.h,a.F.Td(p);case 3:qm(a,null,le(l));case 2:return a.F.Sd(),t=a.qb().find(function(y){return y.active}),t||((v=ve(a.i.textStreams,a.Pa,a.Bc,a.xb)[0]||null)&&ll(a.B.h,v,!0),l&&(v?(l.audio&&rm(a,l.audio,v)&&(a.
|
|
402
|
+
om(a)?a.C.chooseVariant():null;gm(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){w.D(3);break}n=a.F.Xc();return A(w,pm(l,n),4);case 4:p=w.h,a.F.Td(p);case 3:qm(a,null,le(l));case 2:return a.F.Sd(),t=a.qb().find(function(y){return y.active}),t||((v=ve(a.i.textStreams,a.Pa,a.Bc,a.xb)[0]||null)&&ll(a.B.h,v,!0),l&&(v?(l.audio&&rm(a,l.audio,v)&&(a.aa=!0),a.aa&&a.N.l.setTextVisibility(!0),sm(a)):a.aa=!1),v&&(a.h.streaming.alwaysStreamText||a.Pb())&&Rj(a.j,v)),A(w,a.j.start(),5);case 5:a.h.abr.enabled&&
|
|
403
403
|
(a.C.enable(),tm(a)),ce(a.j?a.j.l:null,a.i),um(a.i),vm(a),om(a),a.i.variants.some(function(y){return y.primary}),a.A.Ga(d,"loadedmetadata",function(){a.B.m=Date.now()/1E3-c.Fe}),D(w)}})}
|
|
404
404
|
function yl(a,b,c){var d,e,f,g,h,k,l;return M(function(m){return 1==m.g?(d=Nb,e=Date.now()/1E3,f=!0,a.m=$l(a,{Qb:a.H,onError:function(n){Ol(a,n)},rd:function(n){am(a,n)},onExpirationUpdated:function(n,p){bm(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==cm&&f&&(f=!1,a.B.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=Kg(g),k=Ml[h],"application/x-mpegurl"==k&&ad()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
|
|
405
405
|
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Cd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.hb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.X=!0,A(m,bg(a.m,[l],[]),2)):A(m,a.m.yc(b.M),
|
|
406
406
|
0)})}
|
|
407
407
|
function zl(a,b,c){function d(){return dm(a)}b.uri=c.uri;b.startTime=c.startTime;a.ib=b.uri;var e=b.M;a.F=new fj(e);var f=!1;a.jb.push(function(){f=!0});null!=b.startTime&&a.F.Td(b.startTime);a.I=new qj({hd:function(){return e.playbackRate},ed:function(){return e.defaultPlaybackRate},Ae:function(k){e.playbackRate=k},rf:function(k){e.currentTime+=k}});jm(a,a.h.streaming.rebufferingGoal);a.A.o(e,"playing",d);a.A.o(e,"pause",d);a.A.o(e,"ended",d);a.A.o(e,"ratechange",function(){return em(a)});"none"!=e.preload&&
|
|
408
408
|
a.A.Ga(e,"loadedmetadata",function(){a.B.m=Date.now()/1E3-c.Fe});e.audioTracks&&(a.A.o(e.audioTracks,"addtrack",function(){return vm(a)}),a.A.o(e.audioTracks,"removetrack",function(){return vm(a)}),a.A.o(e.audioTracks,"change",function(){return vm(a)}));e.textTracks&&(a.A.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":wm(a,k);break;case "chapters":mm(a,k);break;default:vm(a)}}),a.A.o(e.textTracks,"removetrack",function(){return vm(a)}),a.A.o(e.textTracks,
|
|
409
|
-
"change",function(){return vm(a)}));var g=Kg(b.uri);e.src=Qk(a.X,b.uri,Ml[g]);(Yc()||Zc())&&e.load();a.l=xm;a.dispatchEvent(Bl(nm));var h=new Pc;Ui(e,HTMLMediaElement.HAVE_METADATA,a.A,function(){a.F.Sd();h.resolve()});Ui(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.A,function(){var k;return M(function(l){if(1==l.g)return ym(a),k=zm(a),k.find(function(m){return"disabled"!=m.mode})?l.D(2):A(l,new Promise(function(m){a.A.Ga(e.textTracks,"change",m);(new Q(m)).R(1)}),2);if(f)return l["return"]();
|
|
410
|
-
e.error?h.reject(Nl(a)):"none"==e.preload&&(Sa('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.A.Ga(e,"error",function(){h.reject(Nl(a))});return new Re(h,function(){h.reject(new P(2,7,7001));return Promise.resolve()})}
|
|
409
|
+
"change",function(){return vm(a)}));var g=Kg(b.uri);e.src=Qk(a.X,b.uri,Ml[g]);(Yc()||Zc())&&e.load();a.l=xm;a.dispatchEvent(Bl(nm));var h=new Pc;Ui(e,HTMLMediaElement.HAVE_METADATA,a.A,function(){a.F.Sd();h.resolve()});Ui(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.A,function(){var k;return M(function(l){if(1==l.g)return ym(a),k=zm(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.aa=!0),l.D(2)):A(l,new Promise(function(m){a.A.Ga(e.textTracks,"change",m);(new Q(m)).R(1)}),2);if(f)return l["return"]();
|
|
410
|
+
Am(a);D(l)})});e.error?h.reject(Nl(a)):"none"==e.preload&&(Sa('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.A.Ga(e,"error",function(){h.reject(Nl(a))});return new Re(h,function(){h.reject(new P(2,7,7001));return Promise.resolve()})}
|
|
411
411
|
function ym(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.xd(b);var c=a.h.preferredVariantRole;""!=c&&a.xd(b,c)}}function Am(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.se(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.se(b,d,c)}}
|
|
412
412
|
function wm(a,b){if("metadata"==b.kind){b.mode="hidden";a.A.o(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Sl(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new Q(function(){var d=Bm(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Ba().R(.5);a.jb.push(function(){c.stop()})}}
|
|
413
413
|
function Sl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Bl(Cm,b))}function mm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Q(function(){b.mode="hidden"})).Ba().R(.5);a.jb.push(function(){c.stop()})}}function Zl(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}function $l(a,b){return new Vf(b,a.h.drm.updateExpirationTime)}
|
|
@@ -429,16 +429,16 @@ q.ab=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.va
|
|
|
429
429
|
q.qb=function(){if(this.i){for(var a=this.j?this.j.A:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=me(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?zm(this).map(function(f){return qe(f)}):[]};q.jg=function(){return this.i?this.i.imageStreams.map(function(a){return ne(a)}):[]};
|
|
430
430
|
q.Ag=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,C,z,B;return M(function(F){if(1==F.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?F.D(3):A(F,d.createSegmentIndex(),3):F["return"](null):F.D(2);if(2!=F.g){e=d.segmentIndex.find(b);if(null==e)return F["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return F["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;t=l/n;
|
|
431
431
|
v=m*n;w=f.l-f.startTime;y=f.i||w/v;x=f.startTime;z=C=0;1<v&&(B=Math.floor((b-f.startTime)/y),x=f.startTime+B*y,C=B%m*p,z=Math.floor(B/m)*t);return F["return"]({imageHeight:l,imageWidth:k,height:t,positionX:C,positionY:z,startTime:x,duration:y,uris:f.Ka(),width:p})}return F["return"](null)})};
|
|
432
|
-
q.ue=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.A&&(ll(this.B.h,b,!1),Rj(this.j,b),Lm(this),this.Pa=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=zm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,oe(c)==a.id?c.mode=this.
|
|
432
|
+
q.ue=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.A&&(ll(this.B.h,b,!1),Rj(this.j,b),Lm(this),this.Pa=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=zm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,oe(c)==a.id?c.mode=this.aa?"showing":"hidden":c.mode="disabled";Lm(this)}};
|
|
433
433
|
q.ve=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Sa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&te(d)&&(gm(this,d,!1,b,c),this.Ca=new Fe(d),om(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
|
|
434
434
|
oe(c)==a.id){Mm(this,c);break}};q.Zf=function(){return Nm(this.ab())};q.zg=function(){return Nm(this.qb())};q.Yf=function(){return Array.from(Om(this.ab()))};q.yg=function(){return Array.from(Om(this.qb()))};
|
|
435
435
|
q.xd=function(a,b){if(this.i&&this.F){this.Ca=new Ge(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.Ca.create(this.i.variants),f=null;e=r(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=le(f),this.ve(c,!0)):Km(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Qb(a);f=d=null;e=
|
|
436
436
|
r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=se(g);Qb(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?Mm(this,f):d&&Mm(this,d)}};
|
|
437
437
|
q.se=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.Pa=a,this.Bc=b||"",this.xb=c,(a=ve(this.i.textStreams,this.Pa,this.Bc,this.xb)[0]||null)&&a!=this.j.A&&(ll(this.B.h,a,!1),this.h.streaming.alwaysStreamText||this.Pb()))Rj(this.j,a),Lm(this)}else{var d=Qb(a);(a=this.qb().find(function(e){return Qb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.ue(a)}};
|
|
438
|
-
q.bh=function(a){if(this.i&&this.F){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Ca=new Ge(b.language,"",0,a),Km(this))}};q.Pb=function(){var a=this.
|
|
438
|
+
q.bh=function(a){if(this.i&&this.F){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Ca=new Ge(b.language,"",0,a),Km(this))}};q.Pb=function(){var a=this.aa;return this.N?this.N.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?zm(this).some(function(b){return"showing"==b.mode}):a};q.ef=function(){return this.g&&this.g.src&&this.g.textTracks?Pm(this).map(function(a){return qe(a)}):[]};
|
|
439
439
|
q.cg=function(a){var b=Qb(a),c=Pm(this).filter(function(h){return Qb(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=r(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=r(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
|
|
440
440
|
function zm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Bm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Pm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
441
|
-
q.De=function(a){a=!!a;if(this.
|
|
441
|
+
q.De=function(a){a=!!a;if(this.aa!=a){this.aa=a;if(this.l==lm)this.N.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.A||(a=ve(this.i.textStreams,this.Pa,this.Bc,this.xb),0<a.length&&(Rj(this.j,a[0]),Lm(this))):Nj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=zm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}sm(this)}};
|
|
442
442
|
q.ug=function(){if(!this.T())return null;var a=this.wa.l,b=0;if(this.F)b=this.F.Xc();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
|
|
443
443
|
q.jf=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.zb=function(){if(this.l==lm)return this.N.zb();var a={total:[],audio:[],video:[],text:[]};this.l==xm&&(a.total=oi(this.g.buffered));return a};
|
|
444
444
|
q.getStats=function(){if(this.l!=lm&&this.l!=xm)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};dm(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.B;b=Math.round(100*b);c.i=isNaN(c.i)?
|
|
@@ -485,22 +485,22 @@ T.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return M(function(h
|
|
|
485
485
|
Tc()?!!Lg[p]:Uc(l[p]);c=k;k={};p=r('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="opus",audio/mp4; codecs="flac",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(","));
|
|
486
486
|
for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Tc()?Ed(l)?!0:MediaSource.isTypeSupported(l)||ud(l):Uc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=kn;for(g in f)e[g]=f[g]();return h["return"](e)})};T.isBrowserSupported=Fl;T.setAdManagerFactory=function(a){ql=a};T.registerSupportPlugin=function(a,b){kn[a]=b};T.prototype.destroy=T.prototype.destroy;
|
|
487
487
|
var fn="abrstatuschanged",$m="adaptation",Xm="buffering",Em="downloadfailed",Dm="downloadheadersreceived",cm="drmsessionupdate",gk="emsg",gn="error",jn="expirationupdated",Ll="loaded",Il="loading",Yl="manifestparsed",Vl="mediaqualitychanged",Cm="metadata",Cl="onstatechange",Dl="onstateidle",Ym="ratechange",nm="streaming",dn="textchanged",en="texttrackvisibility",Ul="timelineregionadded",Gm="timelineregionenter",Hm="timelineregionexit",bn="trackschanged",Pl="unloading",cn="variantchanged",ln={uh:fn,
|
|
488
|
-
vh:$m,wh:Xm,
|
|
488
|
+
vh:$m,wh:Xm,Ah:Em,Bh:Dm,Ch:cm,Jh:gk,Error:gn,Kh:jn,Ph:"largegap",Qh:Ll,Rh:Il,Vh:Yl,Wh:Vl,Metadata:Cm,ai:Cl,bi:Dl,li:Ym,si:"sessiondata",ti:nm,wi:dn,xi:en,zi:Ul,Ai:Gm,Bi:Hm,Ci:bn,Gi:Pl,Ii:cn},El=0,nl=1,lm=2,xm=3;T.LoadMode={DESTROYED:El,NOT_LOADED:nl,MEDIA_SOURCE:lm,SRC_EQUALS:xm};T.version="v3.3.18";var mn=["3","3"];Ab=new function(a){this.g=a;this.i=Bb;this.h=Cb}(new yb(Number(mn[0]),Number(mn[1])));
|
|
489
489
|
var hn=["output-restricted","internal-error"],kn={},ql=null,Ml={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"},Qm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
490
490
|
ssa:"text/x-ssa",ass:"text/x-ssa"};function nn(){this.h=[];this.j=this.i=this.g=0};function on(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new pf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}q=on.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
|
|
491
491
|
q.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
|
|
492
492
|
q.isLinear=function(){return this.h.isLinear()};q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};
|
|
493
493
|
N("shaka.ads.ClientSideAd",on);on.prototype.release=on.prototype.release;on.prototype.getPositionInSequence=on.prototype.getPositionInSequence;on.prototype.getSequenceLength=on.prototype.getSequenceLength;on.prototype.setMuted=on.prototype.setMuted;on.prototype.resize=on.prototype.resize;on.prototype.isLinear=on.prototype.isLinear;on.prototype.isMuted=on.prototype.isMuted;on.prototype.setVolume=on.prototype.setVolume;on.prototype.getVolume=on.prototype.getVolume;on.prototype.play=on.prototype.play;
|
|
494
|
-
on.prototype.pause=on.prototype.pause;on.prototype.skip=on.prototype.skip;on.prototype.canSkipNow=on.prototype.canSkipNow;on.prototype.getTimeUntilSkippable=on.prototype.getTimeUntilSkippable;on.prototype.isSkippable=on.prototype.isSkippable;on.prototype.isPaused=on.prototype.isPaused;on.prototype.getRemainingTime=on.prototype.getRemainingTime;on.prototype.getMinSuggestedDuration=on.prototype.getMinSuggestedDuration;on.prototype.getDuration=on.prototype.getDuration;function pn(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.l=d;this.j=null;this.h=new pf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v3.3.
|
|
495
|
-
function(f){rn(e,f)});this.i
|
|
494
|
+
on.prototype.pause=on.prototype.pause;on.prototype.skip=on.prototype.skip;on.prototype.canSkipNow=on.prototype.canSkipNow;on.prototype.getTimeUntilSkippable=on.prototype.getTimeUntilSkippable;on.prototype.isSkippable=on.prototype.isSkippable;on.prototype.isPaused=on.prototype.isPaused;on.prototype.getRemainingTime=on.prototype.getRemainingTime;on.prototype.getMinSuggestedDuration=on.prototype.getMinSuggestedDuration;on.prototype.getDuration=on.prototype.getDuration;function pn(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.l=d;this.j=null;this.h=new pf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v3.3.18");this.g=null;this.h.Ga(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){qn(e,f)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
495
|
+
function(f){rn(e,f)});this.h.o(this.i,"ended",function(){e.m.contentComplete()})}pn.prototype.stop=function(){this.g&&this.g.stop();this.A&&uk(this.A)};pn.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function rn(a,b){b.getError();sn(a,null);a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
496
496
|
function qn(a,b){a.l(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));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){var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",d)))}tn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
|
|
497
497
|
a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)),a.i.addEventListener("play",function(){a.g.start()},{once:!0})}catch(f){sn(a,null)}}
|
|
498
498
|
function tn(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.l(new O(d,e))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){rn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){un(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){un(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
499
499
|
function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){sn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){sn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
500
500
|
a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j.i=!0;b(c,"ad-paused")});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j.i=!1;b(c,"ad-resumed")});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.o(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.o(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.o(a.g,
|
|
501
501
|
google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.o(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.o(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.o(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.o(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.o(a.g,google.ima.AdEvent.Type.AD_METADATA,
|
|
502
|
-
function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
503
|
-
function sn(a,b){a.l(new O("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.A.removeAttribute("ad-active"),a.i.play())};function vn(a,b){this.i=a;this.h=null;this.g=b}q=vn.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
|
|
502
|
+
function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
503
|
+
function un(a,b){var c=b.getAd();a.j=new on(c,a.g);c=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b);a.l(new O("ad-started",c));a.j.isLinear()&&(a.A.setAttribute("ad-active","true"),a.i.pause(),a.j.setVolume(a.i.muted?0:a.i.volume))}function sn(a,b){a.l(new O("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.A.removeAttribute("ad-active"),a.i.ended||a.i.play())};function vn(a,b){this.i=a;this.h=null;this.g=b}q=vn.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
|
|
504
504
|
q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};
|
|
505
505
|
q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};N("shaka.ads.ServerSideAd",vn);vn.prototype.release=vn.prototype.release;vn.prototype.getPositionInSequence=vn.prototype.getPositionInSequence;vn.prototype.getSequenceLength=vn.prototype.getSequenceLength;vn.prototype.setMuted=vn.prototype.setMuted;
|
|
506
506
|
vn.prototype.resize=vn.prototype.resize;vn.prototype.isLinear=vn.prototype.isLinear;vn.prototype.isMuted=vn.prototype.isMuted;vn.prototype.setVolume=vn.prototype.setVolume;vn.prototype.getVolume=vn.prototype.getVolume;vn.prototype.play=vn.prototype.play;vn.prototype.pause=vn.prototype.pause;vn.prototype.skip=vn.prototype.skip;vn.prototype.canSkipNow=vn.prototype.canSkipNow;vn.prototype.getTimeUntilSkippable=vn.prototype.getTimeUntilSkippable;vn.prototype.isSkippable=vn.prototype.isSkippable;
|
|
@@ -512,8 +512,8 @@ f;e.i(new O("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}wn.prototyp
|
|
|
512
512
|
function xn(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.A=d,a.l.currentTime=e.start)}})};function U(){cb.call(this);this.g=this.i=null;this.h=new nn;this.j=navigator.language}u(U,cb);q=U.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new P(2,10,1E4);this.i&&this.i.release();this.i=new pn(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)})};
|
|
513
513
|
q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);cb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new O("ad-stopped"));this.h=new nn};q.requestClientSideAds=function(a){if(!this.i)throw new P(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.m.requestAds(a)};
|
|
514
514
|
q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new P(2,10,10002);this.g&&this.g.release();this.g=new wn(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)})};
|
|
515
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('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="v3.3.
|
|
516
|
-
(c.H=!0),c.j=new Pc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Sa('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="v3.3.
|
|
515
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('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="v3.3.18";c=this.g;var d=b;c.j?c=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
516
|
+
(c.H=!0),c.j=new Pc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Sa('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="v3.3.18";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new P(1,10,10003);return this.g.G};
|
|
517
517
|
q.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.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)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};N("shaka.ads.AdManager",U);
|
|
518
518
|
U.prototype.onCueMetadataChange=U.prototype.onCueMetadataChange;U.prototype.onHlsTimedMetadata=U.prototype.onHlsTimedMetadata;U.prototype.onDashTimedMetadata=U.prototype.onDashTimedMetadata;U.prototype.getStats=U.prototype.getStats;U.prototype.getServerSideCuePoints=U.prototype.getServerSideCuePoints;U.prototype.replaceServerSideAdTagParameters=U.prototype.replaceServerSideAdTagParameters;U.prototype.requestServerSideStream=U.prototype.requestServerSideStream;U.prototype.initServerSide=U.prototype.initServerSide;
|
|
519
519
|
U.prototype.requestClientSideAds=U.prototype.requestClientSideAds;U.prototype.onAssetUnload=U.prototype.onAssetUnload;U.prototype.release=U.prototype.release;U.prototype.initClientSide=U.prototype.initClientSide;U.prototype.setLocale=U.prototype.setLocale;U.ADS_LOADED="ads-loaded";U.AD_STARTED="ad-started";U.AD_FIRST_QUARTILE="ad-first-quartile";U.AD_MIDPOINT="ad-midpoint";U.AD_THIRD_QUARTILE="ad-third-quartile";U.AD_COMPLETE="ad-complete";U.AD_STOPPED="ad-stopped";U.AD_SKIPPED="ad-skipped";
|
|
@@ -566,7 +566,7 @@ null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||xo(a);break;case "LOAD":a.m=
|
|
|
566
566
|
function Bo(a,b,c,d){a.h&&qo(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function qo(a,b,c,d){a.H&&(a=yn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function xo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.A?Co:a.h.Kc()?Do:a.g.paused?Eo:Fo,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);qo(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
|
|
567
567
|
N("shaka.cast.CastReceiver",mo);mo.prototype.destroy=mo.prototype.destroy;mo.prototype.setContentArtist=mo.prototype.dh;mo.prototype.setContentImage=mo.prototype.eh;mo.prototype.setContentTitle=mo.prototype.gh;mo.prototype.clearContentMetadata=mo.prototype.Uf;mo.prototype.setContentMetadata=mo.prototype.fh;mo.prototype.isIdle=mo.prototype.Hg;mo.prototype.isConnected=mo.prototype.isConnected;var zo=.5,vo=5,Co="IDLE",Fo="PLAYING",Do="BUFFERING",Eo="PAUSED";function Go(a){var b=this;this.g=[];this.h=[];this.data=[];(new Qg).box("moov",Ug).V("pssh",function(c){if(!(1<c.version)){var d=Ic(c.reader.U,-12,c.size);b.data.push(d);b.g.push(rd(c.reader.Cb(16)));if(0<c.version){d=c.reader.P();for(var e=0;e<d;e++){var f=rd(c.reader.Cb(16));b.h.push(f)}}}}).parse(a)}
|
|
568
568
|
function Ho(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Lc(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function Io(a){if(!a)return a;var b=new Go(a);if(1>=b.data.length)return a;a=[];var c={};b=r(b.data);for(var d=b.next();!d.done;c={Sc:c.Sc},d=b.next())c.Sc=d.value,a.some(function(e){return function(f){return Gc(f,e.Sc)}}(c))||a.push(c.Sc);return sd.apply(md,ia(a))};function Jo(a,b,c){var d=Ko(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new P(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.zf?(e=h.init||e,!1):!0}),f.length&&(a=Lo(e,f,c),0==a.length&&(a=[Ib("",e)])));if(d.length&&(b||!f.length))for(a=[],b=r(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Ib(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
|
|
569
|
-
r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Ze:g,
|
|
569
|
+
r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Ze:g,Ji:e,drmInfos:a,df:!0}}function Mo(a,b,c,d){var e=Jo(a,c,d);if(b.df){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.df=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new P(2,4,4008);return e.Ze||b.Ze}
|
|
570
570
|
function No(a){var b=0,c=Lc(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Ic(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
|
|
571
571
|
function Oo(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function Po(a){a=Cf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=pd(a.textContent);a=No(a).filter(function(b){return b.type===Qo})[0];if(!a)return"";a=hd(a.value,!0);return(a=Sf(a,"WRMHEADER"))?Oo(a):""}
|
|
572
572
|
function Lo(a,b,c){var d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.zf];if(f){var g;if(g=Cf(e.node,"urn:microsoft:playready","pro")){g=pd(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:Ho(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=Ib(f,e.init||a||g);if(f=Ro.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
|
|
@@ -589,9 +589,9 @@ function kp(a,b){var c=Number(Vo(a,lp,"presentationTimeOffset"))||0,d=Vo(a,lp,"t
|
|
|
589
589
|
function op(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,w,y,x,C,z,B,F;return M(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.mb||!a.Y.Xd,l=a.Y.start,m=a.Y.duration,n=a.L.mimeType.split("/")[1],p=b,t=null,v=[p(d,e,f),"webm"==n?p(c.Ka(),c.Ha,c.ya):null],p=null,A(G,Promise.all(v),2);w=G.h;y=w[0];x=w[1]||null;C=null;z=l-g;B=l;F=m?l+m:Infinity;if("mp4"==n)var H=Zo(y,e,d,c,z,B,F);else{H=new ap(x);if(440786851!=bp(H).id)throw new P(2,3,3008);var J=bp(H);if(408125543!=J.id)throw new P(2,3,3009);H=J.g.byteOffset;
|
|
590
590
|
J=new ap(J.g);for(var K=null;J.Ea();){var L=bp(J);if(357149030==L.id){K=L;break}}if(!K)throw new P(2,3,3010);K=new ap(K.g);L=1E6;for(J=null;K.Ea();){var W=bp(K);if(2807729==W.id)L=fp(W);else if(17545==W.id)if(4==W.g.byteLength)J=W.g.getFloat32(0);else if(8==W.g.byteLength)J=W.g.getFloat64(0);else throw new P(2,3,3003);}if(null==J)throw new P(2,3,3011);K=L/1E9;J*=K;L=bp(new ap(y));if(475249515!=L.id)throw new P(2,3,3007);H=gp(L,H,K,J,d,c,z,B,F)}C=H;h.ic(C);t=new mj(C);k&&t.yb(B,F,!0);return G["return"](t)})}
|
|
591
591
|
function lp(a){return a.Oc}function np(a){var b=Wo(a,lp,"RepresentationIndex");a=Vo(a,lp,"indexRange");a=Mf(a||"");b&&(a=Jf(b,"range",Mf,a));return a}function mp(a,b){pp(a,b);if(!np(a))throw new P(2,4,4002);}function pp(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Mb&&"mp4"!=c&&"webm"!=c)throw new P(2,4,4006);if("webm"==c&&!b)throw new P(2,4,4005);}
|
|
592
|
-
function jp(a){var b=a.L;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.od,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function qp(a,b){var c=ip(a,rp),d=sp(a);if(!d.Aa&&!d.timeline&&1<d.ec.length)throw new P(2,4,4002);if(!d.Aa&&!a.Y.duration&&!d.timeline&&1==d.ec.length)throw new P(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new P(2,4,4002);var e=null,f=null;a.sa.id&&a.L.id&&(f=b[a.sa.id+","+a.L.id])&&(e=f.segmentIndex);var g=
|
|
592
|
+
function jp(a){var b=a.L;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.od,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function qp(a,b){var c=ip(a,rp),d=sp(a);if(!d.Aa&&!d.timeline&&1<d.ec.length)throw new P(2,4,4002);if(!d.Aa&&!a.Y.duration&&!d.timeline&&1==d.ec.length)throw new P(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new P(2,4,4002);var e=null,f=null;a.sa.id&&a.L.id&&(f=b[a.sa.id+","+a.L.id])&&(e=f.segmentIndex);var g=tp(a.Y.start,a.Y.duration,a.L.Qa,d,c);c=!e;e?e.hc(g,a.presentationTimeline.pb()):e=new mj(g);a.presentationTimeline.ic(g);a.mb&&a.Y.Xd||e.yb(a.Y.start,a.Y.duration?a.Y.start+a.Y.duration:
|
|
593
593
|
Infinity,c);f&&(f.segmentIndex=e);return{ac:function(){e&&0!=e.O.length||e.fc(g);return Promise.resolve(e)}}}function rp(a){return a.Db}function sp(a){var b=Cp(a);a=Uo(a,rp);var c=a.nc;0==c&&(c=1);var d=0;a.Aa?d=a.Aa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Aa:a.Aa,startTime:d,nc:c,ub:a.ub,timeline:a.timeline,ec:b}}
|
|
594
|
-
function
|
|
594
|
+
function tp(a,b,c,d,e){var f=d.ec.length;d.timeline&&d.timeline.length!=d.ec.length&&(f=Math.min(d.timeline.length,d.ec.length));for(var g=a-d.ub,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={Id:m.Id},n++){var p=d.ec[n];m.Id=Hb(c,[p.Ng]);var t=void 0;t=null!=d.Aa?l+d.Aa:d.timeline?d.timeline[n].end:l+b;k.push(new Ni(a+l,a+t,function(v){return function(){return v.Id}}(m),p.start,p.end,e,g,a,h));l=t}return k}
|
|
595
595
|
function Cp(a){return[a.L.Db,a.xa.Db,a.sa.Db].filter(Fb).map(function(b){return Bf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.mf&&(a.mf=!0);var c=b.getAttribute("media");b=Jf(b,"mediaRange",Mf,{start:0,end:null});return{Ng:c,start:b.start,end:b.end}})};function Dp(a,b,c,d,e,f){var g=Ep(a),h=Fp(a);Gp(h);var k=Ze(a);if(h.Jc)return pp(a,g),{ac:function(){var t=To(h.Jc,k.L.id,null,k.bandwidth||null,null);t=Hb(k.L.Qa,[t]);return op(k,b,g,t,0,null,h.ub)}};if(h.Aa)return d||"image"===a.xa.contentType||(a.presentationTimeline.ge(h.Aa),a.presentationTimeline.ie(a.Y.start)),{ac:function(){return Hp(k,h,e,g,f)}};var l=null;d=d=null;a.sa.id&&a.L.id&&(d=a.sa.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=Ip(k,h,g);c=a.Y.start;var n=a.Y.duration?a.Y.start+a.Y.duration:
|
|
596
596
|
Infinity,p=!(a.mb&&a.Y.Xd);l?(p&&(new mj(m)).yb(c,n,!0),l.hc(m,a.presentationTimeline.pb())):l=new mj(m);a.presentationTimeline.ic(m);p&&l.yb(c,n);d&&a.mb&&(d.segmentIndex=l);return{ac:function(){l&&0!=l.O.length||l.fc(m);return Promise.resolve(l)}}}function Jp(a){return a.Pc}function Fp(a){var b=Uo(a,Jp),c=Vo(a,Jp,"media");a=Vo(a,Jp,"index");return{Aa:b.Aa,timescale:b.timescale,nc:b.nc,ub:b.ub,Me:b.Me,timeline:b.timeline,fe:c,Jc:a}}
|
|
597
597
|
function Gp(a){var b=a.Jc?1:0;b+=a.timeline?1:0;b+=a.Aa?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.Jc&&(a.timeline=null),a.Aa=null);if(!a.Jc&&!a.fe)throw new P(2,4,4002);}
|
|
@@ -646,7 +646,7 @@ l}}var n;m=Bf(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var p=m.next();!p.do
|
|
|
646
646
|
10)));m=Bf(c,"Accessibility");var v=new Map;m=r(m);for(p=m.next();!p.done;p=m.next())if(t=p.value,p=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=t){t=t.split(";");for(var w=r(t),y=w.next();!y.done;y=w.next()){var x=y.value,C=y=void 0;x.includes("=")?(x=x.split("="),y=x[0].startsWith("CC")?x[0]:"CC"+x[0],C=x[1]||"und"):(y="CC"+p,2==t.length?p+=2:p++,C=x);v.set(y,Qb(C))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
|
|
647
647
|
1,null!=t)for(t=r(t.split(";")),y=t.next();!y.done;y=t.next())y=y.value,x=w=void 0,y.includes("=")?(y=y.split("="),w="svc"+y[0],x=y[1].split(",")[0].split(":").pop()):(w="svc"+p,p++,x=y),v.set(w,Qb(x));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Bf(c,"ContentProtection");var z=Jo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=Qb(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=Bf(c,"Label"))&&l.length&&
|
|
648
648
|
(l=l[0],l.textContent&&(F=l.textContent));l=Bf(c,"Representation");c=l.map(function(G){if(G=Bq(a,b,z,h,B,F,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.xa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new P(2,4,4003);}if(!b.xa.contentType||"application"==b.xa.contentType)for(b.xa.contentType=Cq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.xa.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
|
|
649
|
-
m.value,p=r(z.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Fb);return{id:b.xa.id||"__fake__"+a.I++,contentType:b.xa.contentType,language:B,
|
|
649
|
+
m.value,p=r(z.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Fb);return{id:b.xa.id||"__fake__"+a.I++,contentType:b.xa.contentType,language:B,Ki:e,streams:c,drmInfos:z.drmInfos,Ie:f,Zg:k}}
|
|
650
650
|
function Bq(a,b,c,d,e,f,g,h,k,l){b.L=xq(l,b.xa,null);a.C=Math.min(a.C,b.L.Zb);if(!Dq(b.L))return null;var m=b.Y.start;b.bandwidth=Jf(l,"bandwidth",Of)||0;var n=b.L.contentType,p=n==Mb||"application"==n;n="image"==n;try{var t=function(H,J,K){return Eq(a,H,J,K)};if(b.L.Oc)var v=kp(b,t);else if(b.L.Db)v=qp(b,a.l);else if(b.L.Pc)v=Dp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var w=b.L.Qa,y=b.Y.duration||0;v={ac:function(){return Promise.resolve(oj(m,y,w))}}}}catch(H){if((p||n)&&4002==H.code)return null;
|
|
651
651
|
throw H;}t=Bf(l,"ContentProtection");t=Mo(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var x=!1;Bf(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(x=!0);var C=!1;p&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(n&&((l=Bf(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
|
|
652
652
|
(z=l.getAttribute("value")),!z))return null;var B;l=b.L.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(B="PQ");var F=b.L.id?b.sa.id+","+b.L.id:"",G={id:a.I++,originalId:b.L.id,createSegmentIndex:function(){var H,J,K;return M(function(L){if(1==L.g){J=(H=F&&b.mb&&a.l[F])?a.l[F]:G;if(J.segmentIndex)return L.D(0);K=J;return A(L,v.ac(),3)}K.segmentIndex=L.h;D(L)})},closeSegmentIndex:function(){G.segmentIndex&&
|
|
@@ -668,14 +668,14 @@ function Wq(a,b,c){b=gd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d
|
|
|
668
668
|
var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Xq(a,m),Yq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Jq(m,"TYPE")?k.push(m):"MAP"==Jq(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Hb([d],[m.trim()])[0],h&&g.push(h),e.push(new Lq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Lq("",g,k)));return new Hq(c,b,f,
|
|
669
669
|
e)}f.push(h);"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Mq("URI",k)),e=!0)}}return new Hq(c,b,f)}function Xq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new P(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new Rq(f);var h;(h=Tq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=Tq(f,k);)d.push(new Mq(h[1],h[2]||h[3])),Sq(f)}return new Iq(c,e,d,g)}
|
|
670
670
|
var Yq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Zq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function $q(){}function ar(a){try{var b=br(a);return Ue({uri:a,uf:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Se(c)}}function br(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new P(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new P(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=pd(a):e=kd(a);return{data:e,contentType:c}}
|
|
671
|
-
N("shaka.net.DataUriPlugin",$q);$q.parse=ar;cf("data",ar);function cr(){var a=this;this.g=this.i=null;this.wa=1;this.A=new Map;this.C=new Map;this.na=new Set;this.h=new Map;this.j=null;this.N="";this.$=new Vq;this.ma=0;this.F=new Q(function(){dr(a)});this.m=er;this.G=null;this.
|
|
671
|
+
N("shaka.net.DataUriPlugin",$q);$q.parse=ar;cf("data",ar);function cr(){var a=this;this.g=this.i=null;this.wa=1;this.A=new Map;this.C=new Map;this.na=new Set;this.h=new Map;this.j=null;this.N="";this.$=new Vq;this.ma=0;this.F=new Q(function(){dr(a)});this.m=er;this.G=null;this.va=0;this.I=Infinity;this.Z=this.ba=0;this.H=new $e;this.X=[];this.K=new Map;this.Ca=!1;this.B=new Map;this.S=null;this.aa=new Map;this.J=new Map;this.l=!1}q=cr.prototype;q.configure=function(a){this.g=a};
|
|
672
672
|
q.start=function(a,b){var c=this,d,e;return M(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),A(f,fr(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,A(f,gr(c,d.data),3);e=c.ma;0<e&&c.F.R(e);return f["return"](c.G)})};q.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.H&&(a.push(this.H.destroy()),this.H=null);this.g=this.i=null;this.na.clear();this.G=null;this.h.clear();this.C.clear();this.B.clear();this.A.clear();return Promise.all(a)};
|
|
673
673
|
q.update=function(){var a=this,b,c,d;return M(function(e){if(1==e.g){if(a.m==er)return e["return"]();b=[];a.S=null;c=Array.from(a.h.values());return c.length?A(e,hr(a,c[0]),2):e.D(2)}for(d=1;d<c.length;d++)b.push(hr(a,c[d]));return A(e,Promise.all(b),0)})};
|
|
674
674
|
function hr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v;return M(function(w){if(1==w.g)return c=ir,d=b.Mf,e=new jb(d),a.l&&b.Rf&&nb(e,new pb("_HLS_skip=YES")),A(w,fr(a,e.toString()),2);if(3!=w.g){f=w.h;g=Wq(a.$,f.data,f.uri);if(1!=g.type)throw new P(2,4,4017);h=Nq(g.g,"EXT-X-DEFINE");k=jr(a,h);l=b.stream;return A(w,kr(a,b.zd,g,l.type,l.mimeType,b.ee,k,b.Wf,l.codecs,l.bandwidth),3)}m=w.h;l.segmentIndex.hc(m,a.j.pb());m.length&&(n=Qq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.ee.get(n),l.segmentIndex.Hb(p));t=m[m.length-
|
|
675
675
|
1];if(v=Pq(g.g,"EXT-X-ENDLIST"))lr(a,c.Lf),a.j.cb(t.endTime);D(w)})}q.onExpirationUpdated=function(){};
|
|
676
676
|
function gr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x,C,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia,Ma,Da,Ra,cc,Gd;return M(function(gb){switch(gb.g){case 1:c=Wq(a.$,b,a.N);if(0!=c.type)throw new P(2,4,4022);d=Nq(c.g,"EXT-X-DEFINE");mr(a,d);e=Nq(c.g,"EXT-X-MEDIA");f=Nq(c.g,"EXT-X-STREAM-INF");g=Nq(c.g,"EXT-X-IMAGE-STREAM-INF");nr(a,f);h=Nq(c.g,"EXT-X-SESSION-DATA");k=r(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Jq(m,"DATA-ID"),p=Jq(m,"URI"),t=Jq(m,"LANGUAGE"),v=Jq(m,"VALUE"),w=(new Map).set("id",n),p&&
|
|
677
677
|
w.set("uri",Hb([a.N],[p])[0]),t&&w.set("language",t),v&&w.set("value",v),y=new O("sessiondata",w),a.i)a.i.onEvent(y);return A(gb,or(a,e),2);case 2:return pr(a,e),A(gb,qr(a,f),3);case 3:return x=gb.h,A(gb,rr(a,e),4);case 4:return C=gb.h,A(gb,sr(a,g),5);case 5:z=gb.h;if(!a.i)throw new P(2,7,7001);if(a.Ca&&0==x.length)throw new P(2,4,4034);F=B=Infinity;G=r(a.h.values());for(H=G.next();!H.done;H=G.next())J=H.value,B=Math.min(B,J.qf),"text"!=J.stream.type&&(F=Math.min(F,J.Mg-J.qf));a.m!=er?(a.j=new R(0,
|
|
678
|
-
a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Z?a.Z:3*a.
|
|
678
|
+
a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Z?a.Z:3*a.va),a.j.Qc(!1)):(a.j=new R(null,0),a.j.Qc(!0));if(a.m!=er)a.ma=a.I,K=ir,a.m==K.Re&&(L=a.j.ud,isNaN(a.g.availabilityWindowOverride)||(L=a.g.availabilityWindowOverride),a.j.Ce(L));else for(a.j.cb(F),a.j.offset(-B),W=r(a.h.values()),H=W.next();!H.done;H=W.next())Z=H.value,Z.stream.segmentIndex.offset(-B),Z.stream.segmentIndex.yb(0,F);a.X=[];ka=[];ja=r(x);for(ea=ja.next();!ea.done;ea=ja.next())for(Ia=ea.value,Ma=r([Ia.video,Ia.audio]),
|
|
679
679
|
Da=Ma.next();!Da.done;Da=Ma.next())(Ra=Da.value)&&ka.push(Ra);return A(gb,Promise.all(ka.map(function(kg){return M(function(Sc){return A(Sc,kg.createSegmentIndex(),0)})})),6);case 6:cc=r(ka);for(Da=cc.next();!Da.done;Da=cc.next())Gd=Da.value,a.X.push(Gd.segmentIndex.O);tr(a);a.j.be();a.G={presentationTimeline:a.j,variants:x,textStreams:C,imageStreams:z,offlineSessionIds:[],minBufferTime:0};a.i.makeTextStreamsForClosedCaptions(a.G);D(gb)}})}
|
|
680
680
|
function mr(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Jq(e,"NAME");e=Jq(e,"VALUE");d&&e&&(a.A.has(d)||a.A.set(d,e))}}function jr(a,b){for(var c=new Map,d=r(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Jq(f,"NAME");var g=Jq(f,"VALUE");f=Jq(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.A.get(f))&&c.set(f,e)}return c}
|
|
681
681
|
function nr(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Jq(e,"AUDIO");d=Jq(e,"VIDEO");var g=Jq(e,"SUBTITLES");e=ur(a,e);if(g){var h=Kb(Mb,e);a.B.set(g,h);ic(e,h)}f&&(g=Kb("audio",e),g||(g=a.g.hls.defaultAudioCodec),a.B.set(f,g));d&&(f=Kb("video",e),f||(f=a.g.hls.defaultVideoCodec),a.B.set(d,f))}}
|
|
@@ -694,12 +694,12 @@ v="YES"==t;return A(y,Cr(a,f,d,e,g,l,h,m,null,p,v,n),2)}w=y.h;a.C.has(c)?a.C.get
|
|
|
694
694
|
function wr(a,b){var c,d,e,f,g,h,k,l,m,n;return M(function(p){if(1==p.g){c=Br(Kq(b,"URI"),a.A);d=Jq(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=Ar(b);f=Jq(b,"NAME");g=Jq(b,"CHARACTERISTICS");return A(p,Cr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=Jq(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
|
|
695
695
|
Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=Jq(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
|
|
696
696
|
function yr(a,b,c,d,e){var f,g,h,k;return M(function(l){if(1==l.g){f=Br(Kq(b,"URI"),a.A);if(a.h.has(f))return l["return"](a.h.get(f));var m=Jq(b,"CLOSED-CAPTIONS");g="video"==d&&m&&"NONE"!=m?a.K.get(m):null;h=Jb(d,c);return A(l,Cr(a,f,h,d,"und",!1,null,null,g,null,!1,!1,e),2)}k=l.h;if(null==k)return l["return"](null);if(a.h.has(f))return l["return"](a.h.get(f));a.h.set(f,k);return l["return"](k)})}
|
|
697
|
-
function Cr(a,b,c,d,e,f,g,h,k,l,m,n,p){var t,v,w,y,x,C,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia,Ma,Da,Ra,cc,Gd,gb,kg,Sc,aj,
|
|
697
|
+
function Cr(a,b,c,d,e,f,g,h,k,l,m,n,p){var t,v,w,y,x,C,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia,Ma,Da,Ra,cc,Gd,gb,kg,Sc,aj,up,vp,wp,xp,bj,cj,lg,yp,zp,Ap,Bp;return M(function(mb){switch(mb.g){case 1:return t=Hb([a.N],[b])[0],A(mb,fr(a,t),2);case 2:v=mb.h;t=v.uri;w=Wq(a.$,v.data,t);if(1!=w.type)throw new P(2,4,4017);y=[];if(w.segments)for(x=r(w.segments),C=x.next();!C.done;C=x.next())z=C.value,B=Nq(z.g,"EXT-X-KEY"),y.push.apply(y,ia(B));F=!1;G=[];H=new Set;J=r(y);for(K=J.next();!K.done;K=J.next())if(L=K.value,
|
|
698
698
|
W=Kq(L,"METHOD"),"NONE"!=W){F=!0;if("AES-128"==W)return a.Ca=!0,mb["return"](null);Z=Kq(L,"KEYFORMAT");if(ja=(ka=Dr[Z])?ka(L):null){if(ja.keyIds)for(ea=r(ja.keyIds),Ia=ea.next();!Ia.done;Ia=ea.next())Ma=Ia.value,H.add(Ma);G.push(ja)}}if(F&&!G.length)throw new P(2,4,4026);Da=Nq(w.g,"EXT-X-DEFINE");Ra=jr(a,Da);Er(a,w);return A(mb,Fr(a,d,c,w,Ra),3);case 3:return cc=mb.h,Gr.includes(cc)&&(c=""),Gd=new Map,gb=new Map,kg=a.l,E(mb,4),A(mb,kr(a,b,w,d,cc,Gd,Ra,gb,c,p),6);case 6:Sc=mb.h;va(mb,5);break;case 4:aj=
|
|
699
|
-
I(mb);if(4035==aj.code)return Sa("Skipping unsupported HLS stream",cc,b),mb["return"](null);throw aj;case 5:kg!=a.l&&Er(a,w);
|
|
700
|
-
kind:
|
|
701
|
-
function Er(a,b){var c=Pq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Pq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)lr(a,er);else{c?lr(a,Hr):lr(a,Ir);d=Pq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Pq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ba=Number(Kq(c,"PART-TARGET")),a.I=Math.min(a.ba,a.I),c=Pq(b.g,"EXT-X-SERVER-CONTROL"),a.Z=c?Number(Kq(c,"PART-HOLD-BACK")):0):a.I=Math.min(d,a.I);a.
|
|
702
|
-
function Jr(a,b,c,d){c=Pq(c,"EXT-X-MAP");if(!c)return null;var e=Kq(c,"URI");d=Br(Hb([b],[e])[0],d);b=[d,Jq(c,"BYTERANGE","")].join("-");a.
|
|
699
|
+
I(mb);if(4035==aj.code)return Sa("Skipping unsupported HLS stream",cc,b),mb["return"](null);throw aj;case 5:kg!=a.l&&Er(a,w);up=Sc[0].startTime;vp=Sc[Sc.length-1].endTime;wp=new mj(Sc);xp=d==Mb?"subtitle":void 0;bj=[];if(l)for(cj=r(l.split(",")),lg=cj.next();!lg.done;lg=cj.next())yp=lg.value,bj.push(yp);Ap=(zp=Pq(w.g,"EXT-X-SERVER-CONTROL"))?null!=zp.getAttribute("CAN-SKIP-UNTIL"):!1;Bp={id:a.wa++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:wp,mimeType:cc,codecs:c,
|
|
700
|
+
kind:xp,encrypted:F,drmInfos:G,keyIds:H,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:bj,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return mb["return"]({stream:Bp,zd:b,Mf:t,qf:up,Mg:vp,ee:Gd,Wf:gb,Rf:Ap})}})}
|
|
701
|
+
function Er(a,b){var c=Pq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Pq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)lr(a,er);else{c?lr(a,Hr):lr(a,Ir);d=Pq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Pq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ba=Number(Kq(c,"PART-TARGET")),a.I=Math.min(a.ba,a.I),c=Pq(b.g,"EXT-X-SERVER-CONTROL"),a.Z=c?Number(Kq(c,"PART-HOLD-BACK")):0):a.I=Math.min(d,a.I);a.va=Math.max(d,a.va)}}
|
|
702
|
+
function Jr(a,b,c,d){c=Pq(c,"EXT-X-MAP");if(!c)return null;var e=Kq(c,"URI");d=Br(Hb([b],[e])[0],d);b=[d,Jq(c,"BYTERANGE","")].join("-");a.aa.has(b)||(c=Kr(d,c),a.aa.set(b,c));return a.aa.get(b)}function Kr(a,b){var c=0,d=null,e=Jq(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new Li(function(){return[a]},c,d)}
|
|
703
703
|
function Lr(a,b,c,d,e,f,g,h,k){var l=d.g,m=Br(d.h,g),n=Pq(l,"EXTINF"),p=g=0,t=null;if(!n){if(0==d.i.length)throw new P(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var w={},y=0;y<d.i.length;w={Jd:w.Jd},y++){var x=d.i[y],C=0==y?c:v[v.length-1],z=0==y?e:C.endTime,B=Number(Jq(x,"DURATION"))||a.ba;if(B){B=z+B;var F=0,G=null;"EXT-X-PRELOAD-HINT"==x.name?F=(C=Jq(x,"BYTERANGE-START"))?Number(C):0:(F=Jq(x,"BYTERANGE"),C=r(Mr(C,F)),F=C.next().value,G=C.next().value);if(x=Jq(x,"URI"))w.Jd=Hb([h],
|
|
704
704
|
[x])[0],v.push(new Ni(z,B,function(H){return function(){return[H.Jd]}}(w),F,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=Pq(l,"EXT-X-BYTERANGE"))?(t=r(Mr(c,a.value)),p=t.next().value,t=t.next().value):v.length&&(p=v[0].Ha,t=v[v.length-1].ya);c="";a=null;"image"==k&&(c="1x1",k=Pq(l,"EXT-X-TILES"))&&(c=Kq(k,"LAYOUT"),(k=Jq(k,"DURATION"))&&(a=Number(k)));return new Ni(e,g,function(){return m.length?[m]:[]},p,t,b,f,0,Infinity,v,c,a)}
|
|
705
705
|
function Mr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.ya+1,d=c+d-1);return[c,d]}function tr(a){if(a.j){for(var b=r(a.X),c=b.next();!c.done;c=b.next())a.j.ic(c.value);a.X=[]}}
|
|
@@ -716,9 +716,10 @@ f.lc();var l=f.lc();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/
|
|
|
716
716
|
function Fr(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,w;return M(function(y){if(1==y.g){f=Nb;g=mf;h=Br(d.segments[0].h,e);k=new jb(h);l=k.Oa.split(".").pop();m=Tr[b];if(n=m[l])return y["return"](n);if(b==f.oa)return c&&"vtt"!=c&&"wvtt"!=c?y["return"]("application/mp4"):y["return"]("text/vtt");if(b==f.xc&&(!c||"jpeg"==c))return y["return"]("image/jpeg");p=ff([h],a.g.retryParameters);p.method="HEAD";return A(y,Qr(a,p,g),2)}t=y.h;v=t.headers["content-type"];return v?y["return"](v.split(";")[0]):(w=m.mp4,y["return"](w))})}
|
|
717
717
|
function fr(a,b){var c=ff([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return Qr(a,c,0)}function dr(a){var b,c;M(function(d){if(1==d.g){if(!a.i)return d["return"]();E(d,2);return A(d,a.update(),4)}if(2!=d.g)return b=a.ma,a.F.R(b),va(d,0);c=I(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.F.R(.1);D(d)})}function lr(a,b){a.m=b;a.j&&a.j.Qc(a.m==er);a.m!=er||a.F.stop()}
|
|
718
718
|
function Qr(a,b,c){if(!a.H)throw new P(2,7,7001);b=a.i.networkingEngine.request(c,b);af(a.H,b);return b.promise}N("shaka.hls.HlsParser",cr);
|
|
719
|
-
var Gr=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Tr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",
|
|
720
|
-
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"}},Dr={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Kq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Kq(a,"URI");b=br(b);b=Ic(b.data);b=Ib("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Jq(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);
|
|
721
|
-
Kq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Kq(a,"URI");a=br(a);a=Ic(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Ho(a,b);return Ib("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},er="VOD",Ir="EVENT",Hr="LIVE",ir={Lf:er,
|
|
719
|
+
var Gr=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Tr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",
|
|
720
|
+
m4f:"application/mp4",cmft:"application/mp4",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"}},Dr={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Kq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Kq(a,"URI");b=br(b);b=Ic(b.data);b=Ib("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Jq(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);
|
|
721
|
+
return b},"com.microsoft.playready":function(a){var b=Kq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Kq(a,"URI");a=br(a);a=Ic(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Ho(a,b);return Ib("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},er="VOD",Ir="EVENT",Hr="LIVE",ir={Lf:er,Fh:Ir,Re:Hr};Lg.m3u8=function(){return new cr};Jg["application/x-mpegurl"]=function(){return new cr};
|
|
722
|
+
Jg["application/vnd.apple.mpegurl"]=function(){return new cr};function Ur(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,uf:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=jd(b)}catch(g){}throw new P(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Vr(){}function Wr(a,b,c,d,e){var f=new Xr;xf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Yr,h={Ue:!1,Hf:!1};a=Zr(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.Ue=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Q(function(){h.Hf=!0;g.abort()});k.R(b/1E3);a["finally"](function(){k.stop()})}return a}
|
|
722
723
|
function Zr(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,w,y,x,C,z;return M(function(B){switch(B.g){case 1:return h=$r,k=as,p=n=0,t=Date.now(),E(B,2),A(B,h(a,c),4);case 4:return l=B.h,f(bs(l.headers)),v=l.clone().body.getReader(),y=(w=l.headers.get("Content-Length"))?parseInt(w,10):0,x=function(F){function G(){var H,J;return M(function(K){switch(K.g){case 1:return E(K,2),A(K,v.read(),4);case 4:H=K.h;va(K,3);break;case 2:return I(K),K["return"]();case 3:if(H.done){K.D(5);break}n+=H.value.byteLength;if(!g){K.D(5);
|
|
723
724
|
break}return A(K,g(H.value),5);case 5:J=Date.now();if(100<J-t||H.done)e(J-t,n-p,y-n),p=n,t=J;H.done?F.close():(F.enqueue(H.value),G());D(K)}})}G()},new k({start:x}),A(B,l.arrayBuffer(),5);case 5:m=B.h;va(B,3);break;case 2:C=I(B);if(d.Ue)throw new P(1,1,7001,a,b);if(d.Hf)throw new P(1,1,1003,a,b);throw new P(1,1,1002,a,C,b);case 3:return z=bs(l.headers),B["return"](Ur(z,m,l.status,a,l.url,b))}})}function bs(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
|
|
724
725
|
function cs(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}N("shaka.net.HttpFetchPlugin",Vr);Vr.isSupported=cs;Vr.parse=Wr;var $r=window.fetch,Yr=window.AbortController,as=window.ReadableStream,Xr=window.Headers;cs()&&(cf("http",Wr,2,!0),cf("https",Wr,2,!0),cf("blob",Wr,2,!0));function ds(){}
|
|
@@ -747,7 +748,7 @@ Rs.prototype.Ac=function(a){var b,c,d,e,f,g;return M(function(h){if(1==h.g){b=[]
|
|
|
747
748
|
a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g})})};
|
|
748
749
|
function Ss(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
|
|
749
750
|
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Ts(){xs.apply(this,arguments)}u(Ts,xs);q=Ts.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return Bs(this,a,b)};q.Ac=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Us(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Us.prototype;
|
|
750
|
-
q.init=function(){var a=this,b=new Pc,c=!1,d=new Q(function(){c=!0;b.reject(new P(2,9,9017))});d.R(
|
|
751
|
+
q.init=function(){var a=this,b=new Pc,c=!1,d=new Q(function(){c=!0;b.reject(new P(2,9,9017))});d.R(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new Ms(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Rs(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
751
752
|
new Rs(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Ts(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Cs(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=r(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new P(2,
|
|
752
753
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return M(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return A(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return A(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return A(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return A(b,a.j.destroy(),8);case 8:if(!a.m){b.D(10);break}return A(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),D(b)}})};
|
|
753
754
|
q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};q.getEmeSessionCell=function(){return this.m};
|
|
@@ -807,10 +808,10 @@ kn.offline=st;function Wt(){}function Xt(){for(var a=r(Yt),b=a.next();!b.done;b=
|
|
|
807
808
|
function gu(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
|
|
808
809
|
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",hu);document.addEventListener("webkitfullscreenerror",hu);document.addEventListener("mozfullscreenchange",hu);document.addEventListener("mozfullscreenerror",hu);document.addEventListener("MSFullscreenChange",hu);document.addEventListener("MSFullscreenError",hu)}}
|
|
809
810
|
function hu(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}Wt.Fullscreen=fu;fu.install=gu;Zt(gu);function iu(){}function ju(){}Wt.MathRound=iu;iu.install=ju;Zt(ju);function ku(){}function lu(){if($c()||ad()||bd()||Xc("PlayStation 5")||Zc()||Yc()||Xc("PC=EOS")||Xc("Hisense")||Xc("VIDAA")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),mu=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=nu}
|
|
810
|
-
function nu(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x;return M(function(C){switch(C.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return C["return"](b);c=a.video;d=a.audio;if("media-source"==a.type){if(!Tc())return C["return"](b);if(c){if($c())
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
811
|
+
function nu(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,x;return M(function(C){switch(C.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return C["return"](b);c=a.video;d=a.audio;if("media-source"==a.type){if(!Tc())return C["return"](b);if(c){if($c())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&&
|
|
812
|
+
(z+="; eotf=smpte2084");z=cast.__platform__.canDisplayType(z)}else z=MediaSource.isTypeSupported(c.contentType);else z=MediaSource.isTypeSupported(c.contentType);e=z;if(!e)return C["return"](b)}if(d&&(f=d.contentType,g=MediaSource.isTypeSupported(f),!g))return C["return"](b)}else if("file"==a.type){if(c&&(h=c.contentType,k=Uc(h),!k)||d&&(l=d.contentType,m=Uc(l),!m))return C["return"](b)}else return C["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,C["return"](Promise.resolve(b));n=
|
|
813
|
+
a.keySystemConfiguration;p=[];t=[];n.audio&&(v={robustness:n.audio.robustness||"",contentType:a.audio.contentType},p.push(v));n.video&&(w={robustness:n.video.robustness||"",contentType:a.video.contentType},t.push(w));y={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes};p.length&&(y.audioCapabilities=p);t.length&&(y.videoCapabilities=t);E(C,3);return A(C,navigator.requestMediaKeySystemAccess(n.keySystem,[y]),
|
|
814
|
+
5);case 5:x=C.h;va(C,4);break;case 3:I(C);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return C["return"](b)}})}Wt.MediaCapabilities=ku;ku.install=lu;var mu=null;ku.originalMcap=mu;Zt(lu,-1);function ou(){}function pu(){var a=cd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?qu():a?(ru(),12>=a?(su(),tu()):15>=a&&su()):navigator.userAgent.match(/Edge?\//)?ru():(Xc("Tizen 2")||Xc("Tizen 3")||Xc("Tizen 4"))&&uu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&vu()}
|
|
814
815
|
function su(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function tu(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function ru(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
|
|
815
816
|
function uu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Bd(b)[0]&&a(b)}}function qu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
|
|
816
817
|
function vu(){var a=MediaSource.isTypeSupported;Zc()||(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)})}Wt.MediaSource=ou;ou.install=pu;Zt(pu);function wu(){}function xu(){screen.orientation||void 0!=window.orientation&&yu()}function yu(){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 zu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new O("change");b.dispatchEvent(c)})}Wt.Orientation=wu;
|
|
@@ -881,20 +882,20 @@ vw.prototype.parseMedia=function(a,b){var c=gd(a);c=c.replace(/\r\n|\r(?=[^\n]|$
|
|
|
881
882
|
(l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");Sq(g);k=Uq(g)}f.push(h)}e=new Map;xw(e);g=[];d=r(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]){l=[];k=-1;for(m=1;m<h.length;m++)h[m].includes("::cue")&&(l.push([]),k=l.length-1),-1!=k&&(l[k].push(h[m]),h[m].includes("}")&&(k=-1));l=r(l);for(k=l.next();!k.done;k=l.next()){var n=k.value;k="global";(m=n[0].match(/\((.*)\)/))&&
|
|
882
883
|
(k=m.pop());m=n.slice(1,-1);n[0].includes("}")&&(n=/\{(.*?)\}/.exec(n[0]))&&(m=n[1].split(";"));(n=e.get(k))||(n=new lc(0,0,""));for(var p=!1,t=0;t<m.length;t++){var v=/^\s*([^:]+):\s*(.*)/.exec(m[t]);if(v){var w=v[2].trim().replace(";","");switch(v[1].trim()){case "background-color":case "background":p=!0;n.backgroundColor=w;break;case "color":p=!0;n.color=w;break;case "font-family":p=!0;n.fontFamily=w;break;case "font-size":p=!0;n.fontSize=w;break;case "font-weight":if(700<=parseInt(w,10)||"bold"==
|
|
883
884
|
w)p=!0,n.fontWeight=700;break;case "font-style":switch(w){case "normal":p=!0;n.fontStyle=vc;break;case "italic":p=!0;n.fontStyle="italic";break;case "oblique":p=!0,n.fontStyle="oblique"}break;case "opacity":p=!0;n.opacity=parseFloat(w);break;case "text-shadow":p=!0;n.textShadow=w;break;case "white-space":p=!0,n.wrapLine="noWrap"!=w}}}p&&e.set(k,n)}}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0]||"REGION"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));
|
|
884
|
-
k=new Rq(h[0]);m=ww(k);t=Tq(k,/[ \t]+--\x3e[ \t]+/g);n=ww(k);if(null==m||null==t||null==n)throw new P(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=
|
|
885
|
+
k=new Rq(h[0]);m=ww(k);t=Tq(k,/[ \t]+--\x3e[ \t]+/g);n=ww(k);if(null==m||null==t||null==n)throw new P(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=""):h=new lc(m,n,"");yw(p,h,e);Sq(k);for(m=Uq(k);m;)zw(h,m,f),Sq(k),m=Uq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};
|
|
885
886
|
function xw(a){for(var b=r(Object.entries(Ac)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new lc(0,0,"");e.color=d;a.set("."+c,e)}b=r(Object.entries(Bc));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new lc(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
886
|
-
function
|
|
887
|
+
function yw(a,b,c){0===c.size&&xw(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}a:{e=a;f=[];g=-1;d="";a=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",
|
|
887
888
|
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]?(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=r(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=
|
|
888
|
-
Sf("<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=a;return}a=r(e);for(e=a.next();!e.done;e=a.next())Bw(e.value,b,d,c);b.nestedCues=d}else b.payload=a}function Cw(a,b){return a&&0<a.length?a:b}
|
|
889
|
+
Sf("<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=Aw(a);return}a=r(e);for(e=a.next();!e.done;e=a.next())Bw(e.value,b,d,c);b.nestedCues=d}else b.payload=Aw(a)}function Cw(a,b){return a&&0<a.length?a:b}
|
|
889
890
|
function Bw(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(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=Cw(h.backgroundColor,e.backgroundColor),e.color=Cw(h.color,e.color),e.fontFamily=Cw(h.fontFamily,e.fontFamily),e.fontSize=Cw(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=
|
|
890
|
-
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")}}if(If(a))for(f=!0,d=r(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=r(a.childNodes),a=b.next();!a.done;a=b.next())Bw(a.value,e,c,d)}
|
|
891
|
-
function
|
|
891
|
+
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")}}if(If(a))for(f=!0,d=r(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=Aw(a),c.push(f)),f=!1;else for(b=r(a.childNodes),a=b.next();!a.done;a=b.next())Bw(a.value,e,c,d)}
|
|
892
|
+
function zw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=pc:a.textAlign=xc[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|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||"end"==
|
|
892
893
|
b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Dw(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=zc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=rc,a.line=Number(c[1]),c[2]&&(a.lineAlign=zc[c[2].toUpperCase()])}function Dw(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
|
|
893
|
-
function ww(a){a=Tq(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)}function
|
|
894
|
+
function ww(a){a=Tq(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)}function Aw(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||""}N("shaka.text.VttTextParser",vw);
|
|
894
895
|
vw.prototype.parseMedia=vw.prototype.parseMedia;vw.prototype.parseInit=vw.prototype.parseInit;Fd["text/vtt"]=function(){return new vw};Fd['text/vtt; codecs="vtt"']=function(){return new vw};Fd['text/vtt; codecs="wvtt"']=function(){return new vw};function Ew(){this.g=null}Ew.prototype.parseInit=function(a){var b=this,c=!1;(new Qg).box("moov",Ug).box("trak",Ug).box("mdia",Ug).V("mdhd",function(d){d=gi(d.reader,d.version);b.g=d.timescale}).box("minf",Ug).box("stbl",Ug).V("stsd",Wg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new P(2,2,2008);if(!c)throw new P(2,2,2008);};
|
|
895
896
|
Ew.prototype.parseMedia=function(a,b){if(!this.g)throw new P(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Qg).box("moof",Ug).box("traf",Ug).V("tfdt",function(B){g=!0;c=fi(B.reader,B.version).Ud}).V("tfhd",function(B){l=ei(B.reader,B.flags).$e}).V("trun",function(B){h=!0;d=hi(B.reader,B.version,B.flags).yf}).box("mdat",Xg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new P(2,2,2008);for(var m=c,n=new Ng(e,0),p=r(d),t=p.next();!t.done;t=p.next()){t=t.value;var v=t.re||l,w=t.wd?
|
|
896
897
|
c+t.wd:m;m=w+(v||0);var y=0;do{var x=n.P();y+=x;var C=n.P(),z=null;"vttc"==Yg(C)?8<x&&(z=n.Cb(x-8)):n.skip(x-8);v&&z&&(x=Fw(z,b.periodStart+w/this.g,b.periodStart+m/this.g),f.push(x))}while(t.sampleSize&&y<t.sampleSize)}return f.filter(Fb)};function Fw(a,b,c){var d,e,f;(new Qg).box("payl",Xg(function(g){d=gd(g)})).box("iden",Xg(function(g){e=gd(g)})).box("sttg",Xg(function(g){f=gd(g)})).parse(a);return d?Gw(d,e,f,b,c):null}
|
|
897
|
-
function Gw(a,b,c,d,e){d=new lc(d,e,"");
|
|
898
|
+
function Gw(a,b,c,d,e){d=new lc(d,e,"");yw(a,d,new Map);b&&(d.id=b);if(c)for(a=new Rq(c),b=Uq(a);b;)zw(d,b,[]),Sq(a),b=Uq(a);return d}N("shaka.text.Mp4VttParser",Ew);Ew.prototype.parseMedia=Ew.prototype.parseMedia;Ew.prototype.parseInit=Ew.prototype.parseInit;Fd['application/mp4; codecs="wvtt"']=function(){return new Ew};function Hw(){}Hw.prototype.parseInit=function(){};Hw.prototype.parseMedia=function(a){var b=gd(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Rq(c[0]),e=Iw(d),f=Tq(d,/,/g);d=Iw(d);if(null==e||null==f||null==d)throw new P(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new lc(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
898
899
|
function Iw(a){a=Tq(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)}N("shaka.text.SbvTextParser",Hw);Hw.prototype.parseMedia=Hw.prototype.parseMedia;Hw.prototype.parseInit=Hw.prototype.parseInit;Fd["text/x-subviewer"]=function(){return new Hw};function Jw(){this.g=new vw}Jw.prototype.parseInit=function(){};Jw.prototype.parseMedia=function(a,b){var c=gd(a);c=Kw(c);c=Ic(kd(c));return this.g.parseMedia(c,b)};function Kw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(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}N("shaka.text.SrtTextParser",Jw);Jw.srt2webvtt=Kw;Jw.prototype.parseMedia=Jw.prototype.parseMedia;
|
|
899
900
|
Jw.prototype.parseInit=Jw.prototype.parseInit;Fd["text/srt"]=function(){return new Jw};function Lw(){}Lw.prototype.parseInit=function(){};
|
|
900
901
|
Lw.prototype.parseMedia=function(a){var b="",c="";a=gd(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=Mw.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=r(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Nw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Ow);else if("Style"==e){e=f.split(Ow);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
|