shaka-player 4.8.13 → 4.8.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/locales.js +51 -41
- package/dist/shaka-player.compiled.debug.js +11 -10
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +910 -910
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.debug.js +22 -20
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +1112 -1112
- package/dist/shaka-player.ui.map +2 -2
- package/lib/media/time_ranges_utils.js +18 -10
- package/lib/net/http_fetch_plugin.js +2 -1
- package/lib/player.js +5 -1
- package/lib/text/mp4_ttml_parser.js +13 -0
- package/lib/text/ttml_text_parser.js +2 -2
- package/lib/util/manifest_parser_utils.js +1 -1
- package/package.json +1 -1
- package/ui/locales/pl.json +16 -7
|
@@ -53,10 +53,10 @@ ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ia(
|
|
|
53
53
|
Copyright 2016 Google LLC
|
|
54
54
|
SPDX-License-Identifier: Apache-2.0
|
|
55
55
|
*/
|
|
56
|
-
function Oa(){}function Pa(){};function Qa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Qa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Ra(a){return a.h/(1-Math.pow(a.g,a.i))};function Sa(){this.h=new Qa(2);this.j=new Qa(5);this.g=0;this.i=128E3;this.l=16E3}Sa.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)};Sa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Sa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Ra(this.h),Ra(this.j))};function Ta(){}function Ua(){}function
|
|
57
|
-
r.ib=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,y(a.g[c]));a=u(b);for(b=a.next();!b.done;b=a.next())b.value.Kb();this.g.g={}}};P("shaka.util.EventManager",
|
|
58
|
-
fb.prototype.Kb=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function gb(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return
|
|
59
|
-
function
|
|
56
|
+
function Oa(){}function Pa(){};function Qa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Qa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Ra(a){return a.h/(1-Math.pow(a.g,a.i))};function Sa(){this.h=new Qa(2);this.j=new Qa(5);this.g=0;this.i=128E3;this.l=16E3}Sa.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)};Sa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Sa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Ra(this.h),Ra(this.j))};function Ta(){}function Ua(){}function Va(){}function Xa(a){var b=Ha.apply(1,arguments);Ya.has(a)||(Ya.add(a),Va.apply(Ta,y(b)))}function Za(){}function ab(){}function bb(){}var Ya=new Set;window.console&&(Va=function(){return console.warn.apply(console,y(Ha.apply(0,arguments)))},Ua=function(){console.error.apply(console,y(Ha.apply(0,arguments)))});function cb(){this.g={}}r=cb.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};r.forEach=function(a){for(var b in this.g)a(b,this.g[b])};r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function db(){this.g=new cb}r=db.prototype;r.release=function(){this.ib();this.g=null};r.D=function(a,b,c,d){this.g&&(a=new fb(a,b,c,d),this.g.push(b,a))};r.na=function(a,b,c,d){function e(g){f.Kb(a,b,e);c(g)}var f=this;this.D(a,b,e,d)};r.Kb=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=u(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Kb(),this.g.remove(b,e))}};
|
|
57
|
+
r.ib=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,y(a.g[c]));a=u(b);for(b=a.next();!b.done;b=a.next())b.value.Kb();this.g.g={}}};P("shaka.util.EventManager",db);db.prototype.removeAll=db.prototype.ib;db.prototype.unlisten=db.prototype.Kb;db.prototype.listenOnce=db.prototype.na;db.prototype.listen=db.prototype.D;db.prototype.release=db.prototype.release;function fb(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=gb(a,d);this.target.addEventListener(b,c,this.g)}
|
|
58
|
+
fb.prototype.Kb=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function gb(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return hb(a)?b:b.capture||!1}
|
|
59
|
+
function hb(a){var b=jb;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}jb=b}return b||!1}var jb=void 0;function kb(a){if(lb.has(a))return lb.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);lb.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),lb.set(a,b),b):!1}function nb(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var lb=new Map;function ob(a,b){this.g=a;this.h=b}ob.prototype.toString=function(){return"v"+this.g+"."+this.h};function pb(a,b){var c=new ob(5,0),d=qb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function rb(a,b,c,d){Va([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function sb(a,b,c,d){Ua([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var qb=null;function tb(){}tb.prototype.extract=function(){};tb.prototype.decode=function(){return[]};tb.prototype.clear=function(){};tb.prototype.getStreams=function(){return[]};function ub(){}ub.prototype.init=function(){};ub.prototype.parse=function(){return[]};function wb(){}function xb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(yb(a)==yb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Ab(a);b=Ab(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function yb(a){return a instanceof ArrayBuffer?a:a.buffer}function Bb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
60
60
|
function Ab(a,b,c){c=void 0===c?Infinity:c;return Cb(a,void 0===b?0:b,c,Uint8Array)}function Db(a,b,c){c=void 0===c?Infinity:c;return Cb(a,void 0===b?0:b,c,Uint16Array)}function Eb(a,b,c){c=void 0===c?Infinity:c;return Cb(a,void 0===b?0:b,c,DataView)}function Cb(a,b,c,d){var e=yb(a),f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}
|
|
61
61
|
P("shaka.util.BufferUtils",wb);wb.toDataView=Eb;wb.toUint16=Db;wb.toUint8=Ab;wb.toArrayBuffer=Bb;wb.equal=xb;function Fb(){}Fb.prototype.init=function(){};Fb.prototype.i=function(){};Fb.prototype.g=function(){};Fb.prototype.j=function(){};P("shaka.media.IClosedCaptionParser",Fb);function Gb(a){this.l=new ub;if(a=Hb[a.toLowerCase()])this.l=a();this.h=new tb;if(a=Ib)this.h=a()}Gb.prototype.init=function(a,b){void 0!==b&&b||(this.g(),this.l.init(a))};Gb.prototype.i=function(a){a=this.l.parse(a);a=u(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=Ab(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()};
|
|
62
62
|
Gb.prototype.g=function(){this.h.clear()};Gb.prototype.j=function(){return this.h.getStreams()};P("shaka.media.ClosedCaptionParser",Gb);Gb.findDecoder=function(){return Ib};Gb.unregisterDecoder=function(){Ib=null};Gb.registerDecoder=function(a){Ib=a};Gb.findParser=function(a){return Hb[a]};Gb.unregisterParser=function(a){delete Hb[a]};Gb.registerParser=function(a,b){Hb[a]=b};var Hb={},Ib=null;function Jb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Kb(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Lb(a,b,c){c||(c=Jb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=u(a);for(var e=a.next();!e.done;d={oe:d.oe},e=a.next()){d.oe=e.value;e=b.findIndex(function(f){return function(g){return c(f.oe,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
|
|
@@ -98,9 +98,9 @@ function Xc(){if(!Rc("Chrome")||navigator.userAgent.match(/Edge\//))return null;
|
|
|
98
98
|
function cd(){if(!Zc())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function Rc(a){return(navigator.userAgent||"").includes(a)}function Pc(){if(dd)return dd;ed||(ed=new Mc(function(){dd=null}));(dd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(dd=document.createElement("video"));ed.U(1);return dd}
|
|
99
99
|
function fd(a){return a?a===window.shakaMediaKeysPolyfill:!!window.shakaMediaKeysPolyfill}
|
|
100
100
|
function gd(){var a,b,c,d,e,f,g,h,k,l,m,n,q,p;return L(function(t){switch(t.g){case 1:a={width:Infinity,height:Infinity};if(Yc()){m=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;a.width=1280;a.height=720;ra(t,15);if(!(n=m)){t.u(17);break}return C(t,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),18)}if(Sc()){a.width=1920;a.height=1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(b=webapis.systeminfo.getMaxVideoResolution(),
|
|
101
|
-
a.width=b.width,a.height=b.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,a.height=2160)}catch(w){
|
|
102
|
-
"com.microsoft.playready.recommendation");while(e===d.maybe)}catch(w){e=d.notSupported}e===d.probably?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);t.u(3);break}if(Vc()){try{f=JSON.parse(window.PalmSystem.deviceInfo),a.width=Math.max(1920,f.screenWidth),a.height=Math.max(1080,f.screenHeight)}catch(w){
|
|
103
|
-
(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);t.u(3);break}if(!$c()&&!ad()){t.u(3);break}g=!1;ra(t,9);return C(t,window.msdk.device.getDisplayInfo(),11);case 11:h=t.h;g="4K"===h.resolution;ta(t,10);break;case 9:return va(t),ra(t,12),C(t,window.msdk.device.getDisplayInfoImmediate(),14);case 14:k=t.h;g="4K"===k.resolution;ta(t,10);break;case 12:l=va(t),
|
|
101
|
+
a.width=b.width,a.height=b.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,a.height=2160)}catch(w){Va("Tizen: Error detecting screen size, default screen size 1920x1080.")}t.u(3);break}if(Qc()){c=new Windows.Media.Protection.ProtectionCapabilities;d=Windows.Media.Protection.ProtectionCapabilityResult;e=null;try{do e=c.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',
|
|
102
|
+
"com.microsoft.playready.recommendation");while(e===d.maybe)}catch(w){e=d.notSupported}e===d.probably?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);t.u(3);break}if(Vc()){try{f=JSON.parse(window.PalmSystem.deviceInfo),a.width=Math.max(1920,f.screenWidth),a.height=Math.max(1080,f.screenHeight)}catch(w){Va("WebOS: Error detecting screen size, default screen size 1920x1080."),a.width=1920,a.height=1080}t.u(3);break}if(bd()){window.Hisense_Get4KSupportState&&window.Hisense_Get4KSupportState()?
|
|
103
|
+
(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);t.u(3);break}if(!$c()&&!ad()){t.u(3);break}g=!1;ra(t,9);return C(t,window.msdk.device.getDisplayInfo(),11);case 11:h=t.h;g="4K"===h.resolution;ta(t,10);break;case 9:return va(t),ra(t,12),C(t,window.msdk.device.getDisplayInfoImmediate(),14);case 14:k=t.h;g="4K"===k.resolution;ta(t,10);break;case 12:l=va(t),Va("PlayStation: Failed to get the display info:",l);case 10:g?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);t.u(3);break;case 18:n=
|
|
104
104
|
t.h;case 17:if(n){a.width=3840;a.height=2160;t.u(19);break}if(!(q=m)){t.u(20);break}return C(t,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),21);case 21:q=t.h;case 20:q&&(a.width=1920,a.height=1080);case 19:ta(t,3);break;case 15:p=va(t),Ua("Failed to check canDisplayType:",p);case 3:return t.return(a)}})}var ed=null,dd=null;function hd(){}
|
|
105
105
|
function id(a){if(!a)return"";a=Ab(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!$c())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ua('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
|
|
106
106
|
(a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
|
|
@@ -113,7 +113,7 @@ function zd(a){var b=Ab(a);a="";b=u(b);for(var c=b.next();!c.done;c=b.next())c=c
|
|
|
113
113
|
function Cd(a,b,c){return{keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set}}
|
|
114
114
|
function Fd(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=ud(wd(h),!1));var l=g;22!=l.length&&(l=ud(wd(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:Ab(od(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
|
|
115
115
|
audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Gd(a,b){if(1==b.length)return b[0];a=Hd(a,b);if(null!=a)return a;throw new R(2,4,4025,b);}function Hd(a,b){for(var c=u(Id[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=u(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Jd?"":null}
|
|
116
|
-
function Kd(a,b){var c=[];a=u(Id[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=u(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Jd="text",Ld={fa:"video",S:"audio",ma:Jd,ve:"image",Hi:"application"},Id={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4
|
|
116
|
+
function Kd(a,b){var c=[];a=u(Id[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=u(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Jd="text",Ld={fa:"video",S:"audio",ma:Jd,ve:"image",Hi:"application"},Id={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Md(){}function Nd(a,b){var c=a;b&&!Od.includes(a)&&(c+='; codecs="'+b+'"');return c}function Pd(a,b){b&&(a+='; codecs="'+b+'"');return a}function Qd(a,b,c){var d=Nd(a,b);b=Pd(a,b);lc(b)?(a=lc(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
|
|
117
117
|
function Rd(a,b,c){var d=[b];Sd.forEach(function(e,f){var g=a[f];"codecs"==f?Od.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function Td(a){return a.split(";")[0].split("/")[1]}
|
|
118
118
|
function Ud(a){var b=Vd(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===
|
|
119
119
|
a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function Wd(a){var b=[];a=u(a.split(","));for(var c=a.next();!c.done;c=a.next())c=Vd(c.value),b.push(c[0]);return b.sort().join(",")}function Xd(a){return a.split(";")[0]}
|
|
@@ -171,7 +171,7 @@ function hf(a){var b=a.language;return{id:af(a),active:!1,type:"",bandwidth:0,la
|
|
|
171
171
|
originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:b}}function kf(a){return a.allowedByApplication&&a.allowedByKeySystem&&0==a.disabledUntilTime}function lf(a){return a.filter(function(b){return kf(b)})}
|
|
172
172
|
function mf(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=ye(re(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return re(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=nf(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(me,[]);return a.length?
|
|
173
173
|
nf(e,a[0]):e}function nf(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Ne(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}P("shaka.util.StreamUtils",Be);Be.meetsRestrictions=Fe;
|
|
174
|
-
var Se={},bf=0,Ve=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),We=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function of(){var a=this;this.s=null;this.o=!1;this.i=new Sa;this.F=new
|
|
174
|
+
var Se={},bf=0,Ve=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),We=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function of(){var a=this;this.s=null;this.o=!1;this.i=new Sa;this.F=new db;navigator.connection&&navigator.connection.addEventListener&&this.F.D(navigator.connection,"change",function(){if(a.o&&a.g.useNetworkInformation){a.i=new Sa;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.m=[];this.B=1;this.G=!1;this.h=this.l=this.g=this.A=null;this.C=new Mc(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();
|
|
175
175
|
b&&a.s(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.j=null}r=of.prototype;r.stop=function(){this.s=null;this.o=!1;this.m=[];this.B=1;this.l=this.A=null;this.h&&(this.h.disconnect(),this.h=null);this.C.stop();this.j=null};r.release=function(){this.F.release();this.C=null};r.init=function(a){this.s=a};
|
|
176
176
|
r.chooseVariant=function(a){a=void 0===a?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,b=window.screen.height*c,c*=window.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio;b=Math.min(b,this.l.clientHeight*d);c=Math.min(c,this.l.clientWidth*d)}var e=this.m.filter(function(l){return!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||(e=
|
|
177
177
|
this.m);d=e;a&&e.length!=this.m.length&&(d=this.m.filter(function(l){return l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1}));a=tf(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=b||Infinity!=c){a=uf(a);a=u(a);for(e=a.next();!e.done;e=a.next())if(e=e.value,e.height>=b&&e.width>=c){b=e.height;c=e.width;break}a=tf(this,this.g.restrictions,d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=tf(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=0;d<a.length;d++){e=
|
|
@@ -204,14 +204,14 @@ t&&t.U(D/1E3);a.l&&b==pg&&(v++,c.packetNumber=v,a.l(G,J,qg(d),c),m=!0,h.g=I)},fu
|
|
|
204
204
|
function(v){p&&p.stop();t&&t.stop();if(a.s){var B=null,A=0;v instanceof R&&(B=v,1001==v.code&&(A=v.data[1]));a.s(c,B,A,w)}if(a.i)return Vf();w&&(v=new R(1,1,1003,c.uris[f],b));if(v instanceof R){if(7001==v.code)throw v;if(1010==v.code)throw g;if(1==v.severity)return B=(new Map).set("error",v),B=new T("retry",B),a.dispatchEvent(B),f=(f+1)%c.uris.length,ng(a,b,c,d,e,f,v,h)}throw v;})}
|
|
205
205
|
function og(a,b,c,d){var e=Wf(void 0),f={};a=u(a.h);for(var g=a.next();!g.done;f={re:f.re},g=a.next())f.re=g.value,e=e.va(function(h){return function(){var k=c.response;k.data&&(k.data=Bb(k.data));return h.re(b,k,d)}}(f));return e.va(function(){return c},function(h){var k=2;if(h instanceof R){if(7001==h.code)throw h;k=h.severity}throw new R(k,1,1007,h);})}function qg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.md)return!1}return!0}P("shaka.net.NetworkingEngine",eg);
|
|
206
206
|
eg.prototype.request=eg.prototype.request;eg.prototype.destroy=eg.prototype.destroy;eg.makeRequest=jg;eg.defaultRetryParameters=function(){return Qf()};eg.prototype.clearAllResponseFilters=eg.prototype.dh;eg.prototype.unregisterResponseFilter=eg.prototype.Di;eg.prototype.registerResponseFilter=eg.prototype.gi;eg.prototype.clearAllRequestFilters=eg.prototype.bh;eg.prototype.unregisterRequestFilter=eg.prototype.Ci;eg.prototype.registerRequestFilter=eg.prototype.fi;eg.unregisterScheme=function(a){delete hg[a]};
|
|
207
|
-
eg.registerScheme=fg;eg.prototype.setForceHTTPS=eg.prototype.Ef;function kg(){this.g=0}eg.NumBytesRemainingClass=kg;function lg(a,b,c){Tf.call(this,a,b);this.h=c}na(lg,Tf);eg.PendingRequest=lg;var pg=1;eg.RequestType={MANIFEST:0,SEGMENT:pg,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};eg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var gg=3;eg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:gg};var hg={};function rg(a){this.g=!1;this.h=new Sf;this.i=a}rg.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function sg(a,b){if(a.g){if(b instanceof R&&7003==b.code)throw b;throw new R(2,7,7003,b);}};function tg(a,b){var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function
|
|
207
|
+
eg.registerScheme=fg;eg.prototype.setForceHTTPS=eg.prototype.Ef;function kg(){this.g=0}eg.NumBytesRemainingClass=kg;function lg(a,b,c){Tf.call(this,a,b);this.h=c}na(lg,Tf);eg.PendingRequest=lg;var pg=1;eg.RequestType={MANIFEST:0,SEGMENT:pg,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};eg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var gg=3;eg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:gg};var hg={};function rg(a){this.g=!1;this.h=new Sf;this.i=a}rg.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function sg(a,b){if(a.g){if(b instanceof R&&7003==b.code)throw b;throw new R(2,7,7003,b);}};function tg(a,b){var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function ug(a,b){a=u(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function wg(a){for(var b=new Map,c=u(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function xg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function yg(a,b){this.h=Eb(a);this.i=b==zg;this.g=0}r=yg.prototype;r.ka=function(){return this.g<this.h.byteLength};r.wa=function(){return this.g};r.getLength=function(){return this.h.byteLength};r.P=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Ag();}};r.ra=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Ag();}};r.M=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Ag();}};
|
|
208
208
|
r.tg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Ag();}};r.zc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Ag();}if(2097151<b)throw new R(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.sb=function(a){if(this.g+a>this.h.byteLength)throw Ag();var b=Ab(this.h,this.g,a);this.g+=a;return b};
|
|
209
209
|
r.skip=function(a){if(this.g+a>this.h.byteLength)throw Ag();this.g+=a};r.ni=function(a){if(this.g<a)throw Ag();this.g-=a};r.seek=function(a){if(0>a||a>this.h.byteLength)throw Ag();this.g=a};r.dc=function(){for(var a=this.g;this.ka()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Ab(this.h,a,this.g-a);this.g+=1;return id(a)};function Ag(){return new R(2,3,3E3)}P("shaka.util.DataViewReader",yg);yg.prototype.readTerminatedString=yg.prototype.dc;yg.prototype.seek=yg.prototype.seek;yg.prototype.rewind=yg.prototype.ni;
|
|
210
210
|
yg.prototype.skip=yg.prototype.skip;yg.prototype.readBytes=yg.prototype.sb;yg.prototype.readUint64=yg.prototype.zc;yg.prototype.readInt32=yg.prototype.tg;yg.prototype.readUint32=yg.prototype.M;yg.prototype.readUint16=yg.prototype.ra;yg.prototype.readUint8=yg.prototype.P;yg.prototype.getLength=yg.prototype.getLength;yg.prototype.getPosition=yg.prototype.wa;yg.prototype.hasMoreData=yg.prototype.ka;var zg=1;yg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:zg};function Bg(){this.i=[];this.h=[];this.g=!1}r=Bg.prototype;r.box=function(a,b){a=Cg(a);this.i[a]=Dg;this.h[a]=b;return this};r.O=function(a,b){a=Cg(a);this.i[a]=Eg;this.h[a]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new yg(a,0);for(this.g=!1;a.ka()&&!this.g;)this.xc(0,a,b,c)};
|
|
211
211
|
r.xc=function(a,b,c,d){var e=b.wa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.M(),g=b.M(),h=Fg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.wa()+8>b.getLength()){this.g=!0;return}f=b.zc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Eg){if(d&&b.wa()+4>b.getLength()){this.g=!0;return}n=b.M();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.wa(),b=0<d?b.sb(d):new Uint8Array(0),b=new yg(b,0),l({name:h,parser:this,
|
|
212
|
-
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.wa(),b.getLength()-b.wa()))}};function Gg(a){for(var b=Hg(a);a.reader.ka()&&!a.parser.g;)a.parser.xc(a.start+b,a.reader,a.partialOkay)}function
|
|
212
|
+
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.wa(),b.getLength()-b.wa()))}};function Gg(a){for(var b=Hg(a);a.reader.ka()&&!a.parser.g;)a.parser.xc(a.start+b,a.reader,a.partialOkay)}function Ig(a){for(var b=Hg(a),c=a.reader.M(),d=0;d<c&&(a.parser.xc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Lg(a){var b=Hg(a);for(a.reader.skip(78);a.reader.ka()&&!a.parser.g;)a.parser.xc(a.start+b,a.reader,a.partialOkay)}
|
|
213
213
|
function Mg(a){var b=Hg(a);a.reader.skip(8);var c=a.reader.ra();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.ka()&&!a.parser.g;)a.parser.xc(a.start+b,a.reader,a.partialOkay)}function Ng(a){return function(b){a(b.reader.sb(b.reader.getLength()-b.reader.wa()))}}function Cg(a){var b=0;a=u(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Fg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
|
|
214
|
-
function Hg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}P("shaka.util.Mp4Parser",Bg);Bg.headerSize=Hg;Bg.typeToString=Fg;Bg.allData=Ng;Bg.audioSampleEntry=Mg;Bg.visualSampleEntry=Lg;Bg.sampleDescription=
|
|
214
|
+
function Hg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}P("shaka.util.Mp4Parser",Bg);Bg.headerSize=Hg;Bg.typeToString=Fg;Bg.allData=Ng;Bg.audioSampleEntry=Mg;Bg.visualSampleEntry=Lg;Bg.sampleDescription=Ig;Bg.children=Gg;Bg.prototype.parseNext=Bg.prototype.xc;Bg.prototype.parse=Bg.prototype.parse;Bg.prototype.stop=Bg.prototype.stop;Bg.prototype.fullBox=Bg.prototype.O;Bg.prototype.box=Bg.prototype.box;var Dg=0,Eg=1;function Og(a){var b=this;this.g=[];this.h=[];this.data=[];(new Bg).box("moov",Gg).box("moof",Gg).O("pssh",function(c){if(!(1<c.version)){var d=Ab(c.reader.h,-12,c.size);b.data.push(d);b.g.push(zd(c.reader.sb(16)));if(0<c.version){d=c.reader.M();for(var e=0;e<d;e++){var f=zd(c.reader.sb(16));b.h.push(f)}}}}).parse(a)}
|
|
215
215
|
function Pg(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Eb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=u(c),c=b.next();!c.done;c=b.next())c=wd(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};/*
|
|
216
216
|
@license
|
|
217
217
|
tXml
|
|
@@ -228,7 +228,7 @@ function Zg(a){if(!Array.from(a.children).every(function(b){return"string"===typ
|
|
|
228
228
|
function dh(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(e=c(a));return null==e?d:e}function eh(a,b,c){b=Tg(b);return a.attributes[b+":"+c]||null}function ch(a,b,c){b=Tg(b);var d=[];if(a.children){a=u(a.children);for(var e=a.next();!e.done;e=a.next())(e=e.value)&&e.tagName===b+":"+c&&d.push(e)}return d}function fh(a,b,c){b=u(b);for(var d=b.next();!d.done;d=b.next())if(d=eh(a,d.value,c))return d;return null}
|
|
229
229
|
function gh(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}function hh(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}
|
|
230
230
|
function ih(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 jh(a){a=Number(a);return 0===a%1?a:null}function kh(a){a=Number(a);return 0===a%1&&0<a?a:null}function lh(a){a=Number(a);return 0===a%1&&0<=a?a:null}function mh(a){a=Number(a);return isNaN(a)?null:a}function nh(a){return a?"true"===a.toLowerCase():!1}
|
|
231
|
-
function oh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}function ph(a,b,c){b=void 0===b?!0:b;c=void 0===c?!0:c;var d=document.createElement(a.tagName),e;for(e in a.attributes)d.setAttribute(e,a.attributes[e]);b&&a.parent&&"?xml"!=a.parent.tagName&&ph(a.parent,!0,!1).appendChild(d);if(c)for(a=u(a.children),b=a.next();!b.done;b=a.next())b=b.value,c=void 0,"string"==typeof b?c=new Text(b):c=ph(b,!1,!0),d.appendChild(c);return d}var Ug=new Map([]);function qh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.ia=this.da=!1;this.I=0;this.g=null;this.B=new
|
|
231
|
+
function oh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}function ph(a,b,c){b=void 0===b?!0:b;c=void 0===c?!0:c;var d=document.createElement(a.tagName),e;for(e in a.attributes)d.setAttribute(e,a.attributes[e]);b&&a.parent&&"?xml"!=a.parent.tagName&&ph(a.parent,!0,!1).appendChild(d);if(c)for(a=u(a.children),b=a.next();!b.done;b=a.next())b=b.value,c=void 0,"string"==typeof b?c=new Text(b):c=ph(b,!1,!0),d.appendChild(c);return d}var Ug=new Map([]);function qh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.ia=this.da=!1;this.I=0;this.g=null;this.B=new db;this.i=new Map;this.A=new Map;this.l=new Sf;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.aa=new Map;this.ea=new Map;this.L=new Mc(function(){return rh(b)});this.T=!1;this.N=[];this.Y=!1;this.K=new Mc(function(){sh(b)});this.l.catch(function(){});this.j=new rg(function(){return th(b)});this.ba=!1;this.F=this.G=null}r=qh.prototype;r.destroy=function(){return this.j.destroy()};
|
|
232
232
|
function th(a){return L(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.l.reject(),a.K.stop(),a.K=null,a.L.stop(),a.L=null,C(b,uh(a),2);case 2:if(!a.m){b.u(3);break}ra(b,4);return C(b,a.m.setMediaKeys(null),6);case 6:ta(b,5);break;case 4:va(b);case 5:a.m=null;case 3:a.g=null,a.H.clear(),a.s=null,a.A=new Map,a.h=null,a.o=function(){},a.C=null,a.ba=!1,a.G=null,F(b)}})}r.configure=function(a){this.h=a;this.K&&this.K.Pa(this.h.updateExpirationTime)};
|
|
233
233
|
function vh(a,b,c){a.ia=!0;a.A=new Map;a.T=c;return wh(a,b)}function xh(a,b,c){a.A=new Map;c=u(c);for(var d=c.next();!d.done;d=c.next())a.A.set(d.value,{initData:null,initDataType:null});c=u(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.A.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.T=0<a.A.size;return wh(a,b)}
|
|
234
234
|
function yh(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 zh(a,g,[])}
|
|
@@ -267,7 +267,7 @@ function $h(a){var b;return L(function(c){if(1==c.g)return b=new Promise(functio
|
|
|
267
267
|
function uh(a){var b;return L(function(c){b=Array.from(a.i.entries());a.i.clear();return C(c,Promise.all(b.map(function(d){d=u(d);var e=d.next().value,f=d.next().value;return L(function(g){if(1==g.g)return ra(g,2),a.ia||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?C(g,$h(e),5):C(g,e.remove(),5);if(2!=g.g)return ta(g,0);va(g);F(g)})})),0)})}function bi(a,b){return a.length&&b.length&&a!==b?0<ci(a,b).length:!0}
|
|
268
268
|
function ci(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=u(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=u((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(y(d.keyIds),y(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
|
|
269
269
|
f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}}return c}
|
|
270
|
-
function Ch(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function sh(a){a.i.forEach(function(b,c){var d=b.lf,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.lf=e)})}function Nh(a){a=a.i.values();return
|
|
270
|
+
function Ch(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function sh(a){a.i.forEach(function(b,c){var d=b.lf,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.lf=e)})}function Nh(a){a=a.i.values();return ug(a,function(b){return b.loaded})}function Mh(a){for(var b=u(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.aa.get(c.value))return!1;return!0}
|
|
271
271
|
function Bh(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=u(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
|
|
272
272
|
function Th(a,b,c,d,e,f,g){var h=[],k={};a=u(a);for(var l=a.next();!l.done;k={la:k.la},l=a.next()){k.la=l.value;b.includes(k.la.encryptionScheme)||b.push(k.la.encryptionScheme);"org.w3.clearkey"==k.la.keySystem&&k.la.licenseServerUri.startsWith("data:application/json;base64,")?h.includes(k.la.licenseServerUri)||h.push(k.la.licenseServerUri):c.includes(k.la.licenseServerUri)||c.push(k.la.licenseServerUri);e.includes(k.la.serverCertificateUri)||e.push(k.la.serverCertificateUri);k.la.serverCertificate&&
|
|
273
273
|
(d.some(function(q){return function(p){return xb(p,q.la.serverCertificate)}}(k))||d.push(k.la.serverCertificate));if(k.la.initData){l={};for(var m=u(k.la.initData),n=m.next();!n.done;l={vd:l.vd},n=m.next())l.vd=n.value,f.some(function(q){return function(p){var t=q.vd;return p.keyId&&p.keyId==t.keyId?!0:p.initDataType==t.initDataType&&xb(p.initData,t.initData)}}(l))||f.push(l.vd)}if(k.la.keyIds)for(l=u(k.la.keyIds),m=l.next();!m.done;m=l.next())g.add(m.value)}if(1==h.length)c.push(h[0]);else if(0<
|
|
@@ -282,32 +282,32 @@ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertif
|
|
|
282
282
|
function ei(a,b,c){this.h=a;this.i=b;this.g=c}function fi(a,b){return L(function(c){if(1==c.g)return C(c,He(a.g,b,a.h.drm.preferredKeySystems),2);Ce(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);if(!b.variants.some(kf))throw new R(2,4,4032);return c.return(gi(a,b))})}
|
|
283
283
|
function gi(a,b){var c=Ge(b.variants,a.h.restrictions,a.i);if(b){var d=a.g?a.g.g:null;if(d&&a.g.s)for(var e=u(b.variants),f=e.next();!f.done;f=e.next())f=f.value,hi(a,d.keySystem,f.video),hi(a,d.keySystem,f.audio);ii(a,b)}return c}function hi(a,b,c){if(c){c=u(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=u(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Gh(a.g,e.initDataType,e.initData)}}}
|
|
284
284
|
function ii(a,b){a=a.g?a.g.Kd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=u(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=u(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=u(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?ji.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
285
|
-
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new R(2,4,4012,a);}var ji=["output-restricted","internal-error"];function ki(){}function li(a,b){if(b){var c=mi[b.toLowerCase()];if(c)return c}throw new R(2,4,4E3,a,b);}P("shaka.media.ManifestParser",ki);ki.unregisterParserByMime=function(a){delete mi[a]};ki.registerParserByMime=function(a,b){mi[a]=b};ki.registerParserByExtension=function(){pb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};ki.AccessibilityPurpose={Aj:"visually impaired",Vi:"hard of hearing"};var mi={};function ni(a){function b(){d=!0}function c(l){f.push(l);Gg(l)}a=Ab(a);var d=!1,e,f=[],g=[];(new Bg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).O("stsd",function(l){e=l;f.push(l);
|
|
285
|
+
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new R(2,4,4012,a);}var ji=["output-restricted","internal-error"];function ki(){}function li(a,b){if(b){var c=mi[b.toLowerCase()];if(c)return c}throw new R(2,4,4E3,a,b);}P("shaka.media.ManifestParser",ki);ki.unregisterParserByMime=function(a){delete mi[a]};ki.registerParserByMime=function(a,b){mi[a]=b};ki.registerParserByExtension=function(){pb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};ki.AccessibilityPurpose={Aj:"visually impaired",Vi:"hard of hearing"};var mi={};function ni(a){function b(){d=!0}function c(l){f.push(l);Gg(l)}a=Ab(a);var d=!1,e,f=[],g=[];(new Bg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).O("stsd",function(l){e=l;f.push(l);Ig(l)}).O("encv",b).O("enca",b).O("dvav",function(l){g.push({box:l,Za:1701733238})}).O("dva1",function(l){g.push({box:l,Za:1701733238})}).O("dvh1",function(l){g.push({box:l,Za:1701733238})}).O("dvhe",function(l){g.push({box:l,Za:1701733238})}).O("hev1",function(l){g.push({box:l,Za:1701733238})}).O("hvc1",
|
|
286
286
|
function(l){g.push({box:l,Za:1701733238})}).O("avc1",function(l){g.push({box:l,Za:1701733238})}).O("avc3",function(l){g.push({box:l,Za:1701733238})}).O("ac-3",function(l){g.push({box:l,Za:1701733217})}).O("ec-3",function(l){g.push({box:l,Za:1701733217})}).O("ac-4",function(l){g.push({box:l,Za:1701733217})}).O("mp4a",function(l){g.push({box:l,Za:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw bb(zd(a)),new R(2,3,3019);g.reverse();for(var h=u(g),k=h.next();!k.done;k=h.next())k=k.value,
|
|
287
287
|
a=oi(a,e,k.box,f,k.Za);return a}
|
|
288
288
|
function oi(a,b,c,d,e){var f=pi.value(),g=a.subarray(c.start,c.start+c.size),h=Eb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Eb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);qi(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Qc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=u(d);for(d=a.next();!d.done;d=a.next())d=d.value,qi(e,d.start,d.size+k.byteLength);k=Eb(e,b.start);b=Hg(b);a=k.getUint32(b);
|
|
289
289
|
k.setUint32(b,a+1);return e}function qi(a,b,c){a=Eb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var pi=new Jc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function ri(a,b,c,d,e,f,g){this.$=a;this.Aa=b;this.ja=c;this.gf=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}ri.prototype.Xb=function(){return this.Aa};ri.prototype.Ub=function(){return this.ja};ri.prototype.ed=function(){return this.g};function si(a,b){return a===b?!0:a&&b?a.Xb()==b.Xb()&&a.Ub()==b.Ub()&&Mb(a.$().sort(),b.$().sort())&&xb(a.ed(),b.ed()):a==b}P("shaka.media.InitSegmentReference",ri);
|
|
290
290
|
ri.prototype.getEndByte=ri.prototype.Ub;ri.prototype.getStartByte=ri.prototype.Xb;
|
|
291
|
-
function ti(a,b,c,d,e,f,g,h,k,l,m,n,q,p,t,w){l=void 0===l?[]:l;p=void 0===p?
|
|
291
|
+
function ti(a,b,c,d,e,f,g,h,k,l,m,n,q,p,t,w){l=void 0===l?[]:l;p=void 0===p?ui:p;this.startTime=a;this.i=this.endTime=b;this.C=c;this.Aa=d;this.ja=e;this.ca=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.A=void 0===n?null:n;this.h=void 0===q?null:q;this.status=p;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===t?null:t;this.s=null;this.j=0;this.o=void 0===w?!1:w;this.Wd=this.md=!1;a=u(this.g);for(b=a.next();!b.done;b=
|
|
292
292
|
a.next())b.value.pg();this.o&&this.g.length&&this.g[this.g.length-1].og();this.B=this.mimeType=this.codecs=null}r=ti.prototype;r.$=function(){return this.C()};r.getStartTime=function(){return this.startTime};r.nh=function(){return this.endTime};r.Xb=function(){return this.Aa};r.Ub=function(){return this.ja};r.Eh=function(){return this.tilesLayout};r.Dh=function(){return this.A};r.Yb=function(){return this.status};r.Wh=function(){this.status=yi};r.ff=function(){this.preload=!0};r.Qh=function(){return this.preload};
|
|
293
293
|
r.Zd=function(){this.l=!1};r.Nh=function(){return this.l};r.pg=function(){this.md=!0};r.Ph=function(){return this.md};r.og=function(){this.Wd=!0};r.Oh=function(){return this.Wd};r.ng=function(){this.m=!0};r.Kh=function(){return this.m};r.Gg=function(a){this.s=a};r.Ch=function(){return this.s};r.offset=function(a){this.startTime+=a;this.endTime+=a;this.i+=a;for(var b=u(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.i+=a};
|
|
294
294
|
r.Hf=function(a){null==this.h?Ua("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};r.zi=function(a){this.B=a};r.ed=function(){return this.B};function zi(a,b){a.ca=b;a=u(a.g);for(var c=a.next();!c.done;c=a.next())zi(c.value,b)}P("shaka.media.SegmentReference",ti);ti.prototype.getSegmentData=ti.prototype.ed;ti.prototype.setSegmentData=ti.prototype.zi;ti.prototype.syncAgainst=ti.prototype.Hf;ti.prototype.offset=ti.prototype.offset;
|
|
295
295
|
ti.prototype.getThumbnailSprite=ti.prototype.Ch;ti.prototype.setThumbnailSprite=ti.prototype.Gg;ti.prototype.hasByterangeOptimization=ti.prototype.Kh;ti.prototype.markAsByterangeOptimization=ti.prototype.ng;ti.prototype.isLastPartial=ti.prototype.Oh;ti.prototype.markAsLastPartial=ti.prototype.og;ti.prototype.isPartial=ti.prototype.Ph;ti.prototype.markAsPartial=ti.prototype.pg;ti.prototype.isIndependent=ti.prototype.Nh;ti.prototype.markAsNonIndependent=ti.prototype.Zd;ti.prototype.isPreload=ti.prototype.Qh;
|
|
296
|
-
ti.prototype.markAsPreload=ti.prototype.ff;ti.prototype.markAsUnavailable=ti.prototype.Wh;ti.prototype.getStatus=ti.prototype.Yb;ti.prototype.getTileDuration=ti.prototype.Dh;ti.prototype.getTilesLayout=ti.prototype.Eh;ti.prototype.getEndByte=ti.prototype.Ub;ti.prototype.getStartByte=ti.prototype.Xb;ti.prototype.getEndTime=ti.prototype.nh;ti.prototype.getStartTime=ti.prototype.getStartTime;ti.prototype.getUris=ti.prototype.$;var
|
|
297
|
-
function
|
|
296
|
+
ti.prototype.markAsPreload=ti.prototype.ff;ti.prototype.markAsUnavailable=ti.prototype.Wh;ti.prototype.getStatus=ti.prototype.Yb;ti.prototype.getTileDuration=ti.prototype.Dh;ti.prototype.getTilesLayout=ti.prototype.Eh;ti.prototype.getEndByte=ti.prototype.Ub;ti.prototype.getStartByte=ti.prototype.Xb;ti.prototype.getEndTime=ti.prototype.nh;ti.prototype.getStartTime=ti.prototype.getStartTime;ti.prototype.getUris=ti.prototype.$;var ui=0,yi=1;ti.Status={Ii:ui,yj:yi,aj:2};function Ai(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function Bi(a){return!a||Ai(a)?null:a.length?a.end(a.length-1):null}function Ci(a,b){return!a||!a.length||Ai(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Di(a,b){if(!a||!a.length||Ai(a))return 0;var c=0;a=u(Ei(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
|
|
297
|
+
function Fi(a,b,c){if(!a||!a.length||Ai(a))return null;a=Ei(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Ei(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};/*
|
|
298
298
|
@license
|
|
299
299
|
Shaka Player
|
|
300
300
|
Copyright 2022 Google LLC
|
|
301
301
|
SPDX-License-Identifier: Apache-2.0
|
|
302
302
|
*/
|
|
303
|
-
function
|
|
304
|
-
function
|
|
303
|
+
function Gi(){}function Hi(a,b){return b+10<=a.length&&73===a[b]&&68===a[b+1]&&51===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Ii(a,b){return b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Ji(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127}
|
|
304
|
+
function Ki(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=id(Ab(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=id(Ab(a.data,3+c,f)),h;"--\x3e"===d?h=id(Ab(a.data,4+c+f)):h=Bb(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;
|
|
305
305
|
d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=id(Ab(a.data,1,d));a=id(Ab(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=id(Ab(a.data,1,d));a=id(Ab(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=id(Ab(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
|
|
306
306
|
c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Bb(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=id(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=id(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Bb(a.data),b):null}
|
|
307
|
-
function
|
|
308
|
-
|
|
309
|
-
function
|
|
310
|
-
function
|
|
307
|
+
function Li(a){for(var b=0,c=[];Hi(a,b);){var d=Ji(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Ji(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Ki(e))&&c.push(f);b+=e.size+10}Ii(a,b)&&(b+=10)}return c}function Mi(a,b){for(var c=b=void 0===b?0:b,d=0;Hi(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Ji(a,b+6),Ii(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}P("shaka.util.Id3Utils",Gi);Gi.getID3Data=Mi;
|
|
308
|
+
Gi.getID3Frames=Li;function Ni(a,b){var c=null,d=null,e=null,f=a.M();b&1&&(e=a.zc());b&2&&a.skip(4);b&8&&(c=a.M());b&16&&(d=a.M());return{trackId:f,Yf:c,hh:d,Cj:e}}function Oi(a,b){return 1==b?(b=a.M(),a=a.M(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.M()}}function Pi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.M();a.skip(4);a=a.ra();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
309
|
+
function Qi(a,b,c){var d=a.M(),e=[],f=null;c&1&&(f=a.M());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={yf:null,sampleSize:null,ie:null};c&256&&(h.yf=a.M());c&512&&(h.sampleSize=a.M());c&1024&&a.skip(4);c&2048&&(h.ie=0==b?a.M():a.tg());e.push(h)}return{Gj:d,xg:e,gh:f}}
|
|
310
|
+
function Ri(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.M();1==b?a.skip(8):a.skip(4);a.skip(4);a.skip(8);a.skip(2);a.skip(2);a.skip(2);a.skip(2);a.skip(36);b=a.ra()+a.ra()/16;a=a.ra()+a.ra()/16;return{trackId:c,width:b,height:a}}function Si(a){a=a.M();return{Ea:Fg(a)}}function Ti(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function Ui(a){return(10>a?"0":"")+a};/*
|
|
311
311
|
|
|
312
312
|
Copyright Brightcove, Inc.
|
|
313
313
|
|
|
@@ -323,338 +323,338 @@ function Qi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.M();1=
|
|
|
323
323
|
See the License for the specific language governing permissions and
|
|
324
324
|
limitations under the License.
|
|
325
325
|
*/
|
|
326
|
-
function
|
|
327
|
-
function
|
|
328
|
-
function
|
|
329
|
-
r.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,
|
|
326
|
+
function Vi(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=Ab(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function Wi(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new yg(c,0)).M(),a.g=8*d,a.i-=d)}function Xi(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;Wi(a)}a.h<<=b;a.g-=b}
|
|
327
|
+
function Yi(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&Wi(a);c=b-c;return 0<c?d<<c|Yi(a,c):d}function Zi(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;Wi(a);return b+Zi(a)}function $i(a){Xi(a,1+Zi(a))}function U(a){var b=Zi(a);return Yi(a,b+1)-1}function aj(a){a=U(a);return 1&a?1+a>>>1:-1*(a>>>1)}function W(a){return 1===Yi(a,1)}function bj(a){return Yi(a,8)}
|
|
328
|
+
function cj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=aj(a),d=(c+d+256)%256),c=0===d?c:d}function dj(a){bj(a);U(a);return U(a)}P("shaka.util.ExpGolomb",Vi);function ej(){this.G=null;this.H=!1;this.m=this.I=null;this.j=[];this.g=[];this.A=this.B=null;this.i=[];this.h=[];this.C=null;this.l=[];this.F=this.o=this.s=null}r=ej.prototype;r.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
|
|
329
|
+
r.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,lj(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.G=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.G:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Sd:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
|
|
330
330
|
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0<m)for(var n=h+5,q=m;2<q;){var p=f[n+1]+2;switch(f[n]){case 5:var t=md(f.subarray(n+2,n+p));-1==g.audio&&"Opus"===t?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===t&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(t=
|
|
331
331
|
null,128===f[n+2]&&(t=f[n+3]),null!=t&&(this.F={channelCount:0===(t&15)?2:t&15,ah:t,sampleRate:48E3}))}n+=p;q-=p}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.Sd&&(g.Sd=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");
|
|
332
332
|
break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.I=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.B=f.audio,this.A=f.audioCodec);-1!=f.Sd&&(this.C=f.Sd);d&&!this.H&&(d=!1,e=b-188);this.H=!0;break;case this.I:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.B:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);
|
|
333
333
|
break;case this.C:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
|
|
334
|
-
function
|
|
334
|
+
function mj(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.s&&(a.s=e);c.pts=nj(e,a.s);a.s=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.o&&(a.o=d),c.dts=nj(d,
|
|
335
335
|
a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}r.bi=function(a){pb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.qf(a)};
|
|
336
336
|
r.qf=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var q=a[n];if(q){if(2<=g&&1==q){b&&!h.length&&-1==k&&(q=n-(3<g?3:g),c&&0!=q&&(q=a.subarray(0,q),b.data=Ad(b.data,q),b.fullData=Ad(b.fullData,q)));0<=k?(g=n-((3<g?3:g)+1),h.push({data:a.subarray(k+f,g+1),fullData:a.subarray(k,g+1),type:l,time:d})):b&&!h.length&&(k=n-g,0<k&&(k=a.subarray(0,k),b.data=Ad(b.data,k),b.fullData=Ad(b.fullData,k)));if(n>=e-f)return h;
|
|
337
|
-
n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=Ad(b.data,a),b.fullData=Ad(b.fullData,a));return h};r.getMetadata=function(){for(var a=[],b=u(this.l),c=b.next();!c.done;c=b.next())c=Ad.apply(sd,y(c.value)),(c=
|
|
338
|
-
r.Gb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=u(this.i),c=b.next();!c.done;c=b.next()){var d=Ad.apply(sd,y(c.value)),e=
|
|
339
|
-
r.uc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=u(this.j),d=c.next();!d.done;d=c.next()){var e=Ad.apply(sd,y(d.value)),f=
|
|
337
|
+
n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=Ad(b.data,a),b.fullData=Ad(b.fullData,a));return h};r.getMetadata=function(){for(var a=[],b=u(this.l),c=b.next();!c.done;c=b.next())c=Ad.apply(sd,y(c.value)),(c=mj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Li(c.data),dts:c.dts,pts:c.pts});return a};
|
|
338
|
+
r.Gb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=u(this.i),c=b.next();!c.done;c=b.next()){var d=Ad.apply(sd,y(c.value)),e=mj(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=Ad(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
|
|
339
|
+
r.uc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=u(this.j),d=c.next();!d.done;d=c.next()){var e=Ad.apply(sd,y(d.value)),f=mj(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=Ad(d.data,e),this.g.push(d))}if(a){var g;c=u(this.g);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.qf(d,
|
|
340
340
|
g,void 0),d.nalus.length&&(g=d.nalus[d.nalus.length-1]);this.g=this.g.filter(function(h){return h.nalus.length})}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};r.getStartTime=function(a){if("audio"==a){a=null;var b=this.Gb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.uc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};
|
|
341
|
-
r.bd=function(){return{audio:this.A,video:this.m}};r.Od=function(){for(var a=[],b=u(this.uc()),c=b.next();!c.done;c=b.next())a.push.apply(a,y(c.value.nalus));return a};r.Hh=function(){pb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Xe();return{height:a.height,width:a.width}};r.Xe=function(){return"hvc"==this.m?
|
|
342
|
-
function
|
|
341
|
+
r.bd=function(){return{audio:this.A,video:this.m}};r.Od=function(){for(var a=[],b=u(this.uc()),c=b.next();!c.done;c=b.next())a.push.apply(a,y(c.value.nalus));return a};r.Hh=function(){pb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Xe();return{height:a.height,width:a.width}};r.Xe=function(){return"hvc"==this.m?oj(this):pj(this)};
|
|
342
|
+
function pj(a){var b={height:null,width:null,Ea:null};a=a.Od();if(!a.length)return b;a=a.find(function(q){return 7==q.type});if(!a)return b;a=new Vi(a.data);var c=bj(a),d=bj(a),e=bj(a);$i(a);if(qj.includes(c)){var f=U(a);3===f&&Xi(a,1);$i(a);$i(a);Xi(a,1);if(W(a)){f=3!==f?8:12;for(var g=0;g<f;g++)W(a)&&(6>g?cj(a,16):cj(a,64))}}$i(a);f=U(a);if(0===f)U(a);else if(1===f)for(Xi(a,1),$i(a),$i(a),f=U(a),g=0;g<f;g++)$i(a);$i(a);Xi(a,1);f=U(a);g=U(a);var h=Yi(a,1);0===h&&Xi(a,1);Xi(a,1);var k=0,l=0,m=0,n=
|
|
343
343
|
0;W(a)&&(k=U(a),l=U(a),m=U(a),n=U(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.Ea="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
|
|
344
|
-
function
|
|
344
|
+
function oj(a){var b={height:null,width:null,Ea:null};a=a.Od();if(!a.length)return b;a=a.find(function(A){return 33==A.type});if(!a)return b;var c=new Vi(a.fullData,!0);bj(c);bj(c);Yi(c,4);var d=Yi(c,3);W(c);var e=Yi(c,2),f=Yi(c,1),g=Yi(c,5),h=Yi(c,32);a=bj(c);for(var k=bj(c),l=bj(c),m=bj(c),n=bj(c),q=bj(c),p=bj(c),t=[],w=[],x=0;x<d;x++)t.push(W(c)),w.push(W(c));if(0<d)for(x=d;8>x;x++)Yi(c,2);for(x=0;x<d;x++)t[x]&&Yi(c,88),w[x]&&bj(c);U(c);d=U(c);3==d&&Yi(c,1);t=U(c);w=U(c);var z=x=0,v=0,B=0;W(c)&&
|
|
345
345
|
(x+=U(c),z+=U(c),v+=U(c),B+=U(c));b.width=String(t-(x+z)*(1===d||2===d?2:1));b.height=String(w-(v+B)*(1===d?2:1));c=function(A){for(var D=0,G=0;32>G;G++)D|=(A>>G&1)<<31-G;return D>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+p;q&&(e+="."+q.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());a&&(e+="."+
|
|
346
|
-
a.toString(16).toUpperCase());b.Ea=e;return b}function
|
|
347
|
-
|
|
348
|
-
a=!1):(this.h.SupportObject.SupportStatus||
|
|
349
|
-
|
|
350
|
-
function
|
|
351
|
-
function
|
|
352
|
-
Rd(a,h,k),q=Pd(h,k),!kb(n)&&!lc(q))return p.return(!1);return p.return(!0)})}r=
|
|
353
|
-
function
|
|
354
|
-
a.j={};a.T=null;a.K=null;F(l)})}r.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return f=Ld,C(m,e.L,2);case 2:e.B=b,e.aa=c,e.sa=d,e.pa=!e.B&&"HLS"==e.aa&&!e.sa,e.K=null,g=u(a.keys()),h=g.next();case 3:if(h.done){m.u(0);break}k=h.value;l=a.get(k);return C(m,
|
|
355
|
-
function
|
|
356
|
-
|
|
346
|
+
a.toString(16).toUpperCase());b.Ea=e;return b}function nj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function rj(a){return 0>lj(a)?!1:!0}function lj(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}P("shaka.util.TsParser",ej);ej.syncOffset=lj;ej.probe=rj;ej.prototype.getVideoInfo=ej.prototype.Xe;ej.prototype.getVideoResolution=ej.prototype.Hh;ej.prototype.getVideoNalus=ej.prototype.Od;
|
|
347
|
+
ej.prototype.getCodecs=ej.prototype.bd;ej.prototype.getStartTime=ej.prototype.getStartTime;ej.prototype.getVideoData=ej.prototype.uc;ej.prototype.getAudioData=ej.prototype.Gb;ej.prototype.getMetadata=ej.prototype.getMetadata;ej.prototype.parseNalus=ej.prototype.qf;ej.prototype.parseAvcNalus=ej.prototype.bi;ej.prototype.parse=ej.prototype.parse;ej.prototype.clearData=ej.prototype.clearData;ej.Timescale=9E4;var qj=[100,110,122,244,44,83,86,118,128,138,139,134];function sj(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Va("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,pb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Va("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Va("Could not find LCEVC Library on this page"),
|
|
348
|
+
a=!1):(this.h.SupportObject.SupportStatus||Va(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function tj(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
349
|
+
sj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function uj(a,b,c){var d=vj,e=wj;switch(b.mimeType){case "video/webm":d=xj;break;case "video/mp4":d=yj}switch(c){case "DASH":e=zj;break;case "HLS":e=Aj}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}P("shaka.lcevc.Dec",sj);sj.prototype.release=sj.prototype.release;var vj=0,xj=1,yj=2,Aj=0,zj=1,wj=-1;function Bj(a,b,c,d){var e=this;this.i=a;this.A=null;this.F=b;this.h={};this.G={};this.qa={};this.g=null;this.ba=!1;this.ta=c||function(){};this.T=d||null;this.j={};this.o=new db;this.m={};this.H=null;this.L=new Sf;this.N="";this.da=!1;this.l=Cj(this,this.L);this.C=!1;this.I=new rg(function(){return Dj(e)});this.B=!1;this.aa="UNKNOWN";this.pa=this.sa=!1;this.ia=new Sf;this.s=!1;this.ea=!0;this.K=this.Y=null}
|
|
350
|
+
function Cj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.o.D(c,"startstreaming",function(){a.ea=!0});a.o.D(c,"endstreaming",function(){a.ea=!1});a.o.na(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.o.na(a.i,"playing",function(){a.da=!0});a.N=Ej(c);a.i.src=a.N;return c}c=new MediaSource;a.o.na(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.o.na(a.i,"playing",function(){a.da=!0});a.N=Ej(c);a.i.src=a.N;return c}
|
|
351
|
+
function Fj(a,b){var c,d,e,f,g,h,k,l,m,n,q;return L(function(p){if(1==p.g)return a.createSegmentIndex?C(p,a.createSegmentIndex(),2):p.u(2);if(!a.segmentIndex)return p.return(!1);if(0==a.segmentIndex.getNumReferences())return p.return(!0);c=Ld;d=new Set;e=u(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",l=h+":"+k,!d.has(l))if(d.add(l),b==c.ma){if(m=Nd(h,k),!ee(m))return p.return(!1)}else if(b==c.fa?k=Oe(k):b==c.S&&(k=Pe(k,h)),n=
|
|
352
|
+
Rd(a,h,k),q=Pd(h,k),!kb(n)&&!lc(q))return p.return(!1);return p.return(!0)})}r=Bj.prototype;r.destroy=function(){return this.I.destroy()};
|
|
353
|
+
function Dj(a){var b,c,d,e,f,g,h,k;return L(function(l){if(1==l.g){b=[];for(c in a.j)for(d=a.j[c],e=d[0],a.j[c]=d.slice(0,1),e&&b.push(e.p.catch(ne)),f=u(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new R(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.F&&b.push(a.F.destroy());for(k in a.m)b.push(a.m[k].destroy());return C(l,Promise.all(b),2)}a.o&&(a.o.release(),a.o=null);a.i&&(a.i.removeAttribute("src"),a.i.load(),a.i=null);a.A=null;a.l=null;a.g=null;a.F=null;a.h={};a.m={};a.H=null;
|
|
354
|
+
a.j={};a.T=null;a.K=null;F(l)})}r.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return f=Ld,C(m,e.L,2);case 2:e.B=b,e.aa=c,e.sa=d,e.pa=!e.B&&"HLS"==e.aa&&!e.sa,e.K=null,g=u(a.keys()),h=g.next();case 3:if(h.done){m.u(0);break}k=h.value;l=a.get(k);return C(m,Gj(e,k,l,l.codecs),6);case 6:e.s?(e.j[f.S]=[],e.j[f.fa]=[]):e.j[k]=[],h=g.next(),m.u(3)}})};
|
|
355
|
+
function Gj(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,t,w;return L(function(x){switch(x.g){case 1:return e=Ld,f=Oa,g=Pa,C(x,Fj(c,b),2);case 2:g.call(f,x.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Nd(c.mimeType,d);if(b==e.ma){Hj(a,h,a.B,c.external);x.u(0);break}k=a.A.forceTransmux;if(!kb(h)||!a.B&&Od.includes(h))k=!0;l=Pd(c.mimeType,d);if(!k){x.u(4);break}m=Hd(e.S,(d||"").split(","));n=Hd(e.fa,(d||"").split(","));if(!m||!n){x.u(5);break}a.s=!0;return C(x,Gj(a,e.S,c,m),6);case 6:return C(x,
|
|
356
|
+
Gj(a,e.fa,c,n),7);case 7:return x.return();case 5:if(q=lc(l))p=q(),a.m[b]=p,h=p.convertCodecs(b,l);case 4:t=h+a.A.addExtraFeaturesToSourceBuffer(h);sg(a.I);try{w=a.l.addSourceBuffer(t)}catch(z){throw new R(2,3,3015,z,"The mediaSource_ status was "+a.l.readyState+" expected 'open'");}a.B&&(w.mode=Ij);a.o.D(w,"error",function(){a.j[b][0].p.reject(new R(2,3,3014,a.i.error?a.i.error.code:0))});a.o.D(w,"updateend",function(){return Jj(a,b)});a.h[b]=w;a.G[b]=h;a.qa[b]=!!c.drmInfos.length;F(x)}})}
|
|
357
357
|
r.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
|
|
358
|
-
function
|
|
359
|
-
function
|
|
360
|
-
r.ob=function(){var a={total:this.C?[]:
|
|
361
|
-
function
|
|
362
|
-
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!
|
|
363
|
-
function
|
|
364
|
-
case 6:if(!a.h[b])return D.return();q=a.h[b].timestampOffset;p=a.G[b];a.m[b]&&(p=a.m[b].getOriginalMimeType());d&&(t=
|
|
365
|
-
h));if(!a.m[b]){D.u(9);break}return C(D,a.m[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=D.h;case 9:return c=
|
|
366
|
-
r.remove=function(a,b,c){var d=this,e;return L(function(f){return 1==f.g?(e=Ld,a==e.ma?C(f,d.g.remove(b,c),0):C(f,
|
|
367
|
-
r.flush=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=Ld,a==c.ma?d.return():C(d,
|
|
368
|
-
function
|
|
369
|
-
l.S,function(){var p=l.S;a.h[p].appendWindowStart=0;a.h[p].appendWindowEnd=e;a.h[p].appendWindowStart=d;
|
|
370
|
-
r.endOfStream=function(a){var b=this;return L(function(c){return C(c,
|
|
371
|
-
function
|
|
372
|
-
function
|
|
373
|
-
}})}function
|
|
374
|
-
function
|
|
375
|
-
function
|
|
376
|
-
Promise.all(g),4);case 4:return a.m={},a.h={},x=a.l.duration,a.L=new Sf,a.l=
|
|
377
|
-
break;case 2:xa(H),a.C=!1,sg(a.I),a.o.na(a.i,"canplaythrough",function(){a.I.g||(a.i.autoplay=e,f||a.i.play())}),ya(H,0)}})}function
|
|
378
|
-
function
|
|
379
|
-
a.A.codecSwitchingStrategy&&nb())return C(A,
|
|
358
|
+
function Hj(a,b,c,d){a.g||(a.g=new de(a.F),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.ba;a=a.aa;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,fe[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):pb("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):pb("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.B=d)}
|
|
359
|
+
function Kj(a){return a.C?!1:a.l?"ended"==a.l.readyState:!0}function Lj(a,b){a.C||!Object.keys(a.h).length?a=null:b==Jd?a=a.g.g:(a=Mj(a,b),a=!a||Ai(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null);return a}function Nj(a,b){return a.C?null:b==Jd?a.g.h:Bi(Mj(a,b))}function Oj(a,b,c){if(a.C)return 0;if(b==Jd)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Mj(a,b);return Di(a,c)}
|
|
360
|
+
r.ob=function(){var a={total:this.C?[]:Ei(this.i.buffered),audio:this.C?[]:Ei(Mj(this,"audio")),video:this.C?[]:Ei(Mj(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Mj(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
361
|
+
function Pj(a,b,c,d,e,f){var g=null,h=Ab(c);if(Od.includes(e))f=Li(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.ta([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.ca&&d.ca.timescale){var k=d.ca.timescale;if(!isNaN(k)){var l=0,m=!1;(new Bg).box("moof",Gg).box("traf",Gg).O("tfdt",function(n){l=Oi(n.reader,
|
|
362
|
+
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!rj(h)||(a.K?a.K.clearData():a.K=new ej,h=a.K.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.ta(h,f,d?d.endTime:null));return g}
|
|
363
|
+
function Qj(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,q,p,t,w,x,z,v,B,A;return L(function(D){switch(D.g){case 1:m=Ld;if(b!=m.ma){D.u(2);break}if(!a.B){D.u(3);break}return C(D,a.ia,4);case 4:n=D.h,a.g.s=n;case 3:return C(D,he(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.$()[0]:null),5);case 5:return D.return();case 2:if(l||!a.s){D.u(6);break}return C(D,Qj(a,m.S,c,d,e,f,g,h,k,!0),7);case 7:return C(D,Qj(a,m.fa,c,d,e,f,g,h,k,!0),8);case 8:return D.return();
|
|
364
|
+
case 6:if(!a.h[b])return D.return();q=a.h[b].timestampOffset;p=a.G[b];a.m[b]&&(p=a.m[b].getOriginalMimeType());d&&(t=Pj(a,b,c,d,p,q),null!=t&&(w=d.startTime-t,x=Math.abs(q-w),(.001<=x||g||h)&&(!k||0<w||!q)&&(q=w,a.pa&&(Rj(a,b,function(){return Sj(a,b)}),Rj(a,b,function(){return Tj(a,b,q)}))),z=b==m.fa||!(m.fa in a.h),a.B&&z&&a.ia.resolve(q)));f&&b==m.fa&&(a.g||Hj(a,"application/cea-608",a.B,!1),a.H||(v=p.split(";",1)[0],a.H=new Gb(v)),d?(B=a.H.i(c),B.length&&le(a.g,B,d.startTime,d.endTime,q)):a.H.init(c,
|
|
365
|
+
h));if(!a.m[b]){D.u(9);break}return C(D,a.m[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=D.h;case 9:return c=Uj(a,c,d?d.startTime:null,b),d&&a.B&&b!=m.ma&&(g||h)&&(A=d.startTime,Rj(a,b,function(){return Sj(a,b)}),Rj(a,b,function(){return Tj(a,b,A)})),C(D,Rj(a,b,function(){var G=c;if("video"==b&&a.T){var J=a.T;J.g&&J.g.appendBuffer(G,"video",J.o,-q)}a.h[b].appendBuffer(G)}),11);case 11:F(D)}})}function Vj(a,b){var c=Nj(a,"video")||0;je(a.g,b,c)}function Wj(a){a.g&&je(a.g,"",0)}
|
|
366
|
+
r.remove=function(a,b,c){var d=this,e;return L(function(f){return 1==f.g?(e=Ld,a==e.ma?C(f,d.g.remove(b,c),0):C(f,Rj(d,a,function(){return Xj(d,a,b,c)}),4)):d.s?C(f,Rj(d,e.S,function(){return Xj(d,e.S,b,c)}),0):f.u(0)})};function Yj(a,b){var c;return L(function(d){return 1==d.g?(c=Ld,b==c.ma?a.g?C(d,a.g.remove(0,Infinity),0):d.return():C(d,Rj(a,b,function(){return Xj(a,b,0,a.l.duration)}),4)):a.s?C(d,Rj(a,c.S,function(){return Xj(a,c.S,0,a.l.duration)}),0):d.u(0)})}
|
|
367
|
+
r.flush=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=Ld,a==c.ma?d.return():C(d,Rj(b,a,function(){b.i.currentTime-=.001;Jj(b,a)}),2)):b.s?C(d,Rj(b,c.S,function(){var e=c.S;b.i.currentTime-=.001;Jj(b,e)}),0):d.u(0)})};
|
|
368
|
+
function Zj(a,b,c,d,e,f,g,h,k){var l,m,n;return L(function(q){if(1==q.g){l=Ld;if(b==l.ma)return f||(a.g.s=c),ie(a.g,d,e),q.return();m=[];return C(q,ak(a,b,g,h,k),2)}n=q.h;n||(m.push(Rj(a,b,function(){return Sj(a,b)})),a.s&&m.push(Rj(a,l.S,function(){return Sj(a,l.S)})));f||(m.push(Rj(a,b,function(){return Tj(a,b,c)})),a.s&&m.push(Rj(a,l.S,function(){return Tj(a,l.S,c)})));m.push(Rj(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Jj(a,b)}));a.s&&m.push(Rj(a,
|
|
369
|
+
l.S,function(){var p=l.S;a.h[p].appendWindowStart=0;a.h[p].appendWindowEnd=e;a.h[p].appendWindowStart=d;Jj(a,p)}));return C(q,Promise.all(m),0)})}function bk(a,b,c){var d;return L(function(e){if(1==e.g){d=Ld;if(b==d.ma)return e.return();b==d.fa&&(a.ia=new Sf);Rj(a,b,function(){return Sj(a,b)});a.s&&Rj(a,d.S,function(){return Sj(a,d.S)});return C(e,Rj(a,b,function(){return Tj(a,b,c)}),2)}return a.s?C(e,Rj(a,d.S,function(){return Tj(a,d.S,c)}),0):e.u(0)})}
|
|
370
|
+
r.endOfStream=function(a){var b=this;return L(function(c){return C(c,ck(b,function(){Kj(b)||"closed"===b.l.readyState||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.ab=function(a){var b=this;return L(function(c){return C(c,ck(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new Sf};b.j[d].unshift(e)}b.l.duration=a;b.Y=a}),0)})};r.getDuration=function(){return this.l.duration};function Xj(a,b,c,d){d<=c?Jj(a,b):a.h[b].remove(c,d)}
|
|
371
|
+
function Sj(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Jj(a,b)}function Tj(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Jj(a,b)}function Jj(a,b){if(!a.C){var c=a.j[b][0];c&&(c.p.resolve(),dk(a,b))}}function Rj(a,b,c){sg(a.I);c={start:c,p:new Sf};a.j[b].push(c);1==a.j[b].length&&ek(a,b);return c.p}
|
|
372
|
+
function ck(a,b){var c,d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:sg(a.I);c=[];d={};for(e in a.h)d.Jc=new Sf,f={start:function(m){return function(){return m.Jc.resolve()}}(d),p:d.Jc},a.j[e].push(f),c.push(d.Jc),1==a.j[e].length&&f.start(),d={Jc:d.Jc};ra(l,2);return C(l,Promise.all(c),4);case 4:ta(l,3);break;case 2:throw g=va(l),g;case 3:return ra(l,5,6),C(l,b(),6);case 6:xa(l);for(h in a.h)dk(a,h);ya(l,0);break;case 5:throw k=va(l),new R(2,3,3015,k,a.i.error||"No error in the media element");
|
|
373
|
+
}})}function dk(a,b){a.j[b].shift();ek(a,b)}function ek(a,b){var c=a.j[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new R(2,3,3017,b)):c.p.reject(new R(2,3,3015,d,a.i.error||"No error in the media element")),dk(a,b)}}function Uj(a,b,c,d){var e=a.qa[d];a.A.insertFakeEncryptionInInit&&null==c&&e&&(Sc()||Qc()||Rc("SOPOpenBrowser"))&&"mp4"==Td(a.G[d])&&(b=ni(b));return b}
|
|
374
|
+
function fk(a,b,c,d){return Rj(a,b,function(){b!==Jd&&(nb()&&(a.m[b]&&(a.m[b].destroy(),delete a.m[b]),d&&(a.m[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.G[b]=c),Jj(a,b))})}
|
|
375
|
+
function gk(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,G,J,I,E;return L(function(H){switch(H.g){case 1:c=Ld;a.C=!0;a.s=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.da&&(a.i.autoplay=!1);sa(H,2);a.o.ib();g=[];for(h in a.m)g.push(a.m[h].destroy());for(k in a.j)for(l=a.j[k],m=l[0],a.j[k]=l.slice(0,1),m&&g.push(m.p.catch(ne)),n=u(l.slice(1)),q=n.next();!q.done;q=n.next())p=q.value,p.p.reject(new R(2,7,7003,void 0));for(t in a.h){w=a.h[t];try{a.l.removeSourceBuffer(w)}catch(K){}}return C(H,
|
|
376
|
+
Promise.all(g),4);case 4:return a.m={},a.h={},x=a.l.duration,a.L=new Sf,a.l=Cj(a,a.L),C(H,a.L,5);case 5:!isNaN(x)&&x?a.l.duration=x:!isNaN(a.Y)&&a.Y&&(a.l.duration=a.Y),z=new Sf,v=a.l.sourceBuffers,B=b.size,A=0,D=function(){A++;A===B&&(z.resolve(),a.o.Kb(v,"addsourcebuffer",D))},a.o.D(v,"addsourcebuffer",D),G=u(b.keys()),J=G.next();case 6:if(J.done)return a.i.currentTime=d,C(H,z,2);I=J.value;E=b.get(I);return C(H,Gj(a,I,E,E.codecs),9);case 9:a.s?(a.j[c.S]=[],a.j[c.fa]=[]):a.j[I]=[];J=G.next();H.u(6);
|
|
377
|
+
break;case 2:xa(H),a.C=!1,sg(a.I),a.o.na(a.i,"canplaythrough",function(){a.I.g||(a.i.autoplay=e,f||a.i.play())}),ya(H,0)}})}function hk(a,b){return ck(a,function(){return gk(a,b)})}
|
|
378
|
+
function ak(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,t,w,x,z,v,B;return L(function(A){if(1==A.g){f=Ld;if(b==f.ma)return A.return(!1);g=Wd(Yd(a.G[b]));h=Xd(a.G[b]);l=!1;m=Nd(c,d);n=a.A.forceTransmux;if(!kb(m)||!a.B&&Od.includes(m))n=!0;n&&(q=Pd(c,d),p=lc(q))&&(k=p(),t=Hd(f.S,(d||"").split(",")),w=Hd(f.fa,(d||"").split(",")),t&&w?(l=!0,x=w,b==f.S&&(x=t),m=k.convertCodecs(b,Pd(c,x))):m=k.convertCodecs(b,q));z=Wd(Yd(m));v=Xd(m);if(g===z&&h===v)return A.return(!1);B=!0;if(a.s||l&&k&&!a.m[b])B=!1;if(B&&"smooth"===
|
|
379
|
+
a.A.codecSwitchingStrategy&&nb())return C(A,fk(a,b,m,k),3);k&&k.destroy();return C(A,hk(a,e),3)}return A.return(!0)})}function ik(a,b,c,d){if(b==Jd)var e=!1;else{e=Wd(Yd(a.G[b]));var f=Xd(a.G[b]),g=Nd(c,d),h=a.A.forceTransmux;if(!kb(g)||!a.B&&Od.includes(g))h=!0;c=Pd(c,d);h&&(h=lc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=Wd(Yd(g));g=Xd(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!nb()||a.s:!1}var Ej=window.URL.createObjectURL,Ij="sequence";function jk(a,b,c){this.i=a;this.s=b;this.m=this.j=Infinity;this.g=1;this.h=this.l=null;this.A=0;this.F=!0;this.G=0;this.C=void 0===c?!0:c;this.H=0;this.o=!1;this.B=a}r=jk.prototype;r.getDuration=function(){return this.j};r.th=function(){return this.g};r.Eg=function(a){this.i=a};r.ab=function(a){this.j=a};r.xh=function(){return this.i};r.Cg=function(a){this.A=a};r.Bc=function(a){this.F=a};r.ke=function(a){this.m=a};r.Nd=function(){return this.m};r.Df=function(a){this.s=a};r.mh=function(){return this.s};
|
|
380
380
|
r.sg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.de(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.o&&(this.i=(Date.now()+this.A)/1E3-this.h-this.g)}};
|
|
381
381
|
r.ld=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/1E3;a=u(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.de(b);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.o&&(this.i=d-this.h-this.g)}};r.Xd=function(){this.o=!0};r.Rh=function(){return this.o};r.Dg=function(a){this.B=a};r.qh=function(){return this.B};
|
|
382
382
|
r.de=function(a){this.l=null==this.l?a:Math.min(this.l,a)};r.hf=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};r.R=function(){return Infinity==this.j&&!this.F};r.ac=function(){return Infinity!=this.j&&!this.F};r.qb=function(){return Math.max(this.G,this.Hb()-this.m)};r.Ig=function(a){this.G=a};
|
|
383
383
|
r.Hb=function(){return this.R()||this.ac()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.i)+this.H,this.j):this.h?Math.min(this.h,this.j):this.j};r.dd=function(a){var b=Math.max(this.l,this.G);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Hb()-this.m+a,this.pb()))};r.Wb=function(){return this.dd(0)};r.pb=function(){return Math.max(0,this.Hb()-(this.R()||this.ac()?this.s:0))};r.Mg=function(){return null==this.i||null!=this.h&&this.C?!1:!0};
|
|
384
|
-
r.Bg=function(a){this.H=a};P("shaka.media.PresentationTimeline",
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
function
|
|
389
|
-
null!=d&&(0!=d||a.o))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Qc())e=Math.ceil(100*(e+.01))/100;e>=a.B.pb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new T("gapjumped")))}}}};function
|
|
390
|
-
function
|
|
391
|
-
function
|
|
384
|
+
r.Bg=function(a){this.H=a};P("shaka.media.PresentationTimeline",jk);jk.prototype.setAvailabilityTimeOffset=jk.prototype.Bg;jk.prototype.usingPresentationStartTime=jk.prototype.Mg;jk.prototype.getSeekRangeEnd=jk.prototype.pb;jk.prototype.getSeekRangeStart=jk.prototype.Wb;jk.prototype.getSafeSeekRangeStart=jk.prototype.dd;jk.prototype.getSegmentAvailabilityEnd=jk.prototype.Hb;jk.prototype.setUserSeekStart=jk.prototype.Ig;jk.prototype.getSegmentAvailabilityStart=jk.prototype.qb;
|
|
385
|
+
jk.prototype.isInProgress=jk.prototype.ac;jk.prototype.isLive=jk.prototype.R;jk.prototype.offset=jk.prototype.offset;jk.prototype.notifyMaxSegmentDuration=jk.prototype.hf;jk.prototype.notifyMinSegmentStartTime=jk.prototype.de;jk.prototype.getInitialProgramDateTime=jk.prototype.qh;jk.prototype.setInitialProgramDateTime=jk.prototype.Dg;jk.prototype.isStartTimeLocked=jk.prototype.Rh;jk.prototype.lockStartTime=jk.prototype.Xd;jk.prototype.notifySegments=jk.prototype.ld;jk.prototype.notifyTimeRange=jk.prototype.sg;
|
|
386
|
+
jk.prototype.getDelay=jk.prototype.mh;jk.prototype.setDelay=jk.prototype.Df;jk.prototype.getSegmentAvailabilityDuration=jk.prototype.Nd;jk.prototype.setSegmentAvailabilityDuration=jk.prototype.ke;jk.prototype.setStatic=jk.prototype.Bc;jk.prototype.setClockOffset=jk.prototype.Cg;jk.prototype.getPresentationStartTime=jk.prototype.xh;jk.prototype.setDuration=jk.prototype.ab;jk.prototype.setPresentationStartTime=jk.prototype.Eg;jk.prototype.getMaxSegmentDuration=jk.prototype.th;
|
|
387
|
+
jk.prototype.getDuration=jk.prototype.getDuration;function kk(a,b,c){this.j=c;this.l=a;this.s=lk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}kk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function mk(a,b){a.i=b}function nk(a){this.g=a}function lk(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=u(Ei(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 ok(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.s=c;this.l=new db;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.o=!1;this.l.D(a,"waiting",function(){return pk(f)});this.m=(new Mc(function(){pk(f)})).Pa(this.s.gapJumpTimerTime)}ok.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.A=null};ok.prototype.mf=function(){this.o=!0;pk(this)};
|
|
388
|
+
function pk(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=lk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new T("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=Fi(c,b,a.s.gapDetectionThreshold),
|
|
389
|
+
null!=d&&(0!=d||a.o))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Qc())e=Math.ceil(100*(e+.01))/100;e>=a.B.pb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new T("gapjumped")))}}}};function qk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=rk.value().get(b),c.na(a,b,d))}var rk=new Jc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function sk(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new db;this.i=new tk(a);qk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){uk(e,e.j())})}sk.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function vk(a){return a.o?a.g.currentTime:a.j()}
|
|
390
|
+
function wk(a,b){0<a.g.readyState?xk(a.i,b):qk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){uk(a,a.j())})}function uk(a,b){.001>Math.abs(a.g.currentTime-b)?yk(a):(a.h.na(a.g,"seeking",function(){yk(a)}),xk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function yk(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
|
|
391
|
+
function tk(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Mc(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}tk.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function xk(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Pa(.1)};function zk(a){this.g=a;this.j=!1;this.h=null;this.i=new db}r=zk.prototype;r.we=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.na(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;qk(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.xe=function(a){this.h=this.j?this.h:a};r.Dd=function(){return(this.j?this.g.currentTime:this.h)||0};r.Pf=function(){return 0};
|
|
392
392
|
r.Of=function(){return 0};r.rg=function(){};
|
|
393
|
-
function
|
|
394
|
-
g.g.Wb():g.g.pb():0>h&&(h=g.g.pb()+h);return
|
|
395
|
-
r.Dd=function(){var a=
|
|
396
|
-
function
|
|
397
|
-
function
|
|
393
|
+
function Ak(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.A=e;this.s=null;this.o=Bk(a,c,f);this.j=new ok(a,b.presentationTimeline,c,this.o,f);this.h=new sk(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=vk(g.h);h=Ck(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;wk(g.h,h);h=void 0;break a}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?
|
|
394
|
+
g.g.Wb():g.g.pb():0>h&&(h=g.g.pb()+h);return Dk(g,Ek(g,h))});this.m=new Mc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=vk(g.h),k=g.g.Wb(),l=g.g.pb();3>l-k&&(k=l-3);h<k&&(h=Ck(g,h),g.i.currentTime=h)}})}r=Ak.prototype;r.we=function(){this.m.Pa(.25)};r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};r.xe=function(a){wk(this.h,a)};
|
|
395
|
+
r.Dd=function(){var a=vk(this.h);return 0<this.i.readyState&&!this.i.paused?Ek(this,a):a};r.Pf=function(){return this.o?this.o.o:0};r.Of=function(){return this.j.C};r.rg=function(){this.j.mf()};function Dk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
396
|
+
function Ck(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Wb(),f=a.g.pb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.dd(c),k=a.g.dd(d);c=a.g.dd(c+d);return b>=g?Dk(a,b):b>f?f:b<e?Ci(a.i.buffered,k)?k:c:b>=h||Ci(a.i.buffered,b)?b:c}function Ek(a,b){var c=a.g.Wb();if(b<c)return c;a=a.g.pb();return b>a?a:b}
|
|
397
|
+
function Bk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new kk(new nk(a),b.stallThreshold,c);mk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Fk(a){this.g=a;this.m=null;this.j=0;this.o=!1}r=Fk.prototype;r.getNumReferences=function(){return this.g.length};r.getNumEvicted=function(){return this.j};r.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};r.Xh=function(){this.o=!0};r.qc=function(a){for(var b=u(this.g),c=b.next();!c.done;c=b.next())a(c.value)};
|
|
398
398
|
r.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.j}return this.g.length&&a<this.g[0].startTime?this.j:null};r.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};r.offset=function(a){if(!this.o)for(var b=u(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
|
|
399
399
|
r.ae=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,y(a))}};r.kd=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.ae(a);this.Ia(b)};r.Ia=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.j+=b-this.g.length}};
|
|
400
400
|
r.pc=function(a,b,c){c=void 0===c?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.j++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new ti(a.startTime,b,a.C,a.Aa,a.ja,a.ca,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.A,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.j=a.j,this.g[this.g.length-1]=b)}};
|
|
401
|
-
r.le=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new Mc(function(){var d=b();d?c.g.push.apply(c.g,y(d)):(c.m.stop(),c.m=null)}),this.m.Pa(a))};
|
|
402
|
-
|
|
403
|
-
P("shaka.media.SegmentIndex",
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
r.get=function(a){for(var b=0,c=u(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};r.offset=function(){};r.ae=function(){};r.Ia=function(){};r.kd=function(){};r.pc=function(){};r.le=function(){};P("shaka.media.MetaSegmentIndex",
|
|
408
|
-
|
|
409
|
-
function
|
|
410
|
-
function
|
|
411
|
-
function
|
|
412
|
-
function
|
|
413
|
-
|
|
414
|
-
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.Wf=d,JSON.stringify(d),c=new T("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function
|
|
415
|
-
function
|
|
416
|
-
r.configure=function(a){this.h=a;this.I=new Pf({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.X&&(
|
|
417
|
-
b.X&&(
|
|
418
|
-
function
|
|
419
|
-
function
|
|
420
|
-
function
|
|
421
|
-
function
|
|
422
|
-
|
|
423
|
-
function
|
|
401
|
+
r.le=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new Mc(function(){var d=b();d?c.g.push.apply(c.g,y(d)):(c.m.stop(),c.m=null)}),this.m.Pa(a))};Fk.prototype[Symbol.iterator]=function(){return this.xb(0)};
|
|
402
|
+
Fk.prototype.xb=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;d--;var e=this.get(d+1),f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return Ua("No independent partial segment found!"),null}d++;f=g-1;break}}return new Gk(this,d,f,c)};function Hk(a,b,c){a=new ti(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Fk([a])}
|
|
403
|
+
P("shaka.media.SegmentIndex",Fk);Fk.forSingleSegment=Hk;Fk.prototype.getIteratorForTime=Fk.prototype.xb;Fk.prototype.updateEvery=Fk.prototype.le;Fk.prototype.fit=Fk.prototype.pc;Fk.prototype.evict=Fk.prototype.Ia;Fk.prototype.mergeAndEvict=Fk.prototype.kd;Fk.prototype.offset=Fk.prototype.offset;Fk.prototype.get=Fk.prototype.get;Fk.prototype.find=Fk.prototype.find;Fk.prototype.markImmutable=Fk.prototype.Xh;Fk.prototype.release=Fk.prototype.release;Fk.prototype.getNumEvicted=Fk.prototype.getNumEvicted;
|
|
404
|
+
Fk.prototype.getNumReferences=Fk.prototype.getNumReferences;function Gk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Gk.prototype.je=function(a){this.reverse=a};Gk.prototype.fh=function(){return this.h};Gk.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.o&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
|
|
405
|
+
Gk.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};P("shaka.media.SegmentIterator",Gk);Gk.prototype.next=Gk.prototype.next;Gk.prototype.current=Gk.prototype.current;Gk.prototype.currentPosition=Gk.prototype.fh;
|
|
406
|
+
Gk.prototype.setReverse=Gk.prototype.je;function Ik(){Fk.call(this,[]);this.h=[]}na(Ik,Fk);r=Ik.prototype;r.clone=function(){var a=new Ik;a.h=this.h.slice();return a};r.release=function(){for(var a=u(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};r.qc=function(a){for(var b=u(this.h),c=b.next();!c.done;c=b.next())c.value.qc(a)};r.find=function(a){for(var b=0,c=u(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};
|
|
407
|
+
r.get=function(a){for(var b=0,c=u(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};r.offset=function(){};r.ae=function(){};r.Ia=function(){};r.kd=function(){};r.pc=function(){};r.le=function(){};P("shaka.media.MetaSegmentIndex",Ik);Ik.prototype.updateEvery=Ik.prototype.le;Ik.prototype.fit=Ik.prototype.pc;Ik.prototype.mergeAndEvict=Ik.prototype.kd;Ik.prototype.evict=Ik.prototype.Ia;Ik.prototype.merge=Ik.prototype.ae;
|
|
408
|
+
Ik.prototype.offset=Ik.prototype.offset;Ik.prototype.get=Ik.prototype.get;Ik.prototype.find=Ik.prototype.find;Ik.prototype.forEachTopLevelReference=Ik.prototype.qc;Ik.prototype.release=Ik.prototype.release;function Jk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Md();this.h=new Mc(function(){b.g.qg(.25*b.i)})}Jk.prototype.release=function(){this.set(this.Tb());this.h&&(this.h.stop(),this.h=null);this.g=null};Jk.prototype.set=function(a){this.i=a;Kk(this)};Jk.prototype.Tb=function(){return this.g.Tb()};function Kk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Md()!=b&&a.g.Ff(b);return}catch(c){}a.h.Pa(.25);0!=a.g.Md()&&a.g.Ff(0)};function Lk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Mc(function(){Mk(b,!1)})).Pa(.25)}Lk.prototype.release=function(){this.i.stop();for(var a=u(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Mk(a,b){for(var c=u(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Nk(){this.g=null;this.h=[]}function Ok(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=u(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Pk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=u(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 Qk(){this.i=this.h=null;this.g=[]}function Rk(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 Sk(){this.Ed=this.A=this.B=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.L=this.N=this.H=this.I=this.K=this.l=this.o=NaN;this.g=new Nk;this.h=new Qk};function Tk(a,b,c){this.m=a;this.h=b;this.l=0;this.j=c;this.g=new Map;this.i=new Map}function Uk(a,b){a.j=b;a=u(a.g.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
|
|
409
|
+
function Vk(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex&&(b=a.h.segmentIndex.xb(Math.max(b,a.l),!0))){var d=b.next().value;c&&(d=b.next().value);if(d){for(;a.g.size<a.m&&null!=d;){c=!0;d.preload&&null!=d.ja&&(c=!1);2==d.Yb()&&(c=!1);c&&d.ca&&Wk(a,d.ca);c&&!a.g.has(d)&&(c=new Xk(a.j),Yk(c,d,a.h),a.g.set(d,c));a.l=d.startTime;if(a.h.fastSwitching&&d.md&&d.Wd)break;d=b.next().value}Zk(a)}}}
|
|
410
|
+
function Wk(a,b){if(a.h.segmentIndex&&!Array.from(a.i.keys()).some(function(d){return si(d,b)})){var c=new Xk(a.j);Yk(c,b,a.h);a.i.set(b,c)}}function $k(a,b){b=u(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&al(a,c)}function bl(a){$k(a,a.g);$k(a,a.i);a.l=0}Tk.prototype.Ia=function(a,b){b=void 0===b?!1:b;for(var c=u(this.g.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&al(this,d);b&&Zk(this)};
|
|
411
|
+
function Zk(a){for(var b=Array.from(a.g.keys()),c={},d=u(a.i.keys()),e=d.next();!e.done;c={wd:c.wd},e=d.next())c.wd=e.value,b.some(function(f){return function(g){return si(g.ca,f.wd)}}(c))||al(a,c.wd)}function cl(a,b){a.m=b;for(var c=Array.from(a.g.keys());c.length>b;){var d=c.pop();d&&al(a,d)}Zk(a)}function dl(a,b){b&&b!==a.h&&(bl(a),a.h=b)}function al(a,b){var c=a.g;b instanceof ri&&(c=a.i);a=c.get(b);c.delete(b);a&&a.abort()}function Xk(a){this.g=a;this.ge=this.Gf=null}
|
|
412
|
+
function Yk(a,b,c){var d=new Uint8Array(0);a.ge=a.g(b,c,function(e){return L(function(f){if(1==f.g)return 0<d.byteLength?d=Ad(d,e):d=e,a.Gf?C(f,a.Gf(d),3):f.u(0);d=new Uint8Array(0);F(f)})})}Xk.prototype.abort=function(){this.ge&&this.ge.abort()};function el(a){bg.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Mc(function(){for(var c=b.i(),d=u(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new T("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Pa(2)}na(el,bg);el.prototype.release=function(){this.g.clear();this.h.stop();bg.prototype.release.call(this)};function fl(a){bg.call(this);this.g=new Map;this.h=a}na(fl,bg);fl.prototype.release=function(){this.g.clear();bg.prototype.release.call(this)};function gl(a,b){var c=a.g.get(b);c||(c={nd:[],Wf:null,contentType:b},a.g.set(b,c));return c}function hl(a,b,c){var d=gl(a,b.contentType);il(a,d);a={gf:b,position:c};d=d.nd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
413
|
+
fl.prototype.j=function(a){for(var b=u(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.nd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.gf;break a}}d=null}if(e=d)e=c.Wf,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
|
|
414
|
+
if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.Wf=d,JSON.stringify(d),c=new T("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function il(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.nd;b.nd=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.nd=[]};function jl(a,b,c,d,e){a=jg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function kl(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.B=1;this.s=this.j=null;this.H=0;this.F=!1;this.i=new Map;this.C=!1;this.I=null;this.A=!1;this.l=new rg(function(){return ll(c)});this.K=Date.now()/1E3;this.o=new Map;this.G={projection:null,hfov:null}}r=kl.prototype;r.destroy=function(){return this.l.destroy()};
|
|
415
|
+
function ll(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g){b=[];c=u(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,ml(e),b.push(nl(e));f=u(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,bl(h);return C(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.m=null;a.h=null;F(k)})}
|
|
416
|
+
r.configure=function(a){this.h=a;this.I=new Pf({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.X&&(bl(b.X),b.X=null);b=u(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,bl(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Jd))&&
|
|
417
|
+
b.X&&(bl(b.X),b.X=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.X&&(bl(b.X),b.X=null);b=u(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.X?(cl(c.X,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(c.X=null)):0<a.segmentPrefetchLimit&&(c.X=ol(this,c.stream));a.disableAudioPrefetch||pl(this)};r.start=function(a){var b=this;return L(function(c){if(1==c.g)return C(c,ql(b,a||new Map),2);sg(b.l);b.C=!0;F(c)})};
|
|
418
|
+
function rl(a,b){var c,d,e,f,g,h,k;L(function(l){switch(l.g){case 1:return c=Ld,a.H++,d=a.H,ra(l,2),C(l,Yj(a.g.W,c.ma),4);case 4:ta(l,3);break;case 2:if(e=va(l),a.g)a.g.onError(e);case 3:f=Nd(b.mimeType,b.codecs),Hj(a.g.W,f,a.m.sequenceMode,b.external),g=a.g.W.F,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.H==d&&(k=sl(a,b),a.i.set(c.ma,k),tl(a,k,0)),F(l)}})}function ul(a){var b=a.i.get(Jd);b&&(ml(b),nl(b).catch(function(){}),a.i.delete(Jd));a.s=null}
|
|
419
|
+
function vl(a,b){var c=0>a.g.eb(),d=a.i.get("video");d&&d.Z&&d.Z.je(c);(d=a.i.get("audio"))&&d.Z&&d.Z.je(c);(d=a.i.get(Jd))&&d.Z&&d.Z.je(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.fc&&(wl(a,b,!1,0,!1),c.fc=d);else if(b=c.fc)c.fc=null,wl(a,b,!0,0,!1)}function xl(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.C&&(b.video&&wl(a,b.video,c,d,e,f),b.audio&&wl(a,b.audio,c,d,e,f))}
|
|
420
|
+
function yl(a,b){L(function(c){if(1==c.g)return a.s=b,a.C?b.segmentIndex?c.u(2):C(c,b.createSegmentIndex(),2):c.return();wl(a,b,!0,0,!1);F(c)})}
|
|
421
|
+
function wl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Jd?g&&(g.fc&&(b.trickModeVideo?(g.fc=b,b=b.trickModeVideo):g.fc=null),g.stream!=b||e)&&(a.o.has(b)?g.X=a.o.get(b):g.X&&dl(g.X,b),b.type==Jd&&(e=Nd(b.mimeType,b.codecs),Hj(a.g.W,e,a.m.sequenceMode,b.external)),a.o.has(g.stream)||g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.Z=null,g.Qf=!!f,c&&(g.Uc?g.me=!0:g.Na?(g.Lb=!0,g.Id=d,g.me=!0):(ml(g),zl(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),Al(a,g).catch(function(h){if(a.g)a.g.onError(h)})):
|
|
422
|
+
rl(a,b)}
|
|
423
|
+
function Al(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.$a)return e.return();c=b.stream;d=b.$a;return c.segmentIndex?e.u(2):C(e,c.createSegmentIndex(),2)}if(b.$a!=d||b.stream!=c)return e.return();var f=a.g.Ld();var g=Nj(a.g.W,b.type),h=b.stream.segmentIndex.find(b.La?b.La.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ja?k.ja-k.Aa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ca)&&(h+=(k.ja?k.ja-k.Aa:null)||0),k=a.g.getBandwidthEstimate(),f=
|
|
424
424
|
8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.$a.h.g>h?!0:!1):f=!1;f&&b.$a.abort();F(e)})}
|
|
425
|
-
r.od=function(){if(this.g)for(var a=this.g.Ld(),b=u(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.Z&&(e=c.Z.current());if(!e||e.startTime>a||e.endTime<a)c.Z=null;e=this.g.W;e.C?e=!1:d==Jd?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=
|
|
426
|
-
function
|
|
427
|
-
function
|
|
428
|
-
b.get(l.id),
|
|
429
|
-
function
|
|
430
|
-
function
|
|
425
|
+
r.od=function(){if(this.g)for(var a=this.g.Ld(),b=u(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.Z&&(e=c.Z.current());if(!e||e.startTime>a||e.endTime<a)c.Z=null;e=this.g.W;e.C?e=!1:d==Jd?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Mj(e,d),e=Ci(e,a));e||((null!=Nj(this.g.W,d)||c.Na)&&Bl(this,c),c.$a&&(c.$a.abort(),c.$a=null),d===Jd&&(d=this.g.W,d.H&&d.H.g()),c.od=!0)}};
|
|
426
|
+
function Bl(a,b){b.Uc||b.Lb||(b.Na?(b.Lb=!0,b.Id=0):null==Lj(a.g.W,b.type)?null==b.ub&&tl(a,b,0):(ml(b),zl(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
|
|
427
|
+
function ql(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(q){if(1==q.g){c=Ld;if(!a.j)throw new R(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.S,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.fa,a.j.video),e.add(a.j.video));a.s&&(d.set(c.ma,a.s),e.add(a.s));f=a.g.W;return C(q,f.init(d,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}sg(a.l);a.updateDuration();g=u(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=sl(a,l),b.has(l.id)&&(n=
|
|
428
|
+
b.get(l.id),Uk(n,function(p,t,w){return Cl(p,t,w||null,a.h.retryParameters,a.g.zb)}),m.X=n),a.i.set(k,m),tl(a,m,0));F(q)})}function sl(a,b){return{stream:b,type:b.type,Z:null,X:ol(a,b),La:null,bc:null,df:null,bf:null,af:null,fc:null,endOfStream:!1,Na:!1,ub:null,Lb:!1,Id:0,me:!1,Uc:!1,od:!0,wf:!1,gd:!1,$a:null}}
|
|
429
|
+
function ol(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Jd&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Jd&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.X)&&b===c.h?c:0<a.h.segmentPrefetchLimit?new Tk(a.h.segmentPrefetchLimit,b,function(d,e,f){return Cl(d,e,f||null,a.h.retryParameters,a.g.zb)}):null}
|
|
430
|
+
function pl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d={},e=u(a.m.variants),f=e.next();!f.done;d={Fa:d.Fa},f=e.next())if(d.Fa=f.value,d.Fa.audio)if(a.o.has(d.Fa.audio)){if(f=a.o.get(d.Fa.audio),cl(f,b),!(0<b&&c.some(function(h){return function(k){return qe(h.Fa.audio.language,k)}}(d)))){var g=a.i.get(d.Fa.audio.type);f!==(g&&g.X)&&bl(f);a.o.delete(d.Fa.audio)}}else 0>=b||!c.some(function(h){return function(k){return qe(h.Fa.audio.language,k)}}(d))||!(f=ol(a,d.Fa.audio))||
|
|
431
431
|
(d.Fa.audio.segmentIndex||d.Fa.audio.createSegmentIndex(),a.o.set(d.Fa.audio,f))}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.W.ab(a):this.g.W.ab(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
|
|
432
|
-
function
|
|
433
|
-
va(h),C(h,
|
|
434
|
-
function
|
|
435
|
-
!0,"video"==b.type&&(a=a.i.get(Jd))&&
|
|
436
|
-
function
|
|
437
|
-
function
|
|
438
|
-
ra(H,2);n=
|
|
439
|
-
A.return():b.Lb?(b.Na=!1,
|
|
440
|
-
!0,1==B.category&&b.X
|
|
441
|
-
function
|
|
442
|
-
function
|
|
443
|
-
function(){var z,v,B;return L(function(A){if(1==A.g)return z=new Map,a.j.audio&&z.set(d.S,a.j.audio),a.j.video&&z.set(d.fa,a.j.video),ra(A,2),b.bf=f,b.af=g,b.cf=h,b.mg=k,b.df=l,v=a.m.sequenceMode||"HLS"==a.m.type,C(A,
|
|
444
|
-
2),C(I,p,4);case 4:return z=I.h,sg(a.l),v=null,B=new Map,A={projection:null,hfov:null},D=new Bg,D.box("moov",Gg).box("trak",Gg).box("mdia",Gg).O("mdhd",function(E){v=
|
|
445
|
-
Gg).box("proj",Gg).O("prji",function(E){E=E.reader.dc();A.projection=E}).box("hfov",function(E){E=E.reader.M()/1E3;A.hfov=E}).parse(z),
|
|
432
|
+
function Dl(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:sg(a.l);if(b.Na||null==b.ub||b.Uc)return h.return();b.ub=null;if(!b.Lb){h.u(2);break}return C(h,zl(a,b,b.me,b.Id),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.u(4);break}c=b.stream;return C(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Na||b.ub||tl(a,b,0),h.return();case 4:ra(h,6);d=El(a,b);null!=d&&(tl(a,b,d),b.gd=!1);ta(h,7);break;case 6:return e=
|
|
433
|
+
va(h),C(h,Fl(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.u(0);break}return C(h,a.g.W.endOfStream(),10);case 10:sg(a.l),g=a.g.W.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.ab(g),F(h)}})}
|
|
434
|
+
function El(a,b){if(Gl(b))return Vj(a.g.W,b.stream.originalId||""),null;b.type==Jd&&Wj(a.g.W);if(!a.g.W.ea&&b.type!=Jd)return a.h.updateIntervalSeconds/2;var c=a.g.Ld();if("audio"===b.type)for(var d=u(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.Ia(c,!0),Vk(e,c);d=b.La?b.La.endTime:c;e=Oj(a.g.W,b.type,c);var f=Math.max(1,Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.B),g=a.m.presentationTimeline.getDuration()-d,h=Nj(a.g.W,b.type);if(1E-6>g&&h)return b.endOfStream=
|
|
435
|
+
!0,"video"==b.type&&(a=a.i.get(Jd))&&Gl(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Hl(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=u(g);for(h=g.next();!h.done;h=g.next())h=h.value,Gl(h)||h.Z&&!h.Z.current()||(f=Math.min(f,h.La?h.La.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.X&&b.Z&&!a.o.has(b.stream)&&(b.X.Ia(c),Vk(b.X,e.startTime));Il(a,b,c,e).catch(function(){});return null}
|
|
436
|
+
function Hl(a,b,c,d){if(b.Z)return b.Z.current();if(b.La||d)return b.Z=b.stream.segmentIndex.xb(b.La?b.La.endTime:d,!1,0>a.g.eb()),b.Z&&b.Z.next().value;d=a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.eb();var f=null;d&&(b.Z=b.stream.segmentIndex.xb(e,!1,a),f=b.Z&&b.Z.next().value);f||(b.Z=b.stream.segmentIndex.xb(c,!1,a),f=b.Z&&b.Z.next().value);return f}
|
|
437
|
+
function Il(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B;return L(function(A){switch(A.g){case 1:e=Ld;f=b.stream;g=b.Z;b.Na=!0;ra(A,2);if(2==d.Yb())throw new R(1,1,1011);return C(A,Jl(a,b,d),4);case 4:sg(a.l);if(a.A)return A.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.m))return n=new Uint8Array(0),p=q=!1,w=function(D){var G,J,I,E;return L(function(H){switch(H.g){case 1:if(q)return H.return();p=!0;sg(a.l);if(a.A)return H.return();
|
|
438
|
+
ra(H,2);n=Kl(n,D);G=!1;J=0;(new Bg).box("mdat",function(K){J=K.size+K.start;G=!0}).parse(n,!1,!0);if(!G){H.u(4);break}I=n.subarray(0,J);n=n.subarray(J);return C(H,Ll(a,b,c,f,d,I,!0),5);case 5:b.X&&b.Z&&Vk(b.X,d.startTime,!0);case 4:ta(H,0);break;case 2:t=E=va(H),F(H)}})},C(A,Ml(a,b,d,w),9);l=Ml(a,b,d);return C(A,l,7);case 7:m=A.h;sg(a.l);if(a.A)return A.return();sg(a.l);return b.Lb?(b.Na=!1,tl(a,b,0),A.return()):C(A,Ll(a,b,c,f,d,m),6);case 9:x=A.h;if(t)throw t;if(p){A.u(10);break}q=!0;sg(a.l);return a.A?
|
|
439
|
+
A.return():b.Lb?(b.Na=!1,tl(a,b,0),A.return()):C(A,Ll(a,b,c,f,d,x),10);case 10:b.X&&b.Z&&Vk(b.X,d.startTime,!0);case 6:sg(a.l);if(a.A)return A.return();b.La=d;g.next();b.Na=!1;b.wf=!1;z=a.g.W.ob();v=z[b.type];ab(JSON.stringify(v));b.Lb||a.g.mf(d,b.stream);tl(a,b,0);ta(A,0);break;case 2:B=va(A);sg(a.l,B);if(a.A)return A.return();b.Na=!1;if(7001==B.code)b.Na=!1,ml(b),tl(a,b,0),A.u(0);else if(b.type==e.ma&&a.h.ignoreTextStreamFailures)a.i.delete(e.ma),A.u(0);else if(3017==B.code)Nl(a,b,B),A.u(0);else return b.gd=
|
|
440
|
+
!0,1==B.category&&b.X&&al(b.X,d),B.severity=2,C(A,Fl(a,b,B),0)}})}function Ol(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):C(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Ab(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})}
|
|
441
|
+
function Kl(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Nl(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.wf})){if(0<a.h.maxDisabledTime&&a.g.Jd(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.gd=!0;a.A=!0;a.g.onError(c);return}b.wf=!0}tl(a,b,4)}
|
|
442
|
+
function Jl(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,t,w;return L(function(x){switch(x.g){case 1:d=Ld;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=Wd(b.stream.codecs);k=Xd(b.stream.mimeType);l=c.timestampOffset;if(l==b.df&&f==b.bf&&g==b.af&&h==b.cf&&k==b.mg){x.u(2);break}m=b.cf&&b.mg&&ik(a.g.W,b.type,k,h);if(!m){x.u(3);break}n=null;b.type===d.fa?n=a.i.get(d.S):b.type===d.S&&(n=a.i.get(d.fa));if(!n){x.u(3);break}return C(x,nl(n).catch(function(){}),5);case 5:n.bc=null,Bl(a,n);case 3:return q=
|
|
443
|
+
function(){var z,v,B;return L(function(A){if(1==A.g)return z=new Map,a.j.audio&&z.set(d.S,a.j.audio),a.j.video&&z.set(d.fa,a.j.video),ra(A,2),b.bf=f,b.af=g,b.cf=h,b.mg=k,b.df=l,v=a.m.sequenceMode||"HLS"==a.m.type,C(A,Zj(a.g.W,b.type,l,f,g,v,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,z),4);if(2!=A.g)return ta(A,0);B=va(A);b.bf=null;b.af=null;b.cf=null;b.df=null;throw B;})},C(x,q(),2);case 2:return si(c.ca,b.bc)||(b.bc=c.ca,c.l&&c.ca&&(p=Ml(a,b,c.ca),t=function(){var z,v,B,A,D,G,J;return L(function(I){switch(I.g){case 1:return ra(I,
|
|
444
|
+
2),C(I,p,4);case 4:return z=I.h,sg(a.l),v=null,B=new Map,A={projection:null,hfov:null},D=new Bg,D.box("moov",Gg).box("trak",Gg).box("mdia",Gg).O("mdhd",function(E){v=Pi(E.reader,E.version).timescale}).box("hdlr",function(E){E=E.reader;E.skip(8);switch(E.dc()){case "soun":B.set(d.S,v);break;case "vide":B.set(d.fa,v)}v=null}).box("minf",Gg).box("stbl",Gg).O("stsd",Ig).box("encv",Lg).box("avc1",Lg).box("avc3",Lg).box("hev1",Lg).box("hvc1",Lg).box("dvav",Lg).box("dva1",Lg).box("dvh1",Lg).box("dvhe",Lg).box("vexu",
|
|
445
|
+
Gg).box("proj",Gg).O("prji",function(E){E=E.reader.dc();A.projection=E}).box("hfov",function(E){E=E.reader.M()/1E3;A.hfov=E}).parse(z),Pl(a,A),B.has(b.type)?c.ca.timescale=B.get(b.type):null!=v&&(c.ca.timescale=v),G=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,C(I,a.g.Sf(b.type,z),5);case 5:return C(I,Qj(a.g.W,b.type,z,null,b.stream,G),6);case 6:ta(I,0);break;case 2:throw J=va(I),b.bc=null,J;}})},a.g.Zh(c.startTime,c.ca),e.push(t()))),a.m.sequenceMode&&(w=b.La?b.La.j:null,c.j!=w&&e.push(bk(a.g.W,
|
|
446
446
|
b.type,c.startTime))),C(x,Promise.all(e),0)}})}
|
|
447
|
-
function
|
|
447
|
+
function Ll(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,q;return L(function(p){switch(p.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;m=a.h.parsePrftBox&&!a.F;if(l||m)k=new Bg;l&&k.O("emsg",function(t){var w=d.emsgSchemeIdUris;if(0===t.version){var x=t.reader.dc();var z=t.reader.dc();var v=t.reader.M();var B=t.reader.M();var A=t.reader.M();var D=t.reader.M();var G=e.startTime+B/v}else v=t.reader.M(),G=t.reader.zc()/
|
|
448
448
|
v+e.timestampOffset,B=G-e.startTime,A=t.reader.M(),D=t.reader.M(),x=t.reader.dc(),z=t.reader.dc();t=t.reader.sb(t.reader.getLength()-t.reader.wa());if(w&&w.includes(x)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==x?a.g.$h():(w=(new Map).set("detail",{startTime:G,endTime:G+A/v,schemeIdUri:x,value:z,timescale:v,presentationTimeDelta:B,eventDuration:A,id:D,messageData:t}),w=new T("emsg",w),w.cancelable=!0,a.g.onEvent(w),w.defaultPrevented||"https://aomedia.org/emsg/ID3"!=x&&"https://developer.apple.com/streaming/emsg-id3"!=
|
|
449
|
-
x||(x=
|
|
450
|
-
a.F=!0}});(l||m)&&k.parse(f);return C(p,
|
|
451
|
-
function
|
|
452
|
-
function
|
|
453
|
-
function
|
|
454
|
-
function
|
|
455
|
-
function
|
|
456
|
-
function
|
|
457
|
-
function
|
|
458
|
-
function
|
|
459
|
-
function
|
|
460
|
-
k),g=!1)}return g}function
|
|
461
|
-
function
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
function
|
|
449
|
+
x||(x=Li(t),x.length&&e&&a.g.ai([{cueTime:e.startTime,data:t,frames:x,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.O("prft",function(t){if(!a.F&&e.ca.timescale){var w=t.reader,x=t.version;w.M();t=w.M();var z=w.M();t=1E3*t+z/Math.pow(2,32)*1E3;0===x?w=w.M():(x=w.M(),w=w.M(),w=x*Math.pow(2,32)+w);t=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+t)).getTime();w=(new Map).set("detail",{wallClockTime:t,programStartDate:new Date(t-w/e.ca.timescale*1E3)});w=new T("prft",w);a.g.onEvent(w);
|
|
450
|
+
a.F=!0}});(l||m)&&k.parse(f);return C(p,Ql(a,b,c),2);case 2:return sg(a.l),n=b.od,b.od=!1,q=b.Qf,b.Qf=!1,C(p,a.g.Sf(b.type,f),3);case 3:return C(p,Qj(a.g.W,b.type,f,e,d,h,n,q,g),4);case 4:sg(a.l),F(p)}})}function Ql(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Lj(a.g.W,b.type);if(null==e)return h.return();f=c-e;g=f-d;return g<=a.h.evictionGoal?h.return():C(h,a.g.W.remove(b.type,e,e+g),2)}sg(a.l);F(h)})}
|
|
451
|
+
function Gl(a){return a&&a.type==Jd&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
|
|
452
|
+
function Ml(a,b,c,d){var e,f,g,h,k;return L(function(l){switch(l.g){case 1:if(e=c.ed())return l.return(e);f=null;if(b.X){var m=b.X,n=m.g;c instanceof ri&&(n=m.i);n.has(c)?(m=n.get(c),d&&(m.Gf=d),f=m.ge):f=null}f||(f=Cl(c,b.stream,d||null,a.h.retryParameters,a.g.zb));g=0;b.Z&&(g=b.Z.h);b.$a=f;return C(l,f.promise,2);case 2:h=l.h;b.$a=null;k=h.data;if(!c.aesKey){l.u(3);break}return C(l,Ol(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
|
|
453
|
+
function Cl(a,b,c,d,e){var f=a instanceof ti?a:void 0,g=f?1:0;a=jl(a.$(),a.Aa,a.ja,d,c);a.contentType=b.type;return e.request(pg,a,{type:g,stream:b,segment:f})}
|
|
454
|
+
function zl(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.Lb=!1,b.me=!1,b.Id=0,b.Uc=!0,b.La=null,b.bc=null,b.Z=null,b.X&&!a.o.has(b.stream)&&bl(b.X),d?(e=a.g.Ld(),f=a.g.W.getDuration(),C(g,a.g.W.remove(b.type,e+d,f),3)):C(g,Yj(a.g.W,b.type),4);if(3!=g.g)return sg(a.l),c?C(g,a.g.W.flush(b.type),3):g.u(3);sg(a.l);b.Uc=!1;b.endOfStream=!1;b.Na||b.ub||tl(a,b,0);F(g)})}
|
|
455
|
+
function tl(a,b,c){var d=b.type;if(d!=Jd||a.i.has(d))b.ub=(new Lc(function(){var e;return L(function(f){if(1==f.g)return ra(f,2),C(f,Dl(a,b),4);if(2!=f.g)return ta(f,0);e=va(f);if(a.g)a.g.onError(e);F(f)})})).U(c)}function ml(a){null!=a.ub&&(a.ub.stop(),a.ub=null)}function nl(a){return L(function(b){return a.$a?C(b,a.$a.abort(),0):b.u(0)})}
|
|
456
|
+
function Fl(a,b,c){var d;return L(function(e){if(1==e.g)return C(e,Rf(a.I),2);sg(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.Jd(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.h.failureCallback(c);F(e)})}
|
|
457
|
+
function Rl(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.K<c)return h.return(!1);a.K=b;d=Ld;if(e=a.i.get(d.S))e.bc=null,Bl(a,e),nl(e).catch(function(){});if(f=a.i.get(d.fa))f.bc=null,Bl(a,f),nl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.S,a.j.audio);a.j.video&&g.set(d.fa,a.j.video);return C(h,hk(a.g.W,g),2)}return h.return(!0)})}
|
|
458
|
+
function Pl(a,b){if(a.G.projection!=b.projection||a.G.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new T("spatialvideoinfo",c)}else c=new T("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.G=b}};function Sl(){}
|
|
459
|
+
function Tl(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]=ze(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=ze(l)),k=Tl(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?(Ua("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Va("Unexpected number of arguments for "+k),a[h]=b[h]):(Ua("Invalid config, unrecognized key "+
|
|
460
|
+
k),g=!1)}return g}function Ul(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 Vl(a,b){return a&&b}P("shaka.util.ConfigUtils",Sl);Sl.convertToConfigObject=Ul;Sl.mergeConfigObjects=Tl;function Wl(){}function Xl(a){a=nd(a);return(new rc(a)).wb}function Yl(a,b,c){function d(h){Eb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ab(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new R(2,6,6015);var e;"string"==typeof b?e=pd(b,!0):e=b;a=nd(a);a=pd(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Zl(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=nd(a).split("skd://").pop();return Yl(a,c,b)}
|
|
461
|
+
function $l(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}P("shaka.util.FairPlayUtils",Wl);Wl.commonFairPlayResponse=function(a,b){if(2===a){try{var c=id(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Bb(vd(c)))}};Wl.expressplayFairPlayRequest=function(a,b){$l(a,b)};
|
|
462
|
+
Wl.conaxFairPlayRequest=function(a,b){$l(a,b)};Wl.ezdrmFairPlayRequest=function(a,b){$l(a,b)};Wl.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Ab(b.body),a=ud(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=od("spc="+a))};Wl.expressplayInitDataTransform=function(a,b,c){return Zl(a,b,c)};
|
|
463
|
+
Wl.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=nd(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Db(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Yl(a,d,b)};Wl.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=nd(a).split(";").pop();return Yl(a,c,b)};Wl.verimatrixInitDataTransform=function(a,b,c){return Zl(a,b,c)};Wl.initDataTransform=Yl;
|
|
464
|
+
Wl.defaultGetContentId=Xl;Wl.isFairPlaySupported=function(){var a;return L(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},ra(b,2),C(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);va(b);return b.return(!1)})};function am(){}
|
|
465
|
+
function bm(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Qf(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(k,l,m){fd()&&"skd"==l&&(l=m.serverCertificate,m=Xl(k),k=Yl(k,m,l));return k},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Qc(),minHdcpVersion:"",ignoreDuplicateInitData:!Uc()};
|
|
466
466
|
(Qc()||$c())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;Uc()||Tc()||Rc("Tizen 4")||Rc("Tizen 5")||Rc("Tizen 6")||Wc()||Vc()&&53===Xc()||Vc()&&68===Xc()||!(!Yc()||Yc()&&Rc("Android")||Yc()&&Rc("Fuchsia"))||(navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform&&navigator.platform.toLowerCase().includes("windows"))&&navigator.userAgent.match(/Edge?\//)||(c="smooth",d=!0);d={retryParameters:Qf(),
|
|
467
467
|
availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey",
|
|
468
|
-
"urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"},manifestPreprocessor:
|
|
469
|
-
defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:Tc()||Uc()||Wc()||$c()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:
|
|
470
|
-
"79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var e={retryParameters:Qf(),failureCallback:function(k){return
|
|
468
|
+
"urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"},manifestPreprocessor:cm,manifestPreprocessorTXml:dm,sequenceMode:!1,enableAudioGroups:!1,multiTypeVariantsAllowed:d,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,
|
|
469
|
+
defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:Tc()||Uc()||Wc()||$c()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:cm,manifestPreprocessorTXml:dm,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
|
|
470
|
+
"79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var e={retryParameters:Qf(),failureCallback:function(k){return Vl([k])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,
|
|
471
471
|
autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:!1,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1,liveSyncMinLatency:0,liveSyncMinPlaybackRate:.95,liveSyncPanicMode:!1,liveSyncPanicThreshold:60,allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,
|
|
472
|
-
vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,infiniteLiveStreamDuration:!1,loadTimeout:30};if(Vc()||Sc()||Yc()||bd())e.stallSkip=0;var f={trackSelectionCallback:function(k){return L(function(l){return l.return(k)})},downloadSizeCallback:function(k){var l;return L(function(m){if(1==m.g)return navigator.storage&&navigator.storage.estimate?C(m,navigator.storage.estimate(),3):m.return(!0);l=m.h;return m.return(l.usage+k<.95*l.quota)})},progressCallback:function(k,l){return
|
|
472
|
+
vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,infiniteLiveStreamDuration:!1,loadTimeout:30};if(Vc()||Sc()||Yc()||bd())e.stallSkip=0;var f={trackSelectionCallback:function(k){return L(function(l){return l.return(k)})},downloadSizeCallback:function(k){var l;return L(function(m){if(1==m.g)return navigator.storage&&navigator.storage.estimate?C(m,navigator.storage.estimate(),3):m.return(!0);l=m.h;return m.return(l.usage+k<.95*l.quota)})},progressCallback:function(k,l){return Vl([k,
|
|
473
473
|
l])},usePersistentLicense:!0,numberOfParallelDownloads:5};a={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,
|
|
474
|
-
clearBufferSwitch:!1,safeMarginSwitch:0};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(k){return
|
|
474
|
+
clearBufferSwitch:!1,safeMarginSwitch:0};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(k){return Vl([k],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(k,l){return Vl([k,l])}};var g=!1;if(Vc()||Sc()||Yc()||bd()||ad()||$c()||Qc())g=!0;var h={drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,abrFactory:function(){return new of},abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",
|
|
475
475
|
preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25},
|
|
476
|
-
textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1,skipPlayDetection:g}};f.trackSelectionCallback=function(k){return L(function(l){return l.return(
|
|
477
|
-
function
|
|
478
|
-
function
|
|
479
|
-
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=u(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Jd&&"image"!=c.type||b.push(c);return b}function
|
|
480
|
-
function
|
|
481
|
-
function
|
|
482
|
-
r.start=function(){var a=this;(function(){var b;return L(function(c){switch(c.g){case 1:return C(c,Promise.resolve(),2);case 2:return ra(c,3),C(c,
|
|
483
|
-
if(a.Ta){var d=a.g.abrFactory;a.s=d;a.i=d();a.i.configure(a.g.abr)}if(a.cb){d=a.h.presentationTimeline.R();var e=lf(a.h.variants);e=a.o.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.pa=e,e.video&&
|
|
484
|
-
r.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new T("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function
|
|
485
|
-
function
|
|
486
|
-
function
|
|
487
|
-
Promise.resolve(),7);case 7:a.dispatchEvent(f),F(g)}})}r.configure=function(a,b){a=
|
|
488
|
-
function
|
|
489
|
-
r.destroy=function(){var a=this,b,c,d;return L(function(e){switch(e.g){case 1:a.A=!0;if(!a.j||a.ea){e.u(2);break}return C(e,a.j.stop(),2);case 2:if(!a.i||a.ba){e.u(4);break}return C(e,a.i.stop(),4);case 4:a.F&&!a.qa&&a.F.release();if(!a.l||a.da){e.u(6);break}return C(e,a.l.destroy(),6);case 6:if(0<a.I.size&&!a.sa)for(b=u(a.I.values()),c=b.next();!c.done;c=b.next())d=c.value,
|
|
490
|
-
function
|
|
491
|
-
"regionremove",function(d){c.g.delete(d.region)})}na(
|
|
492
|
-
function
|
|
476
|
+
textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1,skipPlayDetection:g}};f.trackSelectionCallback=function(k){return L(function(l){return l.return(em(k,h.preferredAudioLanguage,h.preferredVideoHdrLevel))})};return h}
|
|
477
|
+
function fm(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Tl(a,b,c||bm(),d,"")}
|
|
478
|
+
function em(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=ye(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return re(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
|
|
479
|
+
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=u(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Jd&&"image"!=c.type||b.push(c);return b}function cm(a){return Vl([a],a)}function dm(a){return Vl([a],a)}P("shaka.util.PlayerConfiguration",am);am.mergeConfigObjects=fm;am.createDefault=bm;function gm(a,b,c,d,e){bg.call(this);this.K=a;this.T=b;this.Ra=e.networkingEngine;this.Y=d;this.o=null;this.Qb=c;this.ta=0;this.lb=e.oc;this.B=e.Uh;this.mb=e.Vh;this.g=e.config;this.j=this.C=this.h=null;this.ea=!1;this.F=e.ei;this.qa=!1;this.l=null;this.da=!1;this.i=this.s=null;this.ba=!1;this.I=new Map;this.sa=!1;this.Sa=e.di;this.aa=new Sk;this.m=new Sf;this.L=null;this.A=!1;this.cb=e.Xg;this.pa=null;this.Ta=e.Wg;this.N=!1;this.H=[];this.G=[]}na(gm,bg);
|
|
480
|
+
function hm(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function im(a){if(a.G)for(var b=u(a.G),c=b.next();!c.done;c=b.next())c=c.value,c();a.G=null}function jm(a,b){a.L=b;a.N=!0;if(a.H){b=u(a.H);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.H=null}r=gm.prototype;r.getStartTime=function(){return this.Y};r.ad=function(){return this.K};r.Ue=function(){return this.h};function km(a){a.ba=!0;return a.i}function lm(a){a.ea=!0;return a.j}function mm(a){a.qa=!0;return a.F}r.getStats=function(){return this.aa};
|
|
481
|
+
function nm(a){a.da=!0;return a.l}function om(a){a.sa=!0;return a.I}
|
|
482
|
+
r.start=function(){var a=this;(function(){var b;return L(function(c){switch(c.g){case 1:return C(c,Promise.resolve(),2);case 2:return ra(c,3),C(c,pm(a),5);case 5:return qm(a),C(c,rm(a),6);case 6:qm(a);a.o||(a.o=new Cf(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,a.g.manifest.dash.enableAudioGroups));
|
|
483
|
+
if(a.Ta){var d=a.g.abrFactory;a.s=d;a.i=d();a.i.configure(a.g.abr)}if(a.cb){d=a.h.presentationTimeline.R();var e=lf(a.h.variants);e=a.o.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.pa=e,e.video&&sm(a,e.video,d),e.audio&&sm(a,e.audio,d)}return C(c,void 0,7);case 7:qm(a);a.m.resolve();ta(c,0);break;case 3:b=va(c),a.m.reject(b),F(c)}})})()};r.dispatchEvent=function(a){return this.L?this.L.dispatchEvent(a):bg.prototype.dispatchEvent.call(this,a)};
|
|
484
|
+
r.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new T("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function qm(a){if(a.A)throw new R(2,7,7003);}function tm(a,b){a.dispatchEvent(new T("onstatechange",(new Map).set("state",b)))}
|
|
485
|
+
function pm(a){var b,c,d,e,f;return L(function(g){if(1==g.g){tm(a,"manifest-parser");a.j||(a.C=li(a.K,a.T),a.j=a.C(),a.j.configure(a.g.manifest));b=Date.now()/1E3;tm(a,"manifest");if(a.h)return g.u(2);c=a;return C(g,a.j.start(a.K,a.mb),3)}2!=g.g&&(c.h=g.h);d=new T("manifestparsed",void 0);a.dispatchEvent(d);if(0==a.h.variants.length)throw new R(2,4,4036);um(a.h);e=Date.now()/1E3;f=e-b;a.aa.F=f;F(g)})}
|
|
486
|
+
function rm(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:tm(a,"drm-engine");a.ta=Date.now()/1E3;a.l=a.lb();a.B.g=a.l;a.l.configure(a.g.drm);var h=a.B;b=Ge(a.h.variants,h.h.restrictions,h.i);if(!b){g.u(2);break}c=new T("trackschanged",void 0);return C(g,Promise.resolve(),3);case 3:qm(a),a.dispatchEvent(c);case 2:return d=lf(a.h.variants),C(g,xh(a.l,d,a.h.offlineSessionIds),4);case 4:return qm(a),C(g,fi(a.B,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new T("trackschanged",void 0);return C(g,
|
|
487
|
+
Promise.resolve(),7);case 7:a.dispatchEvent(f),F(g)}})}r.configure=function(a,b){a=Ul(a,b);fm(this.g,a)};r.getConfiguration=function(){return ze(this.g)};
|
|
488
|
+
function sm(a,b,c){var d,e,f,g,h;L(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new Tk(d,b,function(l,m,n){return Cl(l,m,n||null,a.g.streaming.retryParameters,a.Ra)}),a.I.set(b.id,e),C(k,b.createSegmentIndex(),2);f=a.Y||0;(h=(g=b.segmentIndex.xb(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.ca&&Wk(e,h.ca):Vk(e,h.startTime));F(k)})}r.Gi=function(){return this.m};
|
|
489
|
+
r.destroy=function(){var a=this,b,c,d;return L(function(e){switch(e.g){case 1:a.A=!0;if(!a.j||a.ea){e.u(2);break}return C(e,a.j.stop(),2);case 2:if(!a.i||a.ba){e.u(4);break}return C(e,a.i.stop(),4);case 4:a.F&&!a.qa&&a.F.release();if(!a.l||a.da){e.u(6);break}return C(e,a.l.destroy(),6);case 6:if(0<a.I.size&&!a.sa)for(b=u(a.I.values()),c=b.next();!c.done;c=b.next())d=c.value,bl(d);F(e)}})};
|
|
490
|
+
function um(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}P("shaka.media.PreloadManager",gm);gm.prototype.destroy=gm.prototype.destroy;gm.prototype.waitForFinish=gm.prototype.Gi;function vm(a,b){bg.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{lc:null,kc:wm,$b:function(d,e){return xm(c,"enter",d,e)}},{lc:ym,kc:wm,$b:function(d,e){return xm(c,"enter",d,e)}},{lc:zm,kc:wm,$b:function(d,e){return xm(c,"enter",d,e)}},{lc:wm,kc:ym,$b:function(d,e){return xm(c,"exit",d,e)}},{lc:wm,kc:zm,$b:function(d,e){return xm(c,"exit",d,e)}},{lc:ym,kc:zm,$b:function(d,e){return xm(c,"skip",d,e)}},{lc:zm,kc:ym,$b:function(d,e){return xm(c,"skip",d,e)}}];this.h=new db;this.h.D(this.i,
|
|
491
|
+
"regionremove",function(d){c.g.delete(d.region)})}na(vm,bg);vm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;bg.prototype.release.call(this)};vm.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=u(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?ym:a>d.endTime?zm:wm;this.g.set(d,f);for(var g=u(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.lc==e&&h.kc==f&&h.$b(d,b)}}};
|
|
492
|
+
function xm(a,b,c,d){b=new T(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var ym=1,wm=2,zm=3;function Nm(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:var n=(new rc(a)).Ma.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Om[d])return m.return(e);f=0;g=jg([a],c);ra(m,2);g.method="HEAD";return C(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ta(m,3);break;case 2:k=va(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return C(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
|
|
493
493
|
e.toLowerCase().split(";").shift():"")}})}
|
|
494
|
-
var
|
|
494
|
+
var Om={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function Pm(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Pm(g,a)}).join("");var c=[],d=700<=a.fontWeight,e="italic"==a.fontStyle,f=a.textDecoration.includes("underline");d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Qm(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Qm(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=u(h);h=k.next().value;k=k.next().value;
|
|
495
495
|
return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
|
|
496
|
-
function
|
|
497
|
-
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function
|
|
498
|
-
r.append=function(a){var b=
|
|
499
|
-
c.indexOf(g)});a=u(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};r.destroy=function(){this.g&&(
|
|
500
|
-
function
|
|
501
|
-
function
|
|
502
|
-
|
|
503
|
-
r.append=function(a){var b=[].concat(y(this.h)),c={};a=u(a);for(var d=a.next();!d.done;c={ud:c.ud},d=a.next())c.ud=d.value,b.some(function(e){return function(f){return $b(f,e.ud)}}(c))||this.h.push(c.ud);
|
|
504
|
-
r.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});
|
|
505
|
-
function
|
|
506
|
-
p.startTime?q.startTime-p.startTime:q.endTime-p.endTime});h=u(h);for(k=h.next();!k.done;k=h.next())d=a.i.get(k.value),d.ec?(d.ec.contains(c)&&d.ec.removeChild(c),c.appendChild(d.ec),d.ec.appendChild(d.De)):c.appendChild(d.De)}}function
|
|
507
|
-
function
|
|
496
|
+
function Qm(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
|
|
497
|
+
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function Rm(a,b){var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,y(Rm(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Pm(d,b);c.push(e)}return c};function Sm(a,b){this.g=null;for(var c=u(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,d.mode="disabled",d.label==b&&(this.g=d);this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}r=Sm.prototype;r.configure=function(){};r.remove=function(a,b){if(!this.g)return!1;Tm(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
498
|
+
r.append=function(a){var b=Rm(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=u(b);for(var e=b.next();!e.done;d={nc:d.nc},e=b.next())d.nc=e.value,a.some(function(f){return function(g){return g.startTime==f.nc.startTime&&g.endTime==f.nc.endTime&&g.text==f.nc.payload?!0:!1}}(d))||(e=Um(d.nc))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
|
|
499
|
+
c.indexOf(g)});a=u(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};r.destroy=function(){this.g&&(Tm(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
|
|
500
|
+
function Um(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
|
|
501
|
+
function Tm(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=u(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}P("shaka.text.SimpleTextDisplayer",Sm);Sm.prototype.setTextVisibility=Sm.prototype.setTextVisibility;Sm.prototype.isTextVisible=Sm.prototype.isTextVisible;Sm.prototype.destroy=Sm.prototype.destroy;Sm.prototype.append=Sm.prototype.append;Sm.prototype.remove=Sm.prototype.remove;Sm.prototype.configure=Sm.prototype.configure;function Vm(){}r=Vm.prototype;r.configure=function(){};r.remove=function(){};r.append=function(){};r.destroy=function(){};r.isTextVisible=function(){return!1};r.setTextVisibility=function(){};P("shaka.text.StubTextDisplayer",Vm);Vm.prototype.setTextVisibility=Vm.prototype.setTextVisibility;Vm.prototype.isTextVisible=Vm.prototype.isTextVisible;Vm.prototype.destroy=Vm.prototype.destroy;Vm.prototype.append=Vm.prototype.append;Vm.prototype.remove=Vm.prototype.remove;Vm.prototype.configure=Vm.prototype.configure;function Wm(){}function Xm(a){for(;a.firstChild;)a.removeChild(a.firstChild)}P("shaka.util.Dom",Wm);Wm.removeAllChildren=Xm;function Ym(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.s=b;this.l=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.s.appendChild(this.g);c&&c.captionsUpdatePeriod||pb("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.C=(new Mc(function(){d.A.paused||
|
|
502
|
+
Zm(d)})).Pa(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new db;this.j.D(document,"fullscreenchange",function(){Zm(d,!0)});this.j.D(this.A,"seeking",function(){Zm(d,!0)});this.j.D(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){Zm(d,!0)}),this.o.observe(this.g));this.B=new Map}r=Ym.prototype;r.configure=function(a){this.C&&this.C.Pa(a.captionsUpdatePeriod)};
|
|
503
|
+
r.append=function(a){var b=[].concat(y(this.h)),c={};a=u(a);for(var d=a.next();!d.done;c={ud:c.ud},d=a.next())c.ud=d.value,b.some(function(e){return function(f){return $b(f,e.ud)}}(c))||this.h.push(c.ud);Zm(this)};r.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
|
|
504
|
+
r.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});Zm(this,c>this.h.length);return!0};r.isTextVisible=function(){return this.m};r.setTextVisibility=function(a){this.m=a};function $m(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
505
|
+
function an(a,b,c,d,e){var f=!1,g=[],h=[];b=u(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Og:null;l&&(g.push(l.De),l.ec&&g.push(l.ec),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?$m(a,n)||(f=!0):(bn(a,k,e),l=a.i.get(k),n=l.Og,f=!0));0<k.nestedCues.length&&n&&an(a,k.nestedCues,n,d,e);e.pop()}if(f){d=u(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(q,p){return q.startTime!=
|
|
506
|
+
p.startTime?q.startTime-p.startTime:q.endTime-p.endTime});h=u(h);for(k=h.next();!k.done;k=h.next())d=a.i.get(k.value),d.ec?(d.ec.contains(c)&&d.ec.removeChild(c),c.appendChild(d.ec),d.ec.appendChild(d.De)):c.appendChild(d.De)}}function Zm(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=u(a.B.values());for(var d=b.next();!d.done;d=b.next())Xm(d.value);Xm(a.g);a.i.clear();a.B.clear()}a.m&&an(a,a.h,a.g,c,[])}}
|
|
507
|
+
function bn(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&cn(a,f,b,c,d);c=null;if(b.region&&b.region.id){c=b.region;e=a.l===4/3?2.5:1.9;var g=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==gc?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==gc?"%":"px");if(a.B.has(g))c=a.B.get(g);else{var h=document.createElement("span"),k=c.heightUnits==gc?"%":"px",l=c.widthUnits==
|
|
508
508
|
gc?"%":"px",m=c.viewportAnchorUnits==gc?"%":"px";h.id="shaka-text-region---"+g;h.classList.add("shaka-text-region");h.style.position="absolute";2===c.heightUnits&&2===c.widthUnits?(h.style.height=5.33*c.height+"%",h.style.width=c.width*e+"%"):(h.style.height=c.height+k,h.style.width=c.width+l);2===c.viewportAnchorUnits?(k=c.viewportAnchorY/75*100,l=c.viewportAnchorX/(a.l===4/3?160:210)*100,k-=c.regionAnchorY*c.height*5.33/100,l-=c.regionAnchorX*c.width*e/100,h.style.top=k+"%",h.style.left=l+"%"):
|
|
509
509
|
(h.style.top=c.viewportAnchorY-c.regionAnchorY*c.height/100+m,h.style.left=c.viewportAnchorX-c.regionAnchorX*c.width/100+m);h.style.display="flex";h.style.flexDirection="column";h.style.alignItems="center";h.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.B.set(g,h);c=h}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,
|
|
510
|
-
{De:f,Og:e,ec:c})}function
|
|
511
|
-
function
|
|
512
|
-
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=
|
|
513
|
-
1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=
|
|
514
|
-
c.writingMode==Tb?(f.width="100%",c.lineAlign==Vb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Vb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Vb?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==Tb?f.paddingLeft=c.position:f.paddingTop=c.position);a=
|
|
510
|
+
{De:f,Og:e,ec:c})}function dn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Pb?c:"left"===a||"start"===a&&b===Rb||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Rb?"line-right":"center"}
|
|
511
|
+
function cn(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=en(c.linePadding,c,a.s);f.paddingRight=en(c.linePadding,c,a.s);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
|
|
512
|
+
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=fn(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=fn(d,function(m){return m.fontFamily}))&&(l.style.fontFamily=b);k&&(l.textContent=k)}h&&!d[d.length-
|
|
513
|
+
1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=en(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==Ub&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",
|
|
514
|
+
c.writingMode==Tb?(f.width="100%",c.lineAlign==Vb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Vb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Vb?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==Tb?f.paddingLeft=c.position:f.paddingTop=c.position);a=dn(c);"line-left"==a?f.cssFloat="left":"line-right"==a&&(f.cssFloat="right");
|
|
515
515
|
f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Tb?f.width=c.size+"%":f.height=c.size+"%")}
|
|
516
|
-
function
|
|
517
|
-
|
|
518
|
-
break;case "right":g.push("align:right");break;case Qb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}P("shaka.text.WebVttGenerator",function(){});function
|
|
519
|
-
function
|
|
520
|
-
!0;var f=
|
|
521
|
-
function
|
|
522
|
-
function
|
|
523
|
-
function
|
|
524
|
-
function
|
|
525
|
-
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function
|
|
526
|
-
function
|
|
527
|
-
r.getBandwidthEstimate=function(a){var b=this.eg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function
|
|
528
|
-
|
|
529
|
-
this.s=null;this.sa=new Cf(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferSpatialAudio,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.preferredVideoLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.Sa=this.h.preferredTextLanguage;this.Zc=this.h.preferredTextRole;this.Yc=this.h.preferForcedSubs;this.Xc=[];b&&b(this);this.T=
|
|
530
|
-
this.G=
|
|
531
|
-
function
|
|
532
|
-
r.destroy=function(){var a=this,b,c,d,e,f;return L(function(g){switch(g.g){case 1:if(a.l==
|
|
533
|
-
a.G.destroy(),5);case 5:a.G=null;case 4:a.o&&(a.o.release(),a.o=null),bg.prototype.release.call(a),F(g)}})};function
|
|
534
|
-
r.Sc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:if(c.l==
|
|
535
|
-
}})};r.Yg=function(a){this.wg=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return L(function(c){if(1==c.g){if(b.l==
|
|
536
|
-
r.ic=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return L(function(q){switch(q.g){case 1:return c.l!=
|
|
537
|
-
if(!c.I){q.u(6);break}return C(q,c.I.stop(),7);case 7:c.I=null,c.Ra=null;case 6:if(!c.o){q.u(8);break}return C(q,c.o.stop(),8);case 8:if(!c.j){q.u(10);break}return C(q,c.j.destroy(),11);case 11:c.j=null;case 10:c.H&&(c.H.release(),c.H=null);c.C&&(c.C.release(),c.C=null);if(!fd("webkit")||!c.A){q.u(12);break}return C(q,c.A.destroy(),13);case 13:c.A=null;case 12:if(!c.F){q.u(14);break}return C(q,c.F.destroy(),15);case 15:c.F=null;case 14:if(c.B&&!b)c.B.onAssetUnload();c.aa&&(c.aa.g=null);c.g&&
|
|
516
|
+
function en(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function fn(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}P("shaka.text.UITextDisplayer",Ym);Ym.prototype.setTextVisibility=Ym.prototype.setTextVisibility;
|
|
517
|
+
Ym.prototype.isTextVisible=Ym.prototype.isTextVisible;Ym.prototype.remove=Ym.prototype.remove;Ym.prototype.destroy=Ym.prototype.destroy;Ym.prototype.append=Ym.prototype.append;Ym.prototype.configure=Ym.prototype.configure;function gn(a,b){function c(f){for(var g=f,h=u(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Rm(a);a="WEBVTT\n\n";d=u(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
|
|
518
|
+
break;case "right":g.push("align:right");break;case Qb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}P("shaka.text.WebVttGenerator",function(){});function hn(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}hn.prototype.configure=function(a){this.g=a};
|
|
519
|
+
function jn(a,b,c){try{if(!a.g.enabled)return b;var d=kn(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=ln;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=mn;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=nn;break a}e=void 0}d.ot=e;d.su=
|
|
520
|
+
!0;var f=on(d);return pn(b,f)}catch(g){return Xa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function kn(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:1,sf:a.m,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
|
|
521
|
+
function qn(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,kn(a));c.pr=a.h.eb();var e=c.ot===rn||c.ot===mn;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);a=sn(a,c);if(d)d=tn(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=on(a);f&&(b.uris=b.uris.map(function(g){return pn(g,f)}))}}}function sn(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b}
|
|
522
|
+
function un(a){if(0===a.type)return vn;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?mn:rn;if("audio"==b)return ln;if("text"==b)return"application/mp4"===a.mimeType?wn:xn}}function yn(a,b){b=a.h.ob()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
|
|
523
|
+
function zn(a,b){b=a.h.ob()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function An(a,b){var c=a.h.Zb();if(!c.length)return NaN;a=c[0];c=u(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case rn:return a.videoBandwidth||NaN;case ln:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
524
|
+
function on(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=u(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"===
|
|
525
|
+
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function tn(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=u(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=on(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
526
|
+
function pn(a,b){if(!b||a.includes("offline:"))return a;a=new rc(a);a.g.set("CMCD",b);return a.toString()}var nn="m",ln="a",rn="v",mn="av",vn="i",xn="c",wn="tt";P("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Qg:"s",OTHER:"o"});function Bn(a){this.h=a;this.g=null}r=Bn.prototype;r.configure=function(a){this.h=a};r.fg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Cn)?1E3*this.g.get(Cn):null};r.eg=function(){return this.h.enabled&&this.g&&this.g.has(Dn)?1E3*this.g.get(Dn):null};r.yh=function(){return this.h.enabled&&this.g&&this.g.has(En)?this.g.get(En):null};r.zh=function(){return this.h.enabled&&this.g&&this.g.has(Fn)?this.g.get(Fn):null};
|
|
527
|
+
r.getBandwidthEstimate=function(a){var b=this.eg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Gn(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}P("shaka.util.CmsdManager",Bn);Bn.prototype.getBandwidthEstimate=Bn.prototype.getBandwidthEstimate;Bn.prototype.getRoundTripTime=Bn.prototype.zh;Bn.prototype.getResponseDelay=Bn.prototype.yh;Bn.prototype.getEstimatedThroughput=Bn.prototype.eg;
|
|
528
|
+
Bn.prototype.getMaxBitrate=Bn.prototype.fg;var Dn="etp",Cn="mb",En="rd",Fn="rtt";function Hn(){this.g=null;this.h=[]}function In(a,b){return L(function(c){if(1==c.g)return a.g?C(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;F(c)})}Hn.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){bg.call(this);var c=this;this.l=Jn;this.Rd=this.g=null;this.da=!1;this.Yd=new db;this.Qb=new db;this.m=new db;this.ta=new db;this.C=this.F=this.A=this.G=null;this.ce=0;this.Y=new Hn;this.ea=this.kf=this.qa=this.i=this.Ra=this.I=this.j=this.lb=this.K=this.wg=this.aa=this.T=this.mb=this.L=this.Td=this.H=this.cb=null;this.Ta=!1;this.pa=this.o=null;this.uf=1E9;this.$c=[];this.N=NaN;this.h=Kn(this);this.ba={width:Infinity,height:Infinity};this.Pd=new ei(this.h,this.ba,null);this.nf=[];
|
|
529
|
+
this.s=null;this.sa=new Cf(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferSpatialAudio,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.preferredVideoLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);this.Sa=this.h.preferredTextLanguage;this.Zc=this.h.preferredTextRole;this.Yc=this.h.preferForcedSubs;this.Xc=[];b&&b(this);this.T=Ln(this);this.aa=new Bn(this.h.cmsd);
|
|
530
|
+
this.G=Mn(this);this.G.Ef(this.h.streaming.forceHTTPS);this.B=null;Nn&&(this.B=Nn(),this.B.configure(this.h.ads));this.Yd.D(window,"online",function(){On(c);c.xf()});this.Ud=new Mc(function(){return Pn(c)});a&&(pb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Sc(a,!0))}na(X,bg);function Qn(a){null!=a.K&&(tj(a.K),a.K.release(),a.K=null)}
|
|
531
|
+
function Rn(a,b){b.lcevc.enabled?(Qn(a),null==a.K&&(a.K=new sj(a.g,a.wg,b.lcevc),a.F&&(a.F.T=a.K))):Qn(a)}function Sn(a,b){return new T(a,b)}r=X.prototype;
|
|
532
|
+
r.destroy=function(){var a=this,b,c,d,e,f;return L(function(g){switch(g.g){case 1:if(a.l==Tn)return g.return();Qn(a);b=a.detach();a.l=Tn;return C(g,b,2);case 2:c=[];d=u(a.nf);for(e=d.next();!e.done;e=d.next())f=e.value,f.A||c.push(f.destroy());a.nf=[];return C(g,Promise.all(c),3);case 3:a.Yd&&(a.Yd.release(),a.Yd=null);a.Qb&&(a.Qb.release(),a.Qb=null);a.m&&(a.m.release(),a.m=null);a.ta&&(a.ta.release(),a.ta=null);a.pa=null;a.h=null;a.s=null;a.Rd=null;a.T=null;a.aa=null;if(!a.G){g.u(4);break}return C(g,
|
|
533
|
+
a.G.destroy(),5);case 5:a.G=null;case 4:a.o&&(a.o.release(),a.o=null),bg.prototype.release.call(a),F(g)}})};function Un(a,b){a.dispatchEvent(Sn("onstatechange",(new Map).set("state",b)))}
|
|
534
|
+
r.Sc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:if(c.l==Tn)throw new R(2,7,7E3);d=c.g&&c.g==a;if(!c.g||c.g==a){g.u(2);break}return C(g,c.detach(),2);case 2:return C(g,Vn(c,"attach"),4);case 4:if(g.h)return g.return();ra(g,5,6);d||(Un(c,"attach"),e=function(){var h=Wn(c);h&&Xn(c,h)},c.Qb.D(a,"error",e),c.g=a);if(!b||!Nc()||c.F){g.u(6);break}return C(g,Yn(c),6);case 6:xa(g);c.Y.release();ya(g,0);break;case 5:return f=va(g),C(g,c.detach(),10);case 10:throw f;
|
|
535
|
+
}})};r.Yg=function(a){this.wg=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return L(function(c){if(1==c.g){if(b.l==Tn)throw new R(2,7,7E3);return C(c,b.ic(!1,a),2)}if(3!=c.g)return C(c,Vn(b,"detach"),3);if(c.h)return c.return();try{b.g&&(b.Qb.ib(),b.g=null),Un(b,"detach"),b.B&&!a&&b.B.release()}finally{b.Y.release()}F(c)})};function Vn(a,b){var c;return L(function(d){return 1==d.g?(c=++a.ce,C(d,In(a.Y,b),2)):c!=a.ce?(a.Y.release(),d.return(!0)):d.return(!1)})}
|
|
536
|
+
r.ic=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n;return L(function(q){switch(q.g){case 1:return c.l!=Tn&&(c.l=Jn),C(q,Vn(c,"unload"),2);case 2:if(q.h)return q.return();sa(q,3);c.Ta=!1;Un(c,"unload");a&&!Nc()&&(a=!1);Qn(c);d=c.Xc.map(function(p){return p()});c.Xc=[];return C(q,Promise.all(d),5);case 5:c.dispatchEvent(Sn("unloading"));c.mb&&(c.mb.release(),c.mb=null);c.g&&(c.m.ib(),c.ta.ib());c.Ud.stop();c.cb&&(c.cb.release(),c.cb=null);c.Td&&(c.Td.stop(),c.Td=null);
|
|
537
|
+
if(!c.I){q.u(6);break}return C(q,c.I.stop(),7);case 7:c.I=null,c.Ra=null;case 6:if(!c.o){q.u(8);break}return C(q,c.o.stop(),8);case 8:if(!c.j){q.u(10);break}return C(q,c.j.destroy(),11);case 11:c.j=null;case 10:c.H&&(c.H.release(),c.H=null);c.C&&(c.C.release(),c.C=null);if(!fd("webkit")||!c.A){q.u(12);break}return C(q,c.A.destroy(),13);case 13:c.A=null;case 12:if(!c.F){q.u(14);break}return C(q,c.F.destroy(),15);case 15:c.F=null;case 14:if(c.B&&!b)c.B.onAssetUnload();c.aa&&(c.aa.g=null);c.g&&Xm(c.g);
|
|
538
538
|
if(!c.g||!c.g.src){q.u(16);break}return C(q,new Promise(function(p){return(new Mc(p)).U(.1)}),17);case 17:c.g.removeAttribute("src"),c.g.load();case 16:if(!c.A){q.u(18);break}return C(q,c.A.destroy(),19);case 19:c.A=null;case 18:c.qa=null;c.kf=null;c.L=null;if(c.i){e=u(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=u([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=u(c.i.textStreams);for(k=m.next();!k.done;k=m.next())n=k.value,
|
|
539
|
-
n.segmentIndex&&n.segmentIndex.release()}c.i=null;c.s=new
|
|
540
|
-
r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,q,p,t,w,x;return L(function(z){switch(z.g){case 1:if(d.l==
|
|
541
|
-
2),C(A,
|
|
542
|
-
z.h)?(
|
|
543
|
-
e.getConfiguration();d.Pd=e.B;d.Ra=e.C;d.I=
|
|
544
|
-
function(){}),"function"!=typeof d.o.setCmsdManager&&(pb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(pb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){})),t=
|
|
545
|
-
k(function(){return L(function(v){return C(v,
|
|
546
|
-
function
|
|
547
|
-
r.Bi=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:d=null;if(!(c.i&&c.I&&c.Ra&&c.qa)){g.u(2);break}e=c.g.currentTime;c.R()&&(e=null);f=Date.now()/1E3;return C(g,
|
|
548
|
-
r.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return L(function(f){if(1==f.g)return C(f
|
|
549
|
-
function
|
|
550
|
-
filter:function(I){var E,H;return L(function(K){if(1==K.g)return C(K,fi(t,I),2);if(4!=K.g){E=K.h;if(!E)return K.u(0);H=
|
|
539
|
+
n.segmentIndex&&n.segmentIndex.release()}c.i=null;c.s=new Sk;c.tf=null;c.$c=[];c.N=NaN;Zn(c);case 3:xa(q);c.Y.release();ya(q,4);break;case 4:if(a&&Nc()&&!c.F)return C(q,Yn(c),0);q.u(0)}})};r.Fi=function(a){this.ea=a};
|
|
540
|
+
r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,q,p,t,w,x;return L(function(z){switch(z.g){case 1:if(d.l==Tn)throw new R(2,7,7E3);e=null;f="";a instanceof gm?(e=a,f=e.ad()||""):f=a||"";return C(z,In(d.Y,"load"),2);case 2:d.Y.release();if(!d.g)throw new R(2,7,7002);if(!d.qa){z.u(3);break}return C(z,d.ic(!1),3);case 3:g=++d.ce;h=function(){return L(function(v){if(1==v.g)return d.ce==g?v.u(0):e?C(v,e.destroy(),3):v.u(3);throw new R(2,7,7E3);})};k=function(v,B){return L(function(A){switch(A.g){case 1:return sa(A,
|
|
541
|
+
2),C(A,In(d.Y,B),4);case 4:return C(A,h(),5);case 5:return C(A,v(),6);case 6:return C(A,h(),7);case 7:e&&d.h&&(e.g=d.h);case 2:xa(A),d.Y.release(),ya(A,0)}})};ra(z,5,6);null==b&&e&&(b=e.getStartTime());d.ea=b;d.Ta=!1;d.dispatchEvent(Sn("loading"));if(e){c=e.T;z.u(8);break}if(c){z.u(8);break}return C(z,k(function(){return L(function(v){if(1==v.g)return C(v,$n(d,f),2);c=v.h;F(v)})},"guessMimeType_"),8);case 8:l=!!e;if(e){jm(e,d);d.s=e.getStats();z.u(11);break}return C(z,ao(d,f,b,c,!0),12);case 12:(e=
|
|
542
|
+
z.h)?(jm(e,d),d.s=e.getStats(),e.start(),e.m.catch(function(){})):d.s=new Sk;case 11:m=!e;n=e?e.Qb:Date.now()/1E3;d.s=e?e.getStats():new Sk;d.qa=f;d.kf=c||null;if(m)return C(z,k(function(){return L(function(v){return C(v,bo(d,c),0)})},"initializeSrcEqualsDrmInner_"),20);if(d.F){z.u(15);break}return C(z,k(function(){return L(function(v){return C(v,Yn(d),0)})},"initializeMediaSourceEngineInner_"),15);case 15:return C(z,k(function(){return L(function(v){return C(v,e.m,0)})},"waitForFinish"),17);case 17:d.h=
|
|
543
|
+
e.getConfiguration();d.Pd=e.B;d.Ra=e.C;d.I=lm(e);d.mb=mm(e);d.lb=e.Sa;d.i=e.Ue();if(q=e.o)d.sa=q;l&&d.g&&"AUDIO"===d.g.nodeName&&(co(d),d.configure("manifest.disableVideo",!0));d.A=nm(e);return C(z,k(function(){return L(function(v){return C(v,d.A.Sc(d.g),0)})},"drmEngine_.attach"),18);case 18:return!(p=e.s)||d.pa&&d.pa==p||(d.o=km(e),d.pa=e.s,"function"!=typeof d.o.setMediaElement&&(pb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=
|
|
544
|
+
function(){}),"function"!=typeof d.o.setCmsdManager&&(pb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(pb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){})),t=om(e),w=e.pa,C(z,k(function(){return L(function(v){return C(v,eo(d,n,w,t),0)})},"loadInner_"),19);case 19:im(e);z.u(14);break;case 20:return C(z,
|
|
545
|
+
k(function(){return L(function(v){return C(v,fo(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(Sn("loaded"));case 6:xa(z);if(!e){z.u(22);break}return C(z,e.destroy(),22);case 22:ya(z,0);break;case 5:x=va(z);if(7E3==x.code){z.u(24);break}return C(z,d.ic(!1),24);case 24:throw x;}})};
|
|
546
|
+
function co(a){for(var b=u(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}
|
|
547
|
+
r.Bi=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f;return L(function(g){switch(g.g){case 1:d=null;if(!(c.i&&c.I&&c.Ra&&c.qa)){g.u(2);break}e=c.g.currentTime;c.R()&&(e=null);f=Date.now()/1E3;return C(g,go(c,c.qa,e,c.kf,f,!0,!1,!1),3);case 3:var h=d=g.h,k=c.I,l=c.Ra;h.h=c.i;h.j=k;h.C=l;h=d;k=c.pa;h.i=c.o;h.s=k;d.o=c.sa;d.start();c.i=null;c.I=null;c.Ra=null;c.o=null;c.pa=null;case 2:return C(g,c.ic(a,b),4);case 4:return g.return(d)}})};
|
|
548
|
+
r.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return L(function(f){if(1==f.g)return C(f,ao(d,a,b,c),2);(e=f.h)?e.start():Xn(d,new R(2,7,7005));return f.return(e)})};function ao(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return L(function(l){if(1==l.g)return f=Date.now()/1E3,d?l.u(2):C(l,$n(a,b),3);2!=l.g&&(d=l.h);if(g=ho(a,d))return l.return(null);h=!1;k=!0;e&&(a.o&&a.pa==a.h.abrFactory&&(k=!1),a.g&&"AUDIO"===a.g.nodeName&&(h=!0));return l.return(go(a,b,c,d||null,f,!e,h,k))})}
|
|
549
|
+
function go(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,q,p,t,w,x,z,v,B,A,D,G;return L(function(J){if(1==J.g)return k=null,l=ze(a.h),g&&(l.manifest.disableVideo=!0),m=function(){return k.N&&k.A?null:k},n=function(){return m()?m().getConfiguration():a.h},q=function(I,E){m()?k.configure(I,E):a.configure(I,E)},Infinity!=a.ba.width||Infinity!=a.ba.height?J.u(2):C(J,gd(),3);2!=J.g&&(p=J.h,a.ba.width=p.width,a.ba.height=p.height);t=new ei(l,a.ba,null);w={networkingEngine:a.G,
|
|
550
|
+
filter:function(I){var E,H;return L(function(K){if(1==K.g)return C(K,fi(t,I),2);if(4!=K.g){E=K.h;if(!E)return K.u(0);H=Sn("trackschanged");return C(K,Promise.resolve(),4)}k.dispatchEvent(H);F(K)})},makeTextStreamsForClosedCaptions:function(I){return io(a,I)},onTimelineRegionAdded:function(I){var E=k.F;a:{var H=u(E.g);for(var K=H.next();!K.done;K=H.next())if(K=K.value,K.schemeIdUri==I.schemeIdUri&&K.id==I.id&&K.startTime==I.startTime&&K.endTime==I.endTime){H=K;break a}H=null}null==H&&(E.g.add(I),I=
|
|
551
551
|
new T("regionadd",new Map([["region",I]])),E.dispatchEvent(I))},onEvent:function(I){return k.dispatchEvent(I)},onError:function(I){return k.onError(I)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return n().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){q("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&k.N&&a.j.updateDuration()},newDrmInfo:function(I){var E=k.l,H=E?E.g:null;H&&E.s&&hi(t,H.keySystem,I)},onManifestUpdated:function(){var I=
|
|
552
|
-
(new Map).set("isLive",a.R());k.dispatchEvent(
|
|
553
|
-
I.quality;I=I.position;E=(new Map).set("mediaQuality",{bandwidth:E.bandwidth,audioSamplingRate:E.audioSamplingRate,codecs:E.codecs,contentType:E.contentType,frameRate:E.frameRate,height:E.height,mimeType:E.mimeType,channelsCount:E.channelsCount,pixelAspectRatio:E.pixelAspectRatio,width:E.width}).set("position",I);a.dispatchEvent(
|
|
552
|
+
(new Map).set("isLive",a.R());k.dispatchEvent(Sn("manifestupdated",I));hm(k,!1,function(){if(a.B)a.B.onManifestUpdated(a.R())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};x=new el(function(){return a.Ib()});x.addEventListener("regionadd",function(I){var E=I.region;jo(a,"timelineregionadded",E,k);hm(k,!1,function(){if(a.B)a.B.onDashTimedMetadata(E)})});z=null;l.streaming.observeQualityChanges&&(z=new fl(function(){return a.ob()}),z.addEventListener("qualitychange",function(I){var E=
|
|
553
|
+
I.quality;I=I.position;E=(new Map).set("mediaQuality",{bandwidth:E.bandwidth,audioSamplingRate:E.audioSamplingRate,codecs:E.codecs,contentType:E.contentType,frameRate:E.frameRate,height:E.height,mimeType:E.mimeType,channelsCount:E.channelsCount,pixelAspectRatio:E.pixelAspectRatio,width:E.width}).set("position",I);a.dispatchEvent(Sn("mediaqualitychanged",E))}));v=!0;B={zb:a.G,onError:function(I){return k.onError(I)},fe:function(I){hm(k,!0,function(){a:{var E=I,H=Sn("keystatuschanged");a.dispatchEvent(H);
|
|
554
554
|
var K=Object.keys(E);1==K.length&&""==K[0]&&(K=["00"],E={"00":E[""]});H=1==K.length&&"00"==K[0];var M=!1;if(K.length){K=u(a.i.variants);for(var N=K.next();!N.done;N=K.next()){N=N.value;var O=[];N.audio&&O.push(N.audio);N.video&&O.push(N.video);O=u(O);for(var S=O.next();!S.done;S=O.next()){var V=S.value;S=N.allowedByKeySystem;if(V.keyIds.size){N.allowedByKeySystem=!0;V=u(V.keyIds);for(var Q=V.next();!Q.done;Q=V.next())if(Q=Q.value,(Q=E[H?"00":Q])||a.A.F)N.allowedByKeySystem=N.allowedByKeySystem&&!!Q&&
|
|
555
|
-
!ji.includes(Q)}S!=N.allowedByKeySystem&&(M=!0)}}}if(M&&(
|
|
556
|
-
Xg:f,Wg:h};k=new
|
|
557
|
-
function
|
|
558
|
-
function
|
|
559
|
-
function
|
|
560
|
-
|
|
561
|
-
q.value)&&!p.segmentIndex&&l.push(p.createSegmentIndex());if(!(0<l.length)){E.u(2);break}return C(E,Promise.all(l),2);case 2:if(a.I&&a.I.onInitialVariantChosen)a.I.onInitialVariantChosen(m);
|
|
562
|
-
x=a.ea||a.g.currentTime;z=w.Wb();v=w.pb();x<z?x=z:x>v&&(x=v);return C(E,
|
|
563
|
-
if((G=a.R())&&(a.h.streaming.liveSync||a.i.serviceDescription||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate)J=function(){return
|
|
564
|
-
function
|
|
555
|
+
!ji.includes(Q)}S!=N.allowedByKeySystem&&(M=!0)}}}if(M&&(ko(a),!lo(a)))break a;(E=a.j.j)&&!E.allowedByKeySystem&&mo(a)}})},onExpirationUpdated:function(I,E){var H=Sn("expirationupdated");k.dispatchEvent(H);if((H=k.j)&&H.onExpirationUpdated)H.onExpirationUpdated(I,E)},onEvent:function(I){k.dispatchEvent(I);"drmsessionupdate"==I.type&&v&&(v=!1,I=Date.now()/1E3-k.ta,(a.s||k.getStats()).j=I,a.K&&tj(a.K))}};A=Mn(a,m);ig(a.G,A);D=function(){return a.oc(B)};G={config:l,Vh:w,ei:x,di:z,oc:D,Uh:t,networkingEngine:A,
|
|
556
|
+
Xg:f,Wg:h};k=new gm(b,d,e,c,G);a.nf.push(k);return J.return(k)})}function $n(a,b){var c,d;return L(function(e){if(1==e.g)return c=a.h.manifest.retryParameters,C(e,Nm(b,a.G,c),2);d=e.h;"application/x-mpegurl"==d&&Zc()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
|
|
557
|
+
function ho(a,b){if(!Nc())return!0;if(b){if(""==(a.g||Pc()).canPlayType(b))return!1;if(!(Nc()&&b in mi))return!0;if(ce(b)){if(a.h.streaming.preferNativeHls)return!0;if(Zc()&&(a.h.drm.servers["com.apple.fps"]||a.h.drm.servers["com.apple.fps.1_0"]))return a.h.streaming.useNativeHlsForFairPlay;if(Zc())return a.h.streaming.useNativeHlsOnSafari}}return!1}
|
|
558
|
+
function Yn(a){var b,c,d,e,f;return L(function(g){if(1==g.g)return Un(a,"media-source"),b=a.h.textDisplayFactory,c=b(),c.configure?c.configure(a.h.textDisplayer):pb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.tf=b,d=no(a.g,c,function(h,k,l){oo(a,h,k,l)},a.K),d.configure(a.h.mediaSource),e=a.h.manifest,f=e.segmentRelativeVttTiming,d.ba=f,C(g,d.L,2);a.F=d;F(g)})}
|
|
559
|
+
function eo(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,G,J,I;return L(function(E){switch(E.g){case 1:Un(a,"load");e=a.g;a.H=new Jk({Md:function(){return e.playbackRate},Tb:function(){return e.defaultPlaybackRate},Ff:function(H){e.playbackRate=H},qg:function(H){e.currentTime+=H}});f=function(){return po(a)};g=function(){return qo(a)};a.m.D(e,"playing",f);a.m.D(e,"pause",f);a.m.D(e,"ended",f);a.m.D(e,"ratechange",g);Rn(a,a.h);a.Sa=a.h.preferredTextLanguage;a.Zc=a.h.preferredTextRole;a.Yc=a.h.preferForcedSubs;
|
|
560
|
+
ro(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.o.init(function(H,K,M){a.i&&a.j&&H!=a.j.j&&so(a,H,!0,void 0===K?!1:K,void 0===M?0:M)});a.o.setMediaElement(e);a.o.setCmsdManager(a.aa);a.j=to(a);a.j.configure(a.h.streaming);a.l=uo;e.textTracks&&a.m.D(e.textTracks,"addtrack",function(H){if(H.track)switch(H=H.track,H.kind){case "chapters":vo(a,H)}});a.dispatchEvent(Sn("streaming"));h=c;(k=a.j.j)||h||(h=wo(a,!0));l=[];m=k||h;n=u([m.video,m.audio]);for(q=n.next();!q.done;q=n.next())(p=
|
|
561
|
+
q.value)&&!p.segmentIndex&&l.push(p.createSegmentIndex());if(!(0<l.length)){E.u(2);break}return C(E,Promise.all(l),2);case 2:if(a.I&&a.I.onInitialVariantChosen)a.I.onInitialVariantChosen(m);ro(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);t=function(H){a.C=xo(a,H);a.cb=yo(a,H);zo(a,e,Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal))};a.h.streaming.startAtSegmentBoundary||t(a.ea);if(k){E.u(4);break}if(!a.h.streaming.startAtSegmentBoundary){E.u(5);break}w=a.i.presentationTimeline;
|
|
562
|
+
x=a.ea||a.g.currentTime;z=w.Wb();v=w.pb();x<z?x=z:x>v&&(x=v);return C(E,Ao(h,x),6);case 6:B=E.h,t(B);case 5:so(a,h,!0,!1,0);case 4:return a.C.we(),A=a.tc().find(function(H){return H.active}),A||((D=mf(a.i.textStreams,a.Sa,a.Zc,a.Yc)[0]||null)&&Rk(a.s.h,D,!0),h&&(D?(h.audio&&Bo(a,h.audio,D)&&(a.da=!0),a.da&&a.F.F.setTextVisibility(!0),Co(a)):a.da=!1),D&&(a.h.streaming.alwaysStreamText||a.$e())&&yl(a.j,D)),C(E,a.j.start(d),7);case 7:a.h.abr.enabled&&(a.o.enable(),Do(a));ko(a);lo(a);a.i.variants.some(function(H){return H.primary});
|
|
563
|
+
if((G=a.R())&&(a.h.streaming.liveSync||a.i.serviceDescription||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate)J=function(){return Eo(a)},a.m.D(e,"timeupdate",J);G||(I=function(){return Fo(a)},a.m.D(e,"timeupdate",I),Fo(a));if(a.B)a.B.onManifestUpdated(G);a.Ta=!0;a.m.na(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});F(E)}})}
|
|
564
|
+
function bo(a,b){var c,d,e,f,g;return L(function(h){return 1==h.g?(c=Ld,d=Date.now()/1E3,e=!0,a.A=a.oc({zb:a.G,onError:function(k){Xn(a,k)},fe:function(){},onExpirationUpdated:function(){var k=Sn("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.A.configure(a.h.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
565
565
|
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?Xd(b):"",codecs:b?Yd(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.fa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set},g.fullMimeTypes.add(Nd(g.mimeType,
|
|
566
566
|
g.codecs)),b.startsWith("audio/")?(g.type=c.S,f.audio=g):f.video=g,a.A.ba=!0,C(h,xh(a.A,[f],[]),2)):C(h,a.A.Sc(a.g),0)})}
|
|
567
|
-
function
|
|
568
|
-
"ratechange",h),"none"!=d.preload&&a.m.na(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return
|
|
569
|
-
a.m.D(d.textTracks,"change",function(){return
|
|
570
|
-
"change",z);(new Mc(z)).U(1)}),2);if(e)return x.return();
|
|
571
|
-
l]),2);if((m=a.R())&&(a.h.streaming.liveSync||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate)n=function(){return
|
|
572
|
-
function
|
|
573
|
-
function
|
|
574
|
-
function
|
|
575
|
-
function
|
|
576
|
-
function
|
|
577
|
-
|
|
578
|
-
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}
|
|
579
|
-
if(p.segmentIndex&&m){var x=p.segmentIndex.xb(m.endTime,!0,0>t);if(x){var z=x.next().value;if(z&&z!=m){if(!Mb(m.$(),z.$())){var v=z.$()[0],B=f.uris[0],A=new URL(v),D=new URL(B);if(A.origin!==D.origin)var G=v;else{for(var J=A.pathname.split("/").slice(1),I=D.pathname.split("/").slice(1,-1);J[0]===I[0];)J.shift(),I.shift();for(;I.length;)I.shift(),J.unshift("..");G=J.join("/")}n.nor=G}if((z.Aa||z.ja)&&(m.Aa!=z.Aa||m.ja!=z.ja)){var E=z.Aa+"-";z.ja&&(E+=z.ja);n.nrr=E}}}var H=h.h.eb()||1,K=
|
|
580
|
-
500,M=p.bandwidth;var N=M?M*(m.endTime-m.startTime)/1E3/(K/H/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(N)||(n.rtp=N)}}q&&n.ot!==
|
|
581
|
-
function
|
|
582
|
-
function
|
|
583
|
-
function
|
|
584
|
-
function
|
|
585
|
-
function
|
|
586
|
-
function
|
|
587
|
-
f);a.dispatchEvent(
|
|
588
|
-
return d},ai:function(b,c,d){
|
|
589
|
-
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=
|
|
567
|
+
function fo(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;return L(function(t){if(1==t.g)return Un(a,"src-equals"),d=a.g,a.C=new zk(d),e=!1,a.Xc.push(function(){e=!0}),null!=a.ea&&a.C.xe(a.ea),a.H=new Jk({Md:function(){return d.playbackRate},Tb:function(){return d.defaultPlaybackRate},Ff:function(w){d.playbackRate=w},qg:function(w){d.currentTime+=w}}),f=a.h.streaming.rebufferingGoal,zo(a,d,f),g=function(){return po(a)},h=function(){return qo(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
|
|
568
|
+
"ratechange",h),"none"!=d.preload&&a.m.na(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return ko(a)}),a.m.D(d.audioTracks,"removetrack",function(){return ko(a)}),a.m.D(d.audioTracks,"change",function(){return ko(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "metadata":Go(a,w);break;case "chapters":vo(a,w);break;default:ko(a)}}),a.m.D(d.textTracks,"removetrack",function(){return ko(a)}),
|
|
569
|
+
a.m.D(d.textTracks,"change",function(){return ko(a)})),d.src=jn(a.T,a.qa,c),(Sc()||Vc())&&d.load(),"none"!=d.preload&&!d.autoplay&&ce(c)&&cd()&&d.load(),a.l=Ho,a.dispatchEvent(Sn("streaming")),k=new Sf,qk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.we();k.resolve()}),qk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var w;return L(function(x){if(1==x.g)return Io(a),w=Jo(a),w.find(function(z){return"disabled"!=z.mode})?(0<w.length&&(a.da=!0),x.u(2)):C(x,new Promise(function(z){a.m.na(d.textTracks,
|
|
570
|
+
"change",z);(new Mc(z)).U(1)}),2);if(e)return x.return();Ko(a);F(x)})}),d.error?k.reject(Wn(a)):"none"==d.preload&&(Va('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),k.resolve()),a.m.na(d,"error",function(){k.reject(Wn(a))}),l=new Promise(function(w,x){(new Mc(x)).U(a.h.streaming.loadTimeout)}),C(t,Promise.race([k,
|
|
571
|
+
l]),2);if((m=a.R())&&(a.h.streaming.liveSync||a.h.streaming.liveSyncPanicMode)||a.h.streaming.vodDynamicPlaybackRate)n=function(){return Eo(a)},a.m.D(d,"timeupdate",n);m||(q=function(){return Fo(a)},a.m.D(d,"timeupdate",q),Fo(a));a.B&&(a.B.onManifestUpdated(m),m&&(p=a.Ib().end,a.m.D(d,"progress",function(){var w=a.Ib().end;p!=w&&(a.B.onManifestUpdated(a.R()),p=w)})));a.Ta=!0;F(t)})}function Io(a){var b=a.h.preferredAudioLanguage;""!=b&&a.yg(b,a.h.preferredVariantRole)}
|
|
572
|
+
function Ko(a){var b=a.h.preferredTextLanguage;""!=b&&a.Af(b,a.h.preferredTextRole,a.h.preferForcedSubs)}
|
|
573
|
+
function Go(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.D(b,"cuechange",function(){if(b.activeCues)for(var d=u(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Lo(a,e.startTime,e.endTime,e.type,e.value),a.B)a.B.onCueMetadataChange(e.value)});var c=(new Mc(function(){var d=Mo(a);d=u(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).hc().U(.5);a.Xc.push(function(){c.stop()})}}
|
|
574
|
+
function oo(a,b,c,d){b=u(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=u(e.frames),k=h.next();!k.done;k=h.next())Lo(a,f,g,"org.id3",k.value);if(a.B)a.B.onHlsTimedMetadata(e,f)}}function Lo(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Sn("metadata",b))}
|
|
575
|
+
function vo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Mc(function(){b.mode="hidden"})).hc().U(.5);a.Xc.push(function(){c.stop()})}}r.ii=function(){for(var a=this.Y;a.g;)a.release()};r.oc=function(a){return new qh(a)};
|
|
576
|
+
function Mn(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?hm(b(),!0,e):e()}b||(b=function(){return null});return new eg(function(e,f,g,h){var k=b()?b().i:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(Sn("downloadheadersreceived",f));d(function(){if(a.aa){var h=a.aa;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
|
|
577
|
+
Gn(n[1]))}}catch(x){}if(l=e["cmsd-dynamic"]){try{var q=new Map,p=l.split(";");for(l=1;l<p.length;l++){var t=p[l].split("=");q.set(t[0],Gn(t[1]))}var w=q}catch(x){w=null}w&&(h.g=w)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(Sn("downloadfailed",e))},function(e,f,g){d(function(){var h=a.T,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)qn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
|
|
578
|
+
"d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}qn(h,f,{ot:nn,su:!h.i})}}catch(O){Xa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",O)}break;case pg:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.R()?"l":"v"};n.ot=un(k);var q=n.ot===rn||n.ot===ln||n.ot===mn||n.ot===wn,p=k.stream;if(p){var t=h.h.eb();if(q&&(n.bl=yn(h,p.type),n.ot!==wn)){var w=zn(h,p.type);n.dl=t?w/Math.abs(t):w}p.bandwidth&&(n.br=p.bandwidth/1E3);
|
|
579
|
+
if(p.segmentIndex&&m){var x=p.segmentIndex.xb(m.endTime,!0,0>t);if(x){var z=x.next().value;if(z&&z!=m){if(!Mb(m.$(),z.$())){var v=z.$()[0],B=f.uris[0],A=new URL(v),D=new URL(B);if(A.origin!==D.origin)var G=v;else{for(var J=A.pathname.split("/").slice(1),I=D.pathname.split("/").slice(1,-1);J[0]===I[0];)J.shift(),I.shift();for(;I.length;)I.shift(),J.unshift("..");G=J.join("/")}n.nor=G}if((z.Aa||z.ja)&&(m.Aa!=z.Aa||m.ja!=z.ja)){var E=z.Aa+"-";z.ja&&(E+=z.ja);n.nrr=E}}}var H=h.h.eb()||1,K=zn(h,p.type)||
|
|
580
|
+
500,M=p.bandwidth;var N=M?M*(m.endTime-m.startTime)/1E3/(K/H/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(N)||(n.rtp=N)}}q&&n.ot!==wn&&(n.tb=An(h,n.ot)/1E3);qn(h,f,n)}}catch(O){Xa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",O)}break;case 2:case 5:case 6:qn(h,f,{ot:"k"});break;case 4:qn(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.I)&&e.banLocation&&e.banLocation(h)},function(e,f){f.data&&(e=f.data.byteLength,f=b()?b().getStats():a.s)&&(f.Ed=isNaN(f.Ed)?e:f.Ed+e)})}
|
|
581
|
+
function xo(a,b){return new Ak(a.g,a.i,a.h.streaming,b,function(){a.cb&&Mk(a.cb,!0);a.j&&a.j.od();a.L&&No(a)},function(c){return a.dispatchEvent(c)})}
|
|
582
|
+
function yo(a,b){b=new vm(a.mb,a.R()||0<b);b.addEventListener("enter",function(d){jo(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){jo(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(jo(a,"timelineregionenter",e),jo(a,"timelineregionexit",e))});var c=new Lk(a.g);c.g.add(b);a.lb&&c.g.add(a.lb);return c}
|
|
583
|
+
function zo(a,b,c){a.L=new Lf;a.L.g=Nf;Of(a.L,c,Math.min(.5,c/2));Zn(a);a.Td=(new Mc(function(){No(a)})).Pa(.25);a.m.D(b,"waiting",function(){return No(a)});a.m.D(b,"stalled",function(){return No(a)});a.m.D(b,"canplaythrough",function(){return No(a)});a.m.D(b,"progress",function(){return No(a)})}
|
|
584
|
+
function No(a){switch(a.l){case Ho:if(a.g.ended)var b=!0;else{var c=Bi(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case uo:a:if(a.g.ended||Kj(a.F))b=!0;else{if(a.i.presentationTimeline.R()){c=a.i.presentationTimeline.Hb();var d=Bi(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Di(a.g.buffered,a.g.currentTime);c=a.L;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Mf:Nf;c.g=d;(b=b!=d)&&d===Mf&&(c.h=Date.now());b&&Zn(a)}function no(a,b,c,d){return new Bj(a,b,c,d)}
|
|
585
|
+
function Ln(a){return new hn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},ob:function(){return a.ob()},getCurrentTime:function(){return a.g?a.g.currentTime:0},eb:function(){return a.eb()},Vb:function(){return a.Vb()},Zb:function(){return a.Zb()},R:function(){return a.R()}},a.h.cmcd)}
|
|
586
|
+
function to(a){return new kl(a.i,{Ld:function(){return a.C?a.C.Dd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},eb:function(){return a.eb()},W:a.F,zb:a.G,onError:function(b){return Xn(a,b)},onEvent:function(b){return a.dispatchEvent(b)},$h:function(){a.I&&a.I.update&&a.I.update()},mf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type;if(a.C){a.C.rg();var g=Lj(a.F,f);!a.R()&&a.g.paused&&null!=g&&0<g&&a.C.Dd()<g&&a.C.xe(g)}No(a);d=(new Map).set("start",d).set("end",e).set("contentType",
|
|
587
|
+
f);a.dispatchEvent(Sn("segmentappended",d));a.o&&c.fastSwitching&&b.md&&b.Wd&&a.o.trySuggestStreams()},Zh:function(b,c){(c=c.gf)&&a.lb&&hl(a.lb,c,b)},Sf:function(b,c){var d=a.A;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){c=new Og(Ab(c));var e=0,f=u(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=u(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Gh(d,"cenc",e);d=d.l}}else d=Promise.resolve();
|
|
588
|
+
return d},ai:function(b,c,d){oo(a,b,c,d)},Jd:function(b,c){return a.Jd(b,c)}})}
|
|
589
|
+
r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ul(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(pb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(pb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
590
590
|
a.streaming&&"useNativeHlsOnSafari"in a.streaming&&pb("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){pb("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var c=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return c};delete a.mediaSource.sourceBufferExtraFeatures}a.streaming&&
|
|
591
591
|
a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2),void 0==a.streaming.updateIntervalSeconds&&(a.streaming.updateIntervalSeconds=.1),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=
|
|
592
|
-
100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.retryParameters&&(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&(a.drm.retryParameters.baseDelay=100));var d=
|
|
593
|
-
function
|
|
594
|
-
c.configure(a.h.textDisplayer):pb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.F,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.tf=b;a.j&&(b=a.j,(c=b.i.get(Jd))&&
|
|
595
|
-
b/2)));a.i&&
|
|
596
|
-
r.cg=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Ib().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.mi=function(){for(var a in this.h)delete this.h[a];
|
|
592
|
+
100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.retryParameters&&(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&(a.drm.retryParameters.baseDelay=100));var d=fm(this.h,a,Kn(this));Oo(this);return d};
|
|
593
|
+
function Oo(a){a.Pd=new ei(a.h,a.ba,a.A);if(a.I){var b=ze(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.A&&a.A.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{a.l!=Tn&&gi(a.Pd,a.i)&&ko(a)}catch(f){Xn(a,f)}a.o&&lo(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||mo(a)}a.G&&a.G.Ef(a.h.streaming.forceHTTPS);if(a.F)if(a.F.configure(a.h.mediaSource),a.F.ba=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.tf!=b){var c=b();c.configure?
|
|
594
|
+
c.configure(a.h.textDisplayer):pb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.F,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.tf=b;a.j&&(b=a.j,(c=b.i.get(Jd))&&wl(b,c.stream,!0,0,!0))}else b=a.F.F,b.configure&&b.configure(a.h.textDisplayer);a.o&&(a.o.configure(a.h.abr),a.h.abr.enabled?a.o.enable():a.o.disable(),Do(a));a.L&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Of(a.L,b,Math.min(.5,
|
|
595
|
+
b/2)));a.i&&ro(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B&&a.B.configure(a.h.ads);a.T&&a.T.configure(a.h.cmcd);a.aa&&a.aa.configure(a.h.cmsd)}r.getConfiguration=function(){var a=Kn(this);fm(a,this.h,Kn(this));return a};
|
|
596
|
+
r.cg=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Ib().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.mi=function(){for(var a in this.h)delete this.h[a];fm(this.h,Kn(this),Kn(this));Oo(this)};r.rh=function(){return this.l};r.Ve=function(){return this.i?this.i.type:null};r.uh=function(){return this.g};
|
|
597
597
|
r.Vb=function(){return this.G};r.ad=function(){return this.qa};r.bg=function(){return this.B?this.B:null};r.R=function(){return this.i?this.i.presentationTimeline.R():this.g&&this.g.src?Infinity==this.g.duration:!1};r.ac=function(){return this.i?this.i.presentationTimeline.ac():!1};r.Lh=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
|
|
598
598
|
r.Ib=function(){if(this.i){if(!this.Ta&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Wb(),end:a.pb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.Ih=function(){this.R()&&(this.g.currentTime=this.Ib().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.A?this.A.g:null};r.cd=function(){return this.A?this.A.cd():Infinity};
|
|
599
599
|
r.Te=function(){return this.A?this.A.Te():[]};r.Kd=function(){return this.A?this.A.Kd():{}};r.Ye=function(){return this.L?this.L.g==Nf:!1};r.eb=function(){return this.g?this.H?this.H.i:1:0};
|
|
600
|
-
r.sd=function(a){var b=this;0==a?
|
|
601
|
-
r.Tc=function(){var a=this.H.Tb();this.l==
|
|
600
|
+
r.sd=function(a){var b=this;0==a?Va("A trick play rate of 0 is unsupported!"):(this.ta.ib(),this.g.paused&&this.g.play(),this.H.set(a),this.l==uo&&(this.o.playbackRateChanged(a),vl(this.j,1<Math.abs(a))),this.R()&&this.ta.D(this.g,"timeupdate",function(){var c=b.g.currentTime,d=b.Ib(),e=b.h.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.Tc():Math.floor(c)<=Math.floor(d.start+e)&&b.Tc()}))};
|
|
601
|
+
r.Tc=function(){var a=this.H.Tb();this.l==Ho&&this.H.set(a);this.l==uo&&(this.H.set(a),this.o.playbackRateChanged(a),vl(this.j,!1));this.ta.ib()};
|
|
602
602
|
r.Zb=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=u(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,kf(e)){var f=Ye(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return jf(g)}):[]};
|
|
603
|
-
r.tc=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=u(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Ze(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?
|
|
604
|
-
r.ih=function(a){var b=this,c,d,e,f;return L(function(g){if(1==g.g){if(b.l!=
|
|
605
|
-
function
|
|
606
|
-
r.hg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A;return L(function(D){if(1==D.g){if(c.l!=
|
|
603
|
+
r.tc=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=u(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Ze(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Jo(this).map(function(f){return gf(f)}):[]};r.ph=function(){var a=this.$c;this.i&&(a=this.i.imageStreams);return a.map(function(b){return $e(b)})};
|
|
604
|
+
r.ih=function(a){var b=this,c,d,e,f;return L(function(g){if(1==g.g){if(b.l!=uo&&b.l!=Ho)return g.return(null);c=b.$c;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):C(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.qc(function(h){var k=Po(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Rb;for(var l=h.i-h.startTime,m=0;m<k;m++)e.push(b.hg(a,h.startTime+l*m/k))}}),C(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
605
|
+
function Po(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Rb:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
606
|
+
r.hg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A;return L(function(D){if(1==D.g){if(c.l!=uo&&c.l!=Ho)return D.return(null);d=c.$c;c.i&&(d=c.i.imageStreams);return(e=d.find(function(G){return G.id==a}))?e.segmentIndex?D.u(2):C(D,e.createSegmentIndex(),2):D.return(null)}f=e.segmentIndex.find(b);if(null==f)return D.return(null);g=e.segmentIndex.get(f);h=Po(g.tilesLayout||e.tilesLayout);if(!h)return D.return(null);k=e.width||0;l=e.height||0;m=k/h.Rb;n=l/h.rows;q=h.Rb*h.rows;p=g.i-g.startTime;
|
|
607
607
|
t=g.A||p/q;w=g.startTime;z=x=0;1<q&&(v=Math.floor((b-g.startTime)/t),w=g.startTime+v*t,x=v%h.Rb*m,z=Math.floor(v/h.Rb)*n);B=!1;if(A=g.s)B=!0,n=A.height,x=A.positionX,z=A.positionY,m=A.width;return D.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:x,positionY:z,startTime:w,duration:t,uris:g.$(),width:m,sprite:B})})};
|
|
608
|
-
r.zg=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(
|
|
609
|
-
r.Bf=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&&
|
|
610
|
-
Array.from(this.g.audioTracks),b=u(b),c=b.next();!c.done;c=b.next())if(c=c.value,af(c)==a.id){
|
|
608
|
+
r.zg=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(Rk(this.s.h,b,!1),yl(this.j,b),Qo(this),this.Sa=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Jo(this);b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value,af(c)==a.id?c.mode=this.da?"showing":"hidden":c.mode="disabled";Qo(this)}};
|
|
609
|
+
r.Bf=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&&Va("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&&kf(d)&&(so(this,d,!1,b,c),this.sa=new Bf(d,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),lo(this))}else if(this.g&&this.g.audioTracks)for(b=
|
|
610
|
+
Array.from(this.g.audioTracks),b=u(b),c=b.next();!c.done;c=b.next())if(c=c.value,af(c)==a.id){Ro(this,c);break}};r.kh=function(){return So(this.Zb())};r.Bh=function(){return So(this.tc())};r.jh=function(){return Array.from(To(this.Zb()))};r.Ah=function(){return Array.from(To(this.tc()))};
|
|
611
611
|
r.yg=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.C){this.sa=new Cf(a,b||"",c,"",!1,"","","",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;var e=this.sa.create(this.i.variants);c=null;e=u(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||a(c,b)>a(f,
|
|
612
|
-
b))c=f;c?(a=Ye(c),this.Bf(a,!0,d)):
|
|
613
|
-
r.ti=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){for(var d=null,e=u(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.sa=new Cf(d.language,"",0,"",!1,"",a,"",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),
|
|
614
|
-
r.$e=function(){var a=this.da;return this.F&&this.l==
|
|
615
|
-
r.lh=function(a){if(!this.g||!this.g.src||!this.g.textTracks)return[];var b=re(a),c=
|
|
616
|
-
function
|
|
617
|
-
r.Fg=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==
|
|
612
|
+
b))c=f;c?(a=Ye(c),this.Bf(a,!0,d)):mo(this)}else this.g&&this.g.audioTracks&&(d=mf(this.Zb(),a,b||"",!1)[0])&&this.Bf(d)};r.Af=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.Sa=a,this.Zc=b||"",this.Yc=c,(a=mf(this.i.textStreams,this.Sa,this.Zc,this.Yc)[0]||null)&&a!=this.j.s&&(Rk(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.$e()))yl(this.j,a),Qo(this)}else(a=mf(this.tc(),a,b||"",c)[0])&&this.zg(a)};
|
|
613
|
+
r.ti=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){for(var d=null,e=u(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.sa=new Cf(d.language,"",0,"",!1,"",a,"",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),mo(this,b,c))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=u(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&Ro(this,b)}};
|
|
614
|
+
r.$e=function(){var a=this.da;return this.F&&this.l==uo?this.F.F.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Jo(this).some(function(b){return"showing"==b.mode}):a};r.dg=function(){return this.g&&this.g.src&&this.g.textTracks?Uo(this).map(function(a){return gf(a)}):[]};
|
|
615
|
+
r.lh=function(a){if(!this.g||!this.g.src||!this.g.textTracks)return[];var b=re(a),c=Uo(this).filter(function(h){return re(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=u(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=u(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};
|
|
616
|
+
function Jo(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Mo(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Uo(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
617
|
+
r.Fg=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==uo)this.F.F.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.s||(a=mf(this.i.textStreams,this.Sa,this.Zc,this.Yc),0<a.length&&(yl(this.j,a[0]),Qo(this))):ul(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Jo(this);b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Co(this)}};
|
|
618
618
|
r.wh=function(){if(this.C)var a=this.C.Dd();else{if(null==this.ea)return new Date;a=this.ea}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.B||b.i)+a))}return this.g&&this.g.getStartDate?(b=this.g.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};r.gg=function(){if(this.i){var a=this.i.presentationTimeline;return new Date(1E3*(a.B||a.i))}return this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:a):null};
|
|
619
|
-
r.Nd=function(){return this.R()?this.i?this.i.presentationTimeline.Nd():null:null};r.ob=function(){if(this.l==
|
|
620
|
-
r.getStats=function(){if(this.l!=
|
|
621
|
-
this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.s.L=this.C.Of(),this.s.N=this.C.Pf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.K=Number(c.droppedVideoFrames);b.I=d;this.s.H=Number(c.corruptedVideoFrames)}this.A?(c=this.A,c=c.I?c.I:NaN):c=NaN;this.s.s=c;if(this.l==
|
|
622
|
-
NaN,b.o=c.video.width||NaN,b.l=d);this.R()&&(c=this.gg().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.G=this.i.presentationTimeline.g);c=this.o.getBandwidthEstimate();this.s.A=c}this.l==
|
|
619
|
+
r.Nd=function(){return this.R()?this.i?this.i.presentationTimeline.Nd():null:null};r.ob=function(){if(this.l==uo)return this.F.ob();var a={total:[],audio:[],video:[],text:[]};this.l==Ho&&(a.total=Ei(this.g.buffered));return a};
|
|
620
|
+
r.getStats=function(){if(this.l!=uo&&this.l!=Ho)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,bytesDownloaded:NaN,switchHistory:[],stateHistory:[]};po(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=
|
|
621
|
+
this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.s.L=this.C.Of(),this.s.N=this.C.Pf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.K=Number(c.droppedVideoFrames);b.I=d;this.s.H=Number(c.corruptedVideoFrames)}this.A?(c=this.A,c=c.I?c.I:NaN):c=NaN;this.s.s=c;if(this.l==uo){c=this.j.j;b=this.j.s;if(c){d=this.H?this.H.i:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.s.B=e}c&&c.video&&(b=this.s,d=c.video.height||
|
|
622
|
+
NaN,b.o=c.video.width||NaN,b.l=d);this.R()&&(c=this.gg().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.G=this.i.presentationTimeline.g);c=this.o.getBandwidthEstimate();this.s.A=c}this.l==Ho&&(c=this.s,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var f=this.s;a=f.o;c=f.l;b=f.B;d=f.I;e=f.K;var g=f.H,h=f.N,k=f.L,l=f.A,m=f.i,n=f.m,q=f.F,p=f.j,t=Ok(f.g,"playing"),w=Ok(f.g,"paused"),x=Ok(f.g,"buffering"),z=f.s,v=f.C,B=f.G,A=f.Ed,D=Pk(f.g),G=[];
|
|
623
623
|
f=u(f.h.g);for(var J=f.next();!J.done;J=f.next())J=J.value,G.push({timestamp:J.timestamp,id:J.id,type:J.type,fromAdaptation:J.fromAdaptation,bandwidth:J.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:q,drmTimeSeconds:p,playTime:t,pauseTime:w,bufferingTime:x,licenseTime:z,liveLatency:v,maxSegmentDuration:B,bytesDownloaded:A,stateHistory:D,
|
|
624
624
|
switchHistory:G}};
|
|
625
|
-
r.Tg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,q,p,t,w,x,z,v,B;return L(function(A){switch(A.g){case 1:if(h.l!=
|
|
626
|
-
l&&D.label==(f||"")&&D.kind==c}))return
|
|
627
|
-
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:q.ma,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Nd(d||"",e||"")])};v=Nd(z.mimeType,z.codecs);B=ee(v);if(!B)throw new R(2,2,2014,d);h.i.textStreams.push(z);
|
|
628
|
-
r.Ug=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v;return L(function(B){switch(B.g){case 1:if(c.l!=
|
|
625
|
+
r.Tg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,q,p,t,w,x,z,v,B;return L(function(A){switch(A.g){case 1:if(h.l!=uo&&h.l!=Ho)throw new R(1,7,7004);"subtitles"!=c&&"captions"!=c&&Va("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){A.u(2);break}return C(A,Vo(h,a),3);case 3:d=A.h;case 2:k=[];h.B&&(k=h.B.getCuePoints());if(h.l!=Ho){A.u(4);break}g&&(c="forced");return C(A,Wo(h,a,b,c,d,f||"",k),5);case 5:l=re(b);m=h.tc();if(n=m.find(function(D){return re(D.language)==
|
|
626
|
+
l&&D.label==(f||"")&&D.kind==c}))return ko(h),A.return(n);throw new R(1,2,2012);case 4:q=Ld;p=h.g.duration;h.i&&(p=h.i.presentationTimeline.getDuration());if(Infinity==p)throw new R(1,4,4033);if(!k.length){A.u(6);break}return C(A,Xo(h,a,h.G,h.h.streaming.retryParameters),7);case 7:t=A.h,w=Yo(h,t,d,k),x=new Blob([w],{type:"text/vtt"}),a=Ej(x),d="text/vtt";case 6:z={id:h.uf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Hk(0,p,[a]),mimeType:d||"",
|
|
627
|
+
codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:q.ma,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Nd(d||"",e||"")])};v=Nd(z.mimeType,z.codecs);B=ee(v);if(!B)throw new R(2,2,2014,d);h.i.textStreams.push(z);ko(h);return A.return(Ze(z))}})};
|
|
628
|
+
r.Ug=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v;return L(function(B){switch(B.g){case 1:if(c.l!=uo&&c.l!=Ho)throw new R(1,7,7004);if(b){B.u(2);break}return C(B,Vo(c,a),3);case 3:b=B.h;case 2:if("text/vtt"!=b)throw new R(1,2,2017,a);d=Ld;e=c.g.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new R(1,4,4045);return C(B,Xo(c,a,c.G,c.h.streaming.retryParameters),4);case 4:f=B.h;g=fe[b];if(!g)throw new R(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
|
|
629
629
|
vttOffset:0};l=Ab(f);m=h.parseMedia(l,k,a);n=[];q={};p=u(m);for(t=p.next();!t.done;q={Oc:q.Oc,Nb:q.Nb},t=p.next())q.Nb=t.value,q.Oc=null,w=function(A){return function(){null==A.Oc&&(A.Oc=Bd([a],[A.Nb.payload]));return A.Oc||[]}}(q),x=new ti(q.Nb.startTime,q.Nb.endTime,w,0,null,null,0,0,Infinity),q.Nb.payload.includes("#xywh")&&(z=q.Nb.payload.split("#xywh=")[1].split(","),4===z.length&&x.Gg({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],10)})),
|
|
630
|
-
n.push(x);v={id:c.uf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new
|
|
631
|
-
"","")])};c.l==
|
|
632
|
-
r.Sg=function(a,b,c){var d=this,e,f,g,h;return L(function(k){switch(k.g){case 1:if(d.l!=
|
|
633
|
-
2,2012);}})};function
|
|
634
|
-
function
|
|
635
|
-
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function
|
|
636
|
-
function
|
|
637
|
-
r.Ue=function(){
|
|
638
|
-
function
|
|
639
|
-
function
|
|
630
|
+
n.push(x);v={id:c.uf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Fk(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.ve,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Nd(b||
|
|
631
|
+
"","")])};c.l==Ho?c.$c.push(v):c.i.imageStreams.push(v);ko(c);return B.return($e(v))}})};
|
|
632
|
+
r.Sg=function(a,b,c){var d=this,e,f,g,h;return L(function(k){switch(k.g){case 1:if(d.l!=uo&&d.l!=Ho)throw new R(1,7,7004);if(c){k.u(2);break}return C(k,Vo(d,a),3);case 3:c=k.h;case 2:return e=[],d.B&&(e=d.B.getCuePoints()),C(k,Wo(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.dg();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return C(k,new Promise(function(l,m){d.m.na(f,"load",l);d.m.na(f,"error",function(){m(new R(1,2,2015))})}),6);case 6:return ko(d),k.return(h);case 5:throw new R(1,
|
|
633
|
+
2,2012);}})};function Vo(a,b){var c;return L(function(d){switch(d.g){case 1:return ra(d,2),C(d,Nm(b,a.G,a.h.streaming.retryParameters),4);case 4:c=d.h;ta(d,3);break;case 2:va(d);case 3:if(c)return d.return(c);throw new R(1,2,2011,b);}})}
|
|
634
|
+
function Wo(a,b,c,d,e,f,g){var h,k,l,m;return L(function(n){if(1==n.g)return"text/vtt"!=e||g.length?C(n,Xo(a,b,a.G,a.h.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=Yo(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Ej(l),e="text/vtt");m=document.createElement("track");var q=a.T,p=b;try{if(q.g.enabled){var t=kn(q);t.ot=xn;t.su=!0;var w=on(t);var x=pn(p,w)}else x=p}catch(z){Xa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",z),x=p}m.src=x;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
|
|
635
|
+
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function Xo(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){e=pg;f=jg([b],d);f.method="GET";var k=a.T;try{k.g.enabled&&qn(k,f,{ot:xn,su:!0})}catch(l){Xa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return C(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
636
|
+
function Yo(a,b,c,d){var e=fe[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Ab(b),b=c.parseMedia(b,a,null),gn(b,d);throw new R(2,2,2014,c);}r.yi=function(a,b){this.ba.width=a;this.ba.height=b};r.xf=function(a){if(this.l==uo){var b=this.j;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.A)b=!1;else{for(var c=u(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.gd||d.Na||d.ub||(d.gd=!1,tl(b,d,a));b=!0}}else b=!1;return b};
|
|
637
|
+
r.Ue=function(){Va("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};r.sh=function(){return this.Ra};
|
|
638
|
+
function Kn(a){var b=bm();b.streaming.failureCallback=function(c){if(a.R()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.xf(d))}};b.textDisplayFactory=function(){if(a.Rd){var c=a.getConfiguration();return new Ym(a.g,a.Rd,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new Sm(a.g,"Shaka Player TextTrack"):new Vm};return b}r.Jg=function(a){this.Rd=a};
|
|
639
|
+
function io(a,b){for(var c=new Set,d=u(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=u(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=u(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Ik,l=e.closedCaptions.get(g);h={id:a.uf++,originalId:g,groupId:null,
|
|
640
640
|
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Jd,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Nd(h,"")])};b.textStreams.push(h);c.add(g)}}
|
|
641
|
-
function
|
|
642
|
-
function
|
|
643
|
-
function
|
|
644
|
-
function
|
|
645
|
-
g=a.i.serviceDescription.maxPlaybackRate||a.h.streaming.liveSyncPlaybackRate);if(a.h.streaming.liveSync){var h=a.h.streaming.liveSyncMinLatency;var k=a.h.streaming.liveSyncMinPlaybackRate}else a.i&&a.i.serviceDescription&&(h=a.i.serviceDescription.minLatency||a.h.streaming.liveSyncMinLatency,k=a.i.serviceDescription.minPlaybackRate||a.h.streaming.liveSyncMinPlaybackRate);c=e.end-a.g.currentTime;d=0;if(a.l==
|
|
641
|
+
function Ao(a,b){var c,d,e,f,g;return L(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return L(function(p){if(1==p.g)return k?C(p,k.createSegmentIndex(),2):p.return(null);n=(m=k.segmentIndex.xb(l))?m.next().value:null;if(!n)return p.return(null);q=n.startTime;return p.return(q)})},C(h,e(c,b),2);if(3!=h.g)return f=h.h,C(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
|
|
642
|
+
function Zn(a){var b=a.Ye();if(a.s&&a.L&&a.C){var c=a.H;c.j=b;Kk(c);a.T&&(c=a.T,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);po(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Sn("buffering",b))}function qo(a){var b=a.g.playbackRate;0!=b&&(a.H&&a.H.set(b),b=Sn("ratechange"),a.dispatchEvent(b))}
|
|
643
|
+
function po(a){if(a.s&&a.L){var b=a.s.g,c="playing";a.L.g==Nf?c="buffering":a.g.paused?c="paused":a.g.ended&&(c="ended");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(Sn("statechanged",c)))}}
|
|
644
|
+
function Eo(a){var b=a.g.playbackRate,c=a.R();if(a.h.streaming.vodDynamicPlaybackRate&&!c){var d=a.h.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.cg();e<=a.h.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.sd(d):1==e&&b!==a.H.Tb()&&a.Tc()}if(c&&(e=a.Ib(),Number.isFinite(e.end)&&!(a.g.currentTime<e.start))){if(a.h.streaming.liveSync){var f=a.h.streaming.liveSyncMaxLatency;var g=a.h.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(f=a.i.serviceDescription.maxLatency||a.h.streaming.liveSyncMaxLatency,
|
|
645
|
+
g=a.i.serviceDescription.maxPlaybackRate||a.h.streaming.liveSyncPlaybackRate);if(a.h.streaming.liveSync){var h=a.h.streaming.liveSyncMinLatency;var k=a.h.streaming.liveSyncMinPlaybackRate}else a.i&&a.i.serviceDescription&&(h=a.i.serviceDescription.minLatency||a.h.streaming.liveSyncMinLatency,k=a.i.serviceDescription.minPlaybackRate||a.h.streaming.liveSyncMinPlaybackRate);c=e.end-a.g.currentTime;d=0;if(a.l==Ho){var l=a.g.buffered;0<l.length&&(d=l.end(l.length-1),d=Math.max(g,d-e.end))}e=a.h.streaming.liveSyncPanicMode;
|
|
646
646
|
l=1E3*a.h.streaming.liveSyncPanicThreshold;var m=Date.now()-a.L.h;e&&!k&&(k=a.h.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.sd(k):f&&g&&c-d>f?b!=g&&a.sd(g):h&&k&&c-d<h?b!=k&&a.sd(k):b!==a.H.Tb()&&a.Tc()}}
|
|
647
|
-
function
|
|
648
|
-
function
|
|
649
|
-
function
|
|
650
|
-
function
|
|
651
|
-
function
|
|
652
|
-
function
|
|
653
|
-
r.Jd=function(a,b){if(!this.h.abr.enabled||this.l===
|
|
654
|
-
function
|
|
655
|
-
function
|
|
656
|
-
function
|
|
657
|
-
function
|
|
647
|
+
function Fo(a){if(a.g){var b=!1,c=a.g.currentTime/a.g.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.N)?(a.N=c,b=!0):(c=Math.max(a.N,c),a.N!=c&&(a.N=c,b=!0)));if(b){var d;0==a.N?d=Sn("started"):25==a.N?d=Sn("firstquartile"):50==a.N?d=Sn("midpoint"):75==a.N?d=Sn("thirdquartile"):100==a.N&&(d=Sn("complete"));d&&a.dispatchEvent(d)}}}function lo(a){try{ii(a.Pd,a.i)}catch(c){return Xn(a,c),!1}var b=lf(a.i.variants);b=a.sa.create(b);a.o.setVariants(Array.from(b.values()));return!0}
|
|
648
|
+
function wo(a,b){b=void 0===b?!1:b;return lo(a)?a.o.chooseVariant(b):null}
|
|
649
|
+
function Pn(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=u(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,bb("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.Ud.stop();d&&mo(a,!0,void 0,!1,!1)}
|
|
650
|
+
function mo(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f=wo(a);f&&so(a,f,e,b,c,d)}function so(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&xl(a.j,b,d,e,!0);else{var h=a.s.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));xl(a.j,b,d,e,f,c);d=null;g&&(d=Ye(g));b=Ye(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.K&&uj(a.K,b,a.Ve()),c=Sn("adaptation",c),Zo(a,c)):$o(a,d,b)}}
|
|
651
|
+
function Ro(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;c&&(b.id!==c.id&&(c.enabled=!1),c=jf(c),b=jf(b),$o(a,c,b))}function Bo(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=re(a.h.preferredTextLanguage);c=re(c.language);if(2==a.h.autoShowText)return qe(c,d);if(3==a.h.autoShowText)return a=re(b.language),qe(c,d)&&!qe(a,c);Va("Invalid autoShowText setting!");return!1}function ko(a){var b=Sn("trackschanged");Zo(a,b)}
|
|
652
|
+
function $o(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.K&&uj(a.K,c,a.Ve());c=Sn("variantchanged",b);Zo(a,c)}function Qo(a){var b=Sn("textchanged");Zo(a,b)}function Co(a){var b=Sn("texttrackvisibility");Zo(a,b)}function Do(a){a.h.abr.enabled||On(a);var b=(new Map).set("newStatus",a.h.abr.enabled);Zo(a,Sn("abrstatuschanged",b))}function On(a,b){b=void 0===b?!0:b;if(a.l==uo){a.Ud.stop();for(var c=u(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&lo(a)}}
|
|
653
|
+
r.Jd=function(a,b){if(!this.h.abr.enabled||this.l===Tn||!navigator.onLine)return!1;if(this.i.variants.some(function(f){return(f=f[a.type])&&f.id!==a.id?"audio"==a.type?a.language===f.language:!0:!1})){for(var c=u(this.i.variants),d=c.next();!d.done;d=c.next()){d=d.value;var e=d[a.type];e&&e.id===a.id&&(d.disabledUntilTime=Date.now()/1E3+b)}this.Ud.Pa(1);b=this.ob().video.reduce(function(f,g){return f+g.end-g.start},0);mo(this,!0,b,!0,!1);return!0}return!1};
|
|
654
|
+
function Xn(a,b){var c,d,e;return L(function(f){switch(f.g){case 1:if(a.l==Tn)return f.return();c=!0;if(!(a.Ta&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.u(2);break}ra(f,3);return C(f,Rl(a.j),5);case 5:d=f.h;c=!d;ta(f,2);break;case 3:va(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&On(a,!1);e=Sn("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);F(f)}})}
|
|
655
|
+
function jo(a,b,c,d){d=void 0===d?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(Sn(b,a))}function Wn(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new R(2,3,3016,b,c,a.g.error.message)}
|
|
656
|
+
function ro(a,b,c){0<b&&(a.R()||a.Ig(b));b=a.getDuration();c<b&&(a.R()||a.ab(c))}function Zo(a,b){L(function(c){if(1==c.g)return C(c,Promise.resolve(),2);a.l!=Tn&&a.dispatchEvent(b);F(c)})}function To(a){var b=new Set;a=u(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(re(c.language)):b.add("und");return b}
|
|
657
|
+
function So(a){var b=new Map,c=new Map;a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=re(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=u(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=u(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
|
|
658
658
|
h.push({language:l,role:m,label:n})}});return h}P("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.Jg;X.prototype.getManifestParserFactory=X.prototype.sh;X.prototype.getManifest=X.prototype.Ue;X.prototype.retryStreaming=X.prototype.xf;X.prototype.setMaxHardwareResolution=X.prototype.yi;X.prototype.addChaptersTrack=X.prototype.Sg;X.prototype.addThumbnailsTrack=X.prototype.Ug;X.prototype.addTextTrackAsync=X.prototype.Tg;X.prototype.getStats=X.prototype.getStats;
|
|
659
659
|
X.prototype.getBufferedInfo=X.prototype.ob;X.prototype.getSegmentAvailabilityDuration=X.prototype.Nd;X.prototype.getPresentationStartTimeAsDate=X.prototype.gg;X.prototype.getPlayheadTimeAsDate=X.prototype.wh;X.prototype.setTextTrackVisibility=X.prototype.Fg;X.prototype.getChapters=X.prototype.lh;X.prototype.getChaptersTracks=X.prototype.dg;X.prototype.isTextTrackVisible=X.prototype.$e;X.prototype.selectVariantsByLabel=X.prototype.ti;X.prototype.selectTextLanguage=X.prototype.Af;
|
|
660
660
|
X.prototype.selectAudioLanguage=X.prototype.yg;X.prototype.getTextLanguages=X.prototype.Ah;X.prototype.getAudioLanguages=X.prototype.jh;X.prototype.getTextLanguagesAndRoles=X.prototype.Bh;X.prototype.getAudioLanguagesAndRoles=X.prototype.kh;X.prototype.selectVariantTrack=X.prototype.Bf;X.prototype.selectTextTrack=X.prototype.zg;X.prototype.getThumbnails=X.prototype.hg;X.prototype.getAllThumbnails=X.prototype.ih;X.prototype.getImageTracks=X.prototype.ph;X.prototype.getTextTracks=X.prototype.tc;
|
|
@@ -662,692 +662,692 @@ X.prototype.getVariantTracks=X.prototype.Zb;X.prototype.cancelTrickPlay=X.protot
|
|
|
662
662
|
X.prototype.isAudioOnly=X.prototype.Lh;X.prototype.isInProgress=X.prototype.ac;X.prototype.isLive=X.prototype.R;X.prototype.getAdManager=X.prototype.bg;X.prototype.getAssetUri=X.prototype.ad;X.prototype.getNetworkingEngine=X.prototype.Vb;X.prototype.getMediaElement=X.prototype.uh;X.prototype.getManifestType=X.prototype.Ve;X.prototype.getLoadMode=X.prototype.rh;X.prototype.resetConfiguration=X.prototype.mi;X.prototype.getBufferFullness=X.prototype.cg;X.prototype.getConfiguration=X.prototype.getConfiguration;
|
|
663
663
|
X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.ii;X.prototype.preload=X.prototype.preload;X.prototype.unloadAndSavePreload=X.prototype.Bi;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Fi;X.prototype.unload=X.prototype.ic;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.Yg;X.prototype.attach=X.prototype.Sc;
|
|
664
664
|
X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return L(function(h){if(1==h.g)return b={},a?C(h,Zh(),3):h.u(2);2!=h.g&&(b=h.h);var k={};if(Nc())for(var l in mi)k[l]=!0;l=u(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=l.next();!m.done;m=l.next())m=m.value,k[m]=Nc()?!!mi[m]:Oc(m);c=k;l='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(y(Od));
|
|
665
|
-
k={};l=u(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=ee(m)?!0:Nc()?kb(m)||(lc(m)?!0:!1):Oc(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f
|
|
666
|
-
X.isBrowserSupported=function(){window.Promise||
|
|
667
|
-
X.registerSupportPlugin=function(a,b){
|
|
665
|
+
k={};l=u(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=ee(m)?!0:Nc()?kb(m)||(lc(m)?!0:!1):Oc(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=ap;for(g in f)e[g]=f[g]();return h.return(e)})};
|
|
666
|
+
X.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Rc("Trident/"))return!1;var a=cd();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Nc()?!0:Oc("application/x-mpegurl")};X.setAdManagerFactory=function(a){Nn=a};
|
|
667
|
+
X.registerSupportPlugin=function(a,b){ap[a]=b};X.prototype.destroy=X.prototype.destroy;var Tn=0,Jn=1,uo=2,Ho=3;X.LoadMode={DESTROYED:Tn,NOT_LOADED:Jn,MEDIA_SOURCE:uo,SRC_EQUALS:Ho};X.version="v4.8.15";var bp=["4","8"];qb=new function(a){this.g=a;this.i=rb;this.h=sb}(new ob(Number(bp[0]),Number(bp[1])));var ap={},Nn=null;function cp(){this.h=[];this.j=this.i=this.g=0};function dp(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new db;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=dp.prototype;r.getDuration=function(){return this.g.getDuration()};r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i};
|
|
668
668
|
r.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.h.getAdSkippableState()};r.skip=function(){return this.h.skip()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.resume()};r.getVolume=function(){return this.h.getVolume()};r.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
|
|
669
669
|
r.isMuted=function(){return 0==this.h.getVolume()};r.isLinear=function(){return this.g.isLinear()};r.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
|
|
670
670
|
r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
671
|
-
r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};P("shaka.ads.ClientSideAd",
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){
|
|
676
|
-
|
|
677
|
-
function
|
|
678
|
-
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=u(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.m(new T("ad-cue-points-changed",(new Map).set("cuepoints",b)))}
|
|
679
|
-
a.i.offsetHeight,
|
|
680
|
-
function
|
|
681
|
-
function
|
|
682
|
-
function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){
|
|
671
|
+
r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};P("shaka.ads.ClientSideAd",dp);dp.prototype.release=dp.prototype.release;
|
|
672
|
+
dp.prototype.getPodIndex=dp.prototype.getPodIndex;dp.prototype.getTimeOffset=dp.prototype.getTimeOffset;dp.prototype.getMediaUrl=dp.prototype.getMediaUrl;dp.prototype.getAdvertiserName=dp.prototype.getAdvertiserName;dp.prototype.getCreativeAdId=dp.prototype.getCreativeAdId;dp.prototype.getAdId=dp.prototype.getAdId;dp.prototype.getVastMediaWidth=dp.prototype.getVastMediaWidth;dp.prototype.getVastMediaHeight=dp.prototype.getVastMediaHeight;dp.prototype.getVastMediaBitrate=dp.prototype.getVastMediaBitrate;
|
|
673
|
+
dp.prototype.getDescription=dp.prototype.getDescription;dp.prototype.getTitle=dp.prototype.getTitle;dp.prototype.getPositionInSequence=dp.prototype.getPositionInSequence;dp.prototype.getSequenceLength=dp.prototype.getSequenceLength;dp.prototype.setMuted=dp.prototype.setMuted;dp.prototype.resize=dp.prototype.resize;dp.prototype.isLinear=dp.prototype.isLinear;dp.prototype.isMuted=dp.prototype.isMuted;dp.prototype.setVolume=dp.prototype.setVolume;dp.prototype.getVolume=dp.prototype.getVolume;
|
|
674
|
+
dp.prototype.play=dp.prototype.play;dp.prototype.pause=dp.prototype.pause;dp.prototype.skip=dp.prototype.skip;dp.prototype.canSkipNow=dp.prototype.canSkipNow;dp.prototype.getTimeUntilSkippable=dp.prototype.getTimeUntilSkippable;dp.prototype.isSkippable=dp.prototype.isSkippable;dp.prototype.isPaused=dp.prototype.isPaused;dp.prototype.getRemainingTime=dp.prototype.getRemainingTime;dp.prototype.getMinSuggestedDuration=dp.prototype.getMinSuggestedDuration;dp.prototype.getDuration=dp.prototype.getDuration;function ep(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.F=!1;this.A=this.s=null;this.G=NaN;this.m=e;this.j=null;this.h=new db;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.o,this.i);this.C.initialize();this.l=new google.ima.AdsLoader(this.C);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.8.15");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
|
|
675
|
+
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){fp(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){gp(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.na(this.i,"play",function(){f.F=!0})}ep.prototype.configure=function(a){this.s=a};ep.prototype.stop=function(){this.g&&this.g.stop();this.o&&Xm(this.o)};
|
|
676
|
+
ep.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy();this.C.destroy()};function gp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new T("ad-error",b));hp(a,null);a.m(new T("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
677
|
+
function fp(a,b){a.m(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.B);a.m(new T("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
678
|
+
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=u(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.m(new T("ad-cue-points-changed",(new Map).set("cuepoints",b)))}ip(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,jp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,jp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
|
|
679
|
+
a.i.offsetHeight,jp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,jp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.F||a.s.skipPlayDetection?a.g.start():a.h.na(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){hp(a,null)}}
|
|
680
|
+
function jp(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
681
|
+
function ip(a){function b(c,d){c=(new Map).set("originalEvent",c);a.m(new T(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){gp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){kp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){kp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
682
|
+
function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){hp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){hp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
683
683
|
a.h.D(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.D(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.D(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.D(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
|
|
684
684
|
a.h.D(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.D(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.D(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.D(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.D(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.D(a.g,
|
|
685
685
|
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.D(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.D(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
|
|
686
|
-
function
|
|
687
|
-
function
|
|
686
|
+
function kp(a,b){var c=b.getAd();c?(a.j=new dp(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new T("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.s.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):Va("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
|
|
687
|
+
function hp(a,b){a.m(new T("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function lp(a,b,c,d,e){this.h=a;this.g=e;this.i=b;this.j=c;this.l=d}r=lp.prototype;r.getDuration=function(){return this.h.durationInSeconds};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.h.skipOffset?!0:!1};
|
|
688
688
|
r.getTimeUntilSkippable=function(){if(!this.h.skipOffset)return this.getRemainingTime();var a=this.getRemainingTime()-this.h.skipOffset;return Math.max(a,0)};r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.g.currentTime+=this.getRemainingTime()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted};
|
|
689
689
|
r.isLinear=function(){return this.l};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};r.getSequenceLength=function(){return this.j?this.j:1};r.getPositionInSequence=function(){return this.i?this.i:1};r.getTitle=function(){return this.h.adTitle};r.getDescription=function(){return""};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return 0};r.getVastMediaWidth=function(){return 0};r.getAdId=function(){return this.h.adId};r.getCreativeAdId=function(){return this.h.creativeId};
|
|
690
|
-
r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.j=this.i=this.g=this.h=null};P("shaka.ads.MediaTailorAd",
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
function
|
|
690
|
+
r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.j=this.i=this.g=this.h=null};P("shaka.ads.MediaTailorAd",lp);lp.prototype.release=lp.prototype.release;lp.prototype.getPodIndex=lp.prototype.getPodIndex;lp.prototype.getTimeOffset=lp.prototype.getTimeOffset;lp.prototype.getMediaUrl=lp.prototype.getMediaUrl;lp.prototype.getAdvertiserName=lp.prototype.getAdvertiserName;
|
|
691
|
+
lp.prototype.getCreativeAdId=lp.prototype.getCreativeAdId;lp.prototype.getAdId=lp.prototype.getAdId;lp.prototype.getVastMediaWidth=lp.prototype.getVastMediaWidth;lp.prototype.getVastMediaHeight=lp.prototype.getVastMediaHeight;lp.prototype.getVastMediaBitrate=lp.prototype.getVastMediaBitrate;lp.prototype.getDescription=lp.prototype.getDescription;lp.prototype.getTitle=lp.prototype.getTitle;lp.prototype.getPositionInSequence=lp.prototype.getPositionInSequence;lp.prototype.getSequenceLength=lp.prototype.getSequenceLength;
|
|
692
|
+
lp.prototype.setMuted=lp.prototype.setMuted;lp.prototype.resize=lp.prototype.resize;lp.prototype.isLinear=lp.prototype.isLinear;lp.prototype.isMuted=lp.prototype.isMuted;lp.prototype.setVolume=lp.prototype.setVolume;lp.prototype.getVolume=lp.prototype.getVolume;lp.prototype.play=lp.prototype.play;lp.prototype.pause=lp.prototype.pause;lp.prototype.skip=lp.prototype.skip;lp.prototype.canSkipNow=lp.prototype.canSkipNow;lp.prototype.getTimeUntilSkippable=lp.prototype.getTimeUntilSkippable;
|
|
693
|
+
lp.prototype.isSkippable=lp.prototype.isSkippable;lp.prototype.isPaused=lp.prototype.isPaused;lp.prototype.getRemainingTime=lp.prototype.getRemainingTime;lp.prototype.getMinSuggestedDuration=lp.prototype.getMinSuggestedDuration;lp.prototype.getDuration=lp.prototype.getDuration;function mp(a,b,c,d){this.B=a;this.K=b;this.g=c;this.l=null;this.Y=NaN;this.i=d;this.I=!1;this.A=null;this.j=[];this.N=[];this.L=this.C=this.h=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.T=!0;this.H="";this.o=new db}mp.prototype.stop=function(){for(var a=u(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Kb(b.target,b.type,b.listener);np(this);this.m=[];this.s=[];this.G="";this.T=!0;this.H="";this.A=null;this.j=[];this.N=[];this.F.clear()};
|
|
694
|
+
mp.prototype.release=function(){this.stop();this.o&&this.o.release()};mp.prototype.onManifestUpdated=function(a){this.I=a;""!=this.G&&(op(this,this.G,this.T),this.T=!1)};mp.prototype.getCuePoints=function(){for(var a=[],b=u(this.j),c=b.next();!c.done;c=b.next()){c=u(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
|
|
695
|
+
function pp(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;L(function(t){if(1==t.g)return d=jg([b],Qf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=od(e)),f=a.K.request(7,d),ra(t,2),C(t,f.promise,4);if(2!=t.g){g=t.h;h=id(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new rc(b),m=new rc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,q=n-a.Y,a.i(new T("ads-loaded",(new Map).set("loadTime",q))),p=new rc(k.manifestUrl),a.l.resolve(l.resolve(p).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
|
|
696
696
|
return ta(t,0)}va(t);if(!a.H.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,t.return();a.l.resolve(a.H);a.l=null;F(t)})}
|
|
697
|
-
function
|
|
698
|
-
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",g))),
|
|
699
|
-
function
|
|
700
|
-
function
|
|
701
|
-
function
|
|
702
|
-
function
|
|
703
|
-
e=a.h.getDuration();0<e&&(0>=d||d>e)&&
|
|
704
|
-
if(a.h)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.F.get(
|
|
705
|
-
0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.L=e;a.h=new
|
|
706
|
-
function
|
|
707
|
-
function
|
|
697
|
+
function op(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,t,w,x,z;L(function(v){if(1==v.g)return d=jg([b],Qf()),e=a.K.request(7,d),ra(v,2),C(v,e.promise,4);if(2!=v.g){f=v.h;g=[];h=id(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=u(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,q=u(n.nonLinearAdsList),p=q.next();!p.done;p=q.next())for(t=p.value,w=u(t.nonLinearAdList),x=w.next();!x.done;x=w.next())z=x.value,qp(a,z);g=a.getCuePoints();a.i(new T("ad-cue-points-changed",
|
|
698
|
+
(new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",g))),np(a),a.j=[];c&&(a.I||0<g.length)&&rp(a);return ta(v,0)}va(v);F(v)})}
|
|
699
|
+
function qp(a,b){var c,d,e,f,g,h,k,l;L(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=sp(b);if(d=a.F.get(c))return m.return();e=jg([b.staticResource],Qf());f=a.K.request(7,e);ra(m,2);a.F.set(c,[]);return C(m,f.promise,4)}if(2!=m.g)return g=m.h,h=id(g.data),k=JSON.parse(h),l=k.apps,a.F.set(c,l),ta(m,0);va(m);a.F.delete(c);F(m)})}
|
|
700
|
+
function sp(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function rp(a){tp(a);a.I||(up(a),a.o.D(a.g,"seeked",function(){up(a)}),a.o.D(a.g,"ended",function(){np(a)}));a.o.D(a.g,"timeupdate",function(){tp(a)})}
|
|
701
|
+
function up(a){var b=a.g.currentTime;if(0!=b&&null==a.A){for(var c,d,e=u(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=u(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.N.includes(d.adId)&&(a.A=b,a.g.currentTime=c.startTimeInSeconds)}}
|
|
702
|
+
function tp(a){if(a.g.duration&&(a.h||a.j.length)){var b=a.g.currentTime,c=!1;if(a.h){c=!0;var d=a.C,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.s.includes("firstQuartile")?(a.s.push("firstQuartile"),vp(a,"firstQuartile")):b>=e&&!a.s.includes("midpoint")?(a.s.push("midpoint"),vp(a,"midpoint")):b>=f&&!a.s.includes("thirdQuartile")&&(a.s.push("thirdQuartile"),vp(a,"thirdQuartile"));d=a.h.getRemainingTime();
|
|
703
|
+
e=a.h.getDuration();0<e&&(0>=d||d>e)&&np(a)}if(!a.h||!a.h.isLinear()){a:for(d=u(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.h&&a.h.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.N.includes(g.adId)){if(a.g.ended)continue;a.g.currentTime=h;break a}np(a);a.L=e;a.h=new lp(g,f+1,e.ads.length,!0,a.g);a.C=g;0===f&&vp(a,"breakStart");wp(a);break}}}if(!a.h)for(d=u(a.j),e=d.next();!e.done;e=d.next()){e=e.value;
|
|
704
|
+
if(a.h)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.F.get(sp(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){np(a);h=a;k=u(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||0)+"%";m.style.maxWidth=100-(l.placeholder.left||
|
|
705
|
+
0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.L=e;a.h=new lp(g,f+1,e.ads.length,!1,a.g);a.C=g;0===f&&vp(a,"breakStart");wp(a);break}}}c&&!a.h&&(b=a.g.currentTime,a.A&&a.A>b&&(a.g.currentTime=a.A),a.A=null)}}}
|
|
706
|
+
function np(a){if(a.h){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.I||a.N.push(a.C.adId);vp(a,"complete");for(var b=u(a.m),c=b.next();!c.done;c=b.next())c=c.value,a.o.Kb(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.h.getPositionInSequence();c=a.h.getSequenceLength();b===c&&vp(a,"breakEnd");a.h=null;a.C=null;a.L=null}}
|
|
707
|
+
function wp(a){var b=!1;a.g.paused?b=!0:(vp(a,"impression"),vp(a,"start"));a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted&&vp(a,"mute")}});a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted||vp(a,"unmute")}});a.m.push({target:a.g,type:"play",listener:function(){b?(vp(a,"impression"),vp(a,"start"),b=!1):vp(a,"resume")}});a.m.push({target:a.g,type:"pause",listener:function(){vp(a,"pause")}});for(var c=u(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.D(d.target,
|
|
708
708
|
d.type,d.listener)}
|
|
709
|
-
function
|
|
710
|
-
case "resume":a.i(new T("ad-resumed"));break;case "pause":a.i(new T("ad-paused"));break;case "firstQuartile":a.i(new T("ad-first-quartile"));break;case "midpoint":a.i(new T("ad-midpoint"));break;case "thirdQuartile":a.i(new T("ad-third-quartile"));break;case "complete":a.i(new T("ad-complete"));a.i(new T("ad-stopped"));break;case "breakStart":a.B.setAttribute("ad-active","true");break;case "breakEnd":a.B.removeAttribute("ad-active")}};function
|
|
709
|
+
function vp(a,b){var c=a.C.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.L.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=u(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=jg([d],Qf()),d.method="POST",a.K.request(7,d))}switch(b){case "impression":a.i(new T("ad-impression"));break;case "start":a.i(new T("ad-started",(new Map).set("ad",a.h)));break;case "mute":a.i(new T("ad-muted"));break;case "unmute":a.i(new T("ad-volume-changed"));break;
|
|
710
|
+
case "resume":a.i(new T("ad-resumed"));break;case "pause":a.i(new T("ad-paused"));break;case "firstQuartile":a.i(new T("ad-first-quartile"));break;case "midpoint":a.i(new T("ad-midpoint"));break;case "thirdQuartile":a.i(new T("ad-third-quartile"));break;case "complete":a.i(new T("ad-complete"));a.i(new T("ad-stopped"));break;case "breakStart":a.B.setAttribute("ad-active","true");break;case "breakEnd":a.B.removeAttribute("ad-active")}};function xp(a,b){this.g=a;this.i=null;this.h=b}r=xp.prototype;r.getDuration=function(){return this.i?this.i.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};r.isPaused=function(){return this.h.paused};r.isSkippable=function(){return this.g.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
|
|
711
711
|
r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.h.currentTime+=this.getRemainingTime()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.play()};r.getVolume=function(){return this.h.volume};r.setVolume=function(a){this.h.volume=a};r.isMuted=function(){return this.h.muted};r.isLinear=function(){return!0};r.resize=function(){};r.setMuted=function(a){this.h.muted=a};
|
|
712
712
|
r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};r.getAdId=function(){return this.g.getAdId()};
|
|
713
|
-
r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.i=this.g=null};P("shaka.ads.ServerSideAd",
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new
|
|
713
|
+
r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.i=this.g=null};P("shaka.ads.ServerSideAd",xp);xp.prototype.release=xp.prototype.release;xp.prototype.getPodIndex=xp.prototype.getPodIndex;
|
|
714
|
+
xp.prototype.getTimeOffset=xp.prototype.getTimeOffset;xp.prototype.getMediaUrl=xp.prototype.getMediaUrl;xp.prototype.getAdvertiserName=xp.prototype.getAdvertiserName;xp.prototype.getCreativeAdId=xp.prototype.getCreativeAdId;xp.prototype.getAdId=xp.prototype.getAdId;xp.prototype.getVastMediaWidth=xp.prototype.getVastMediaWidth;xp.prototype.getVastMediaHeight=xp.prototype.getVastMediaHeight;xp.prototype.getVastMediaBitrate=xp.prototype.getVastMediaBitrate;xp.prototype.getDescription=xp.prototype.getDescription;
|
|
715
|
+
xp.prototype.getTitle=xp.prototype.getTitle;xp.prototype.getPositionInSequence=xp.prototype.getPositionInSequence;xp.prototype.getSequenceLength=xp.prototype.getSequenceLength;xp.prototype.setMuted=xp.prototype.setMuted;xp.prototype.resize=xp.prototype.resize;xp.prototype.isLinear=xp.prototype.isLinear;xp.prototype.isMuted=xp.prototype.isMuted;xp.prototype.setVolume=xp.prototype.setVolume;xp.prototype.getVolume=xp.prototype.getVolume;xp.prototype.play=xp.prototype.play;xp.prototype.pause=xp.prototype.pause;
|
|
716
|
+
xp.prototype.skip=xp.prototype.skip;xp.prototype.canSkipNow=xp.prototype.canSkipNow;xp.prototype.getTimeUntilSkippable=xp.prototype.getTimeUntilSkippable;xp.prototype.isSkippable=xp.prototype.isSkippable;xp.prototype.isPaused=xp.prototype.isPaused;xp.prototype.getRemainingTime=xp.prototype.getRemainingTime;xp.prototype.getMinSuggestedDuration=xp.prototype.getMinSuggestedDuration;xp.prototype.getDuration=xp.prototype.getDuration;function yp(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.A=this.m=this.o=null;this.B="";this.C=[];this.h=new db;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new T("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){zp(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
|
|
717
|
+
e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new xp(f,e.l);e.A&&(e.m.i=e.A);e.i(new T("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
|
|
718
718
|
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new T("ad-first-quartile"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new T("ad-midpoint"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new T("ad-third-quartile"))});
|
|
719
719
|
this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new T("ad-complete"));e.i(new T("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new T("ad-skipped"));e.i(new T("ad-stopped"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=u(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.C=
|
|
720
|
-
f;e.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}r=
|
|
721
|
-
function
|
|
722
|
-
r.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);bg.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new T("ad-stopped"));this.j=new
|
|
723
|
-
r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new R(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};r.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new
|
|
724
|
-
r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new R(1,10,10005);var b=this.h;b.G=a;b.i(new T("ads-loaded",(new Map).set("loadTime",0)))};r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new R(2,10,10002);this.g&&this.g.release();this.g=new
|
|
725
|
-
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new R(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&
|
|
726
|
-
(c.G=!0),c.j=new Sf,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new R(1,10,10003);(a.mpt||a.mpv)&&
|
|
720
|
+
f;e.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}r=yp.prototype;r.configure=function(){};r.stop=function(){this.B="";this.o=null;this.C=[]};r.release=function(){this.stop();this.h&&this.h.release()};r.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};r.getCuePoints=function(){return this.C};
|
|
721
|
+
function zp(a,b){a.i(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){bg.call(this);this.g=this.h=this.i=null;this.j=new cp;this.m=navigator.language;this.l=null}na(Y,bg);r=Y.prototype;r.setLocale=function(a){this.m=a};r.configure=function(a){this.l=a;this.i&&this.i.configure(this.l);this.g&&this.g.configure(this.l)};r.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new R(2,10,1E4);this.i&&this.i.release();this.i=new ep(a,b,this.m,c,function(e){return Ap(d,e)});this.i.configure(this.l)};
|
|
722
|
+
r.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);bg.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new T("ad-stopped"));this.j=new cp};r.requestClientSideAds=function(a){if(!this.i)throw new R(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.G=Date.now()/1E3;b.l.requestAds(a)};
|
|
723
|
+
r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new R(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};r.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new mp(a,b,c,function(e){return Ap(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new R(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new R(1,10,10004)):(d.l=new Sf,pp(d,a,b),d.H=c||"",d.Y=Date.now()/1E3,a=d.l);return a};
|
|
724
|
+
r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new R(1,10,10005);var b=this.h;b.G=a;b.i(new T("ads-loaded",(new Map).set("loadTime",0)))};r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new R(2,10,10002);this.g&&this.g.release();this.g=new yp(a,b,this.m,function(d){return Ap(c,d)});this.g.configure(this.l)};
|
|
725
|
+
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new R(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.8.15";c=this.g;c.j?a=Promise.reject(new R(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
726
|
+
(c.G=!0),c.j=new Sf,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new R(1,10,10003);(a.mpt||a.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.8.15";this.g.g.replaceAdTagParameters(a)};
|
|
727
727
|
r.getServerSideCuePoints=function(){pb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};r.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};r.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
|
|
728
728
|
r.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
|
|
729
|
-
function
|
|
729
|
+
function Ap(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}P("shaka.ads.AdManager",Y);Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
|
|
730
730
|
Y.prototype.getCuePoints=Y.prototype.getCuePoints;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;Y.prototype.addMediaTailorTrackingUrl=Y.prototype.addMediaTailorTrackingUrl;Y.prototype.requestMediaTailorStream=Y.prototype.requestMediaTailorStream;
|
|
731
731
|
Y.prototype.initMediaTailor=Y.prototype.initMediaTailor;Y.prototype.updateClientSideAdsRenderingSettings=Y.prototype.updateClientSideAdsRenderingSettings;Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.configure=Y.prototype.configure;Y.prototype.setLocale=Y.prototype.setLocale;Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";
|
|
732
732
|
Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";Y.AD_VOLUME_CHANGED="ad-volume-changed";Y.AD_MUTED="ad-muted";Y.AD_PAUSED="ad-paused";Y.AD_RESUMED="ad-resumed";Y.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Y.CUEPOINTS_CHANGED="ad-cue-points-changed";Y.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Y.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";
|
|
733
|
-
Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_ERROR="ad-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";
|
|
734
|
-
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=u(
|
|
735
|
-
function
|
|
736
|
-
function
|
|
737
|
-
var
|
|
738
|
-
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},
|
|
739
|
-
|
|
740
|
-
q.code);for(m in q)n[m]=q[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;
|
|
741
|
-
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.hc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=u(
|
|
742
|
-
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Sf,this.s=!0,
|
|
743
|
-
r.cast=function(){var a=this;return L(function(b){if(!a.m)throw new R(1,8,8E3);if(!
|
|
744
|
-
r.get=function(a,b){var c=this;if("video"==a){if(
|
|
745
|
-
r.set=function(a,b,c){this.g[a][b]=c
|
|
746
|
-
r.vg=function(a,b){
|
|
747
|
-
function
|
|
748
|
-
function
|
|
749
|
-
r.destroy=function(a){a&&this.g.rc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;bg.prototype.release.call(this);return Promise.all(a)};r.Gh=function(){return this.l};r.vh=function(){return this.s};r.Zg=function(){return this.g.m&&
|
|
750
|
-
r.cast=function(){var a=this;return L(function(b){return 1==b.g?C(b,a.g.cast(),2):a.h?C(b,a.h.ic(),0):b.return()})};r.Cf=function(a){this.g.Cf(a)};r.Ai=function(){
|
|
751
|
-
r.$g=function(a,b){b=void 0===b?!1:b;var c=this;return L(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.rc();return C(d,c.g.destroy(),2)}c.g=null;c.g=new
|
|
752
|
-
function
|
|
753
|
-
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return
|
|
754
|
-
function
|
|
755
|
-
function
|
|
756
|
-
function
|
|
757
|
-
function
|
|
758
|
-
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=u(
|
|
759
|
-
function
|
|
760
|
-
function
|
|
761
|
-
if("setVideoContainer"==b)return function(c){return a.h.Jg(c)};if(a.g.Wa()){if("getManifest"==b||"drmInfo"==b)return function(){
|
|
762
|
-
function
|
|
763
|
-
|
|
733
|
+
Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_ERROR="ad-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";Nn=function(){return new Y};function Bp(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof T){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=u(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=u(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
|
|
734
|
+
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=u(Ei(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
|
|
735
|
+
function Cp(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=Dp(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
|
|
736
|
+
function Dp(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
|
|
737
|
+
var Ep="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Fp="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Gp=["loop","playbackRate"],Hp=["pause","play"],Ip={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
|
|
738
|
+
isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},Jp={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Kp={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},Lp=[["getConfiguration","configure"]],Mp=[["isTextTrackVisible","setTextTrackVisibility"]],Np="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
|
|
739
|
+
Op=["attach","attachCanvas","detach","load","unload"];function Pp(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new Mc(b);this.L=c;this.s=!1;this.A=d;this.F=e;this.N=f;this.h=this.m=!1;this.I="";this.o=null;this.B=function(){return Qp(h)};this.C=function(k,l){k=Cp(l);switch(k.type){case "event":var m=k.targetName,n=$f(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.s&&(h.L(),h.s=!1);break;case "asyncComplete":if(n=k.id,q=k.error,k=h.i[n],delete h.i[n],k)if(q){n=new R(q.severity,q.category,
|
|
740
|
+
q.code);for(m in q)n[m]=q[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;Rp.add(this)}r=Pp.prototype;r.destroy=function(){Rp.delete(this);Sp(this);Tp&&Up(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.h=this.m=!1;this.C=this.B=this.j=this.i=this.g=this.o=null;return Promise.resolve()};r.Wa=function(){return this.h};r.vf=function(){return this.I};
|
|
741
|
+
r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.hc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=u(Rp),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Sf;d.s=!0;Vp(d,e)}},function(b){for(var c=u(Rp),d=c.next();!d.done;d=c.next())d=d.value,Wp="available"==b,d.l.hc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Wp&&this.l.U(Xp);(a=Tp)&&
|
|
742
|
+
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Sf,this.s=!0,Vp(this,a)):Tp=null}else window.__onGCastApiAvailable!==Yp&&(Zp=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Yp)};r.Cf=function(a){this.o=a;this.h&&$p(this,{type:"appData",appData:this.o})};
|
|
743
|
+
r.cast=function(){var a=this;return L(function(b){if(!a.m)throw new R(1,8,8E3);if(!Wp)throw new R(1,8,8001);if(a.h)throw new R(1,8,8002);a.j=new Sf;chrome.cast.requestSession(function(c){return Vp(a,c)},function(c){return aq(a,c)});return C(b,a.j,0)})};function bq(a){a.h&&chrome.cast.requestSession(function(b){return Vp(a,b)},function(b){return aq(a,b)})}r.rc=function(){if(this.h){Sp(this);if(Tp){Up(this);try{Tp.stop(function(){},function(){})}catch(a){}Tp=null}Qp(this)}};
|
|
744
|
+
r.get=function(a,b){var c=this;if("video"==a){if(Hp.includes(b))return function(){return c.vg.apply(c,[a,b].concat(y(Ha.apply(0,arguments))))}}else if("player"==a){if(Kp[b]&&!this.get("player","isLive")())return function(){};if(Np.includes(b))return function(){return c.vg.apply(c,[a,b].concat(y(Ha.apply(0,arguments))))};if(Op.includes(b))return function(){return c.ji.apply(c,[a,b].concat(y(Ha.apply(0,arguments))))};if(Ip[b]||Jp[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
745
|
+
r.set=function(a,b,c){this.g[a][b]=c;$p(this,{type:"set",targetName:a,property:b,value:c})};function Vp(a,b){var c=a.N();Tp=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);Qp(a);$p(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function aq(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new R(2,8,c,b))}
|
|
746
|
+
r.vg=function(a,b){$p(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};r.ji=function(a,b){var c=Ha.apply(2,arguments),d=new Sf,e=this.H.toString();this.H++;this.i[e]=d;try{$p(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Up(a){var b=Tp;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
|
|
747
|
+
function Qp(a){var b=Tp?"connected"==Tp.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Sp(a)}a.h=b;a.I=b?Tp.receiver.friendlyName:"";a.l.hc()}function Sp(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new R(1,7,7E3))}}function $p(a,b){b=Bp(b);var c=Tp;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Za)}catch(d){throw b=new R(2,8,8005,d),c=new T("error",(new Map).set("detail",b)),a.A("player",c),a.rc(),b;}}var Xp=.02,Wp=!1,Tp=null,Zp=null,Rp=new Set;
|
|
748
|
+
function Yp(a){Zp?window.__onGCastApiAvailable=Zp:delete window.__onGCastApiAvailable;Zp=null;if(a)for(var b=u(Rp),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function cq(a,b,c,d){d=void 0===d?!1:d;bg.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.B=d;this.A=new Map;this.g=new Pp(c,function(){return dq(e)},function(){return eq(e)},function(f,g){return fq(e,f,g)},function(){return gq(e)},function(){return hq(e)},d);iq(this)}na(cq,bg);r=cq.prototype;
|
|
749
|
+
r.destroy=function(a){a&&this.g.rc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;bg.prototype.release.call(this);return Promise.all(a)};r.Gh=function(){return this.l};r.vh=function(){return this.s};r.Zg=function(){return this.g.m&&Wp};r.Wa=function(){return this.g.Wa()};r.vf=function(){return this.g.vf()};
|
|
750
|
+
r.cast=function(){var a=this;return L(function(b){return 1==b.g?C(b,a.g.cast(),2):a.h?C(b,a.h.ic(),0):b.return()})};r.Cf=function(a){this.g.Cf(a)};r.Ai=function(){bq(this.g)};r.rc=function(){this.g.rc()};
|
|
751
|
+
r.$g=function(a,b){b=void 0===b?!1:b;var c=this;return L(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.rc();return C(d,c.g.destroy(),2)}c.g=null;c.g=new Pp(a,function(){return dq(c)},function(){return eq(c)},function(e,f){return fq(c,e,f)},function(){return gq(c)},function(){return hq(c)},b);c.g.init();F(d)})};
|
|
752
|
+
function iq(a){a.g.init();a.m=new db;for(var b=u(Ep),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.Wa()||(f=$f(f),a.j.dispatchEvent(f))});for(var d in ag)a.m.D(a.h,ag[d],function(f){a.g.Wa()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Hc=e,Object.defineProperty(a.l,b.Hc,{configurable:!1,enumerable:!0,get:function(f){return function(){return jq(a,f.Hc)}}(b),set:function(f){return function(g){var h=f.Hc;a.g.Wa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Hc:b.Hc};a.s={};kq(a,
|
|
753
|
+
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return lq(a,f)}})});mq(a);a.j=new bg;a.j.Vd=a.l;a.o=new bg;a.o.Vd=a.s}function mq(a){var b=new Map;kq(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.A.set(c,d):a.A.set(d,c)):b.set(d,c)})}
|
|
754
|
+
function kq(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=u(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
|
|
755
|
+
function hq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.ad(),startTime:null};a.i.pause();for(var c=u(Gp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=u(Lp);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=u(Mp);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function dq(a){var b=new T("caststatuschanged");a.dispatchEvent(b)}
|
|
756
|
+
function eq(a){var b=new T(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
|
|
757
|
+
function gq(a){for(var b=u(Lp),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=u(Gp);for(d=c.next();!d.done;d=c.next())d=
|
|
758
|
+
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=u(Gp),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=u(Mp);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.Fg(h);g&&a.h.Af(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new T("error",l);a.h.dispatchEvent(l)})}
|
|
759
|
+
function jq(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.Wa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Wa()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
760
|
+
function lq(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Vb()};if("getDrmEngine"==b)return function(){return a.h.A};if("getAdManager"==b)return function(){return a.h.bg()};
|
|
761
|
+
if("setVideoContainer"==b)return function(c){return a.h.Jg(c)};if(a.g.Wa()){if("getManifest"==b||"drmInfo"==b)return function(){Va(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Va(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Wa()&&0==Object.keys(a.g.g.video).length&&(Ip[b]||Jp[b])||!a.g.Wa()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
762
|
+
function fq(a,b,c){a.g.Wa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}P("shaka.cast.CastProxy",cq);cq.prototype.changeReceiverId=cq.prototype.$g;cq.prototype.forceDisconnect=cq.prototype.rc;cq.prototype.suggestDisconnect=cq.prototype.Ai;cq.prototype.setAppData=cq.prototype.Cf;cq.prototype.cast=cq.prototype.cast;cq.prototype.receiverName=cq.prototype.vf;cq.prototype.isCasting=cq.prototype.Wa;cq.prototype.canCast=cq.prototype.Zg;cq.prototype.getPlayer=cq.prototype.vh;
|
|
763
|
+
cq.prototype.getVideo=cq.prototype.Gh;cq.prototype.destroy=cq.prototype.destroy;function nq(a,b,c,d){bg.call(this);var e=this;this.g=a;this.h=b;this.j=new db;this.H={video:a,player:b};this.C=c||function(){};this.I=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.B=!1;this.A=!0;this.s=this.l=null;this.G=new Mc(function(){oq(e)});pq(this)}na(nq,bg);r=nq.prototype;r.isConnected=function(){return this.F};r.Mh=function(){return this.o};r.wi=function(a){this.i=a};r.eh=function(){this.i=null};
|
|
764
764
|
r.xi=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.vi=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.ui=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
765
765
|
r.destroy=function(){var a=this,b,c;return L(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.H=null,a.C=null,a.F=!1,a.o=!0,a.l=null,a.s=null,bg.prototype.release.call(a),C(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();F(d)})};
|
|
766
|
-
function
|
|
767
|
-
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return
|
|
768
|
-
a.j.D(a.g,"ended",function(){(new Mc(function(){a.g&&a.g.ended&&(a.o=!0,
|
|
769
|
-
function
|
|
770
|
-
a.g.autoplay=f;b.manifest&&(a.g.play(),
|
|
771
|
-
function
|
|
772
|
-
1);
|
|
773
|
-
function
|
|
774
|
-
"player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return
|
|
775
|
-
function
|
|
776
|
-
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||
|
|
777
|
-
function
|
|
778
|
-
P("shaka.cast.CastReceiver",
|
|
779
|
-
p||-1===t)q=
|
|
780
|
-
function
|
|
781
|
-
function
|
|
782
|
-
var
|
|
783
|
-
"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),
|
|
784
|
-
[39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),
|
|
785
|
-
var
|
|
786
|
-
function
|
|
787
|
-
50;e.regionAnchorY=50;break;case
|
|
788
|
-
function
|
|
789
|
-
b=null;c=u(
|
|
790
|
-
b.skip(1),d=
|
|
791
|
-
function
|
|
792
|
-
var
|
|
793
|
-
function
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
function
|
|
797
|
-
"white";e=!1;7>f?d=
|
|
798
|
-
|
|
799
|
-
e-1,e,b.h),
|
|
800
|
-
function
|
|
801
|
-
0,w=1;16>w;w++,t++)q.i[t]=q.i[w];for(w=0;1>w;w++,t++)q.i[t]=
|
|
802
|
-
"\u266a"):
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
b).box("dvh1",b).box("dvhe",b).box("encv",Lg).box("sinf",Gg).box("frma",function(f){f=
|
|
806
|
-
|
|
807
|
-
new R(2,2,2010);
|
|
808
|
-
function
|
|
809
|
-
c+(n[l].yf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}P("shaka.cea.Mp4CeaParser",
|
|
810
|
-
P("shaka.cea.TsCeaParser",
|
|
811
|
-
l.Ac});f.length&&(a=
|
|
812
|
-
function
|
|
813
|
-
function
|
|
814
|
-
function
|
|
815
|
-
function
|
|
816
|
-
60,30,82,226,251,75]),n=new Uint8Array([]);l=[{initData:Pg(n,m,l,1),initDataType:"cenc",keyId:g.keyId}]}k=Cd(h,b,g.init||a||k||l);if(h=
|
|
817
|
-
function
|
|
818
|
-
function
|
|
766
|
+
function pq(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return qq(a)};b.onSenderDisconnected=function(){return qq(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&rq(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);rq(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return sq(a,
|
|
767
|
+
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return tq(a,e)};b.start();b=u(Ep);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return uq(a,"video",e)});for(var d in ag)a.j.D(a.h,ag[d],function(e){return uq(a,"player",e)});a.j.D(a.g,"loadeddata",function(){a.B=!0});a.j.D(a.h,"loading",function(){a.o=!1;vq(a)});a.j.D(a.g,"playing",function(){a.o=!1;vq(a)});a.j.D(a.g,"pause",function(){vq(a)});a.j.D(a.h,"unloading",function(){a.o=!0;vq(a)});
|
|
768
|
+
a.j.D(a.g,"ended",function(){(new Mc(function(){a.g&&a.g.ended&&(a.o=!0,vq(a))})).U(wq)})}function qq(a){a.m=0;a.A=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;vq(a)}function vq(a){var b;L(function(c){if(1==c.g)return C(c,Promise.resolve(),2);if(!a.h)return c.return();b=new T("caststatuschanged");a.dispatchEvent(b);xq(a)||yq(a);F(c)})}
|
|
769
|
+
function zq(a,b,c){var d,e,f,g,h,k,l,m,n,q;L(function(p){switch(p.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.C(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,ra(p,5),C(p,a.h.load(b.manifest,b.startTime),7)):C(p,Promise.resolve(),3);case 7:ta(p,3);break;case 5:return g=va(p),h=(new Map).set("detail",g),k=new T("error",h),a.h&&a.h.dispatchEvent(k),p.return();case 3:if(!a.h)return p.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)q=b.playerAfterLoad[n],a.h[n](q);
|
|
770
|
+
a.g.autoplay=f;b.manifest&&(a.g.play(),yq(a));F(p)}})}function uq(a,b,c){a.h&&(oq(a),rq(a,{type:"event",targetName:b,event:c},a.l))}
|
|
771
|
+
function oq(a){a.G.U(Aq);for(var b={video:{},player:{}},c=u(Fp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.R())for(var e in Kp)0==a.m%Kp[e]&&(b.player[e]=a.h[e]());for(var f in Ip)0==a.m%Ip[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;rq(a,{type:"update",update:b},a.l);for(var g in Jp)0==a.m%Jp[g]&&(b={player:{}},b.player[g]=a.h[g](),rq(a,{type:"update",update:b},a.l));a.B&&(a.m+=
|
|
772
|
+
1);xq(a)}function xq(a){return a.A&&(a.g.duration||a.h.R())?(Bq(a),a.A=!1,!0):!1}function Bq(a,b){var c={contentId:a.h.ad(),streamType:a.h.R()?"LIVE":"BUFFERED",contentType:""};a.h.R()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);yq(a,void 0===b?0:b,c)}
|
|
773
|
+
function tq(a,b){var c=Cp(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;zq(a,c.initState,c.appData);oq(a);break;case "appData":a.C(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
|
|
774
|
+
"player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return Cq(a,g,f,null)},function(h){return Cq(a,g,f,h)})}}
|
|
775
|
+
function sq(a,b){var c=Cp(b.data);switch(c.type){case "PLAY":a.g.play();yq(a);break;case "PAUSE":a.g.pause();yq(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),yq(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),yq(a));break;case "STOP":a.h.ic().then(function(){a.h&&yq(a)});break;case "GET_STATUS":Bq(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
|
|
776
|
+
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||yq(a);break;case "LOAD":a.m=0;a.B=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.I(b.contentId);f=c.autoplay||!0;a.C(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Bq(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");rq(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:rq(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
|
|
777
|
+
function Cq(a,b,c,d){a.h&&rq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function rq(a,b,c,d){a.F&&(a=Bp(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function yq(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Dq:a.h.Ye()?Eq:a.g.paused?Fq:Gq,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);rq(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
|
|
778
|
+
P("shaka.cast.CastReceiver",nq);nq.prototype.destroy=nq.prototype.destroy;nq.prototype.setContentArtist=nq.prototype.ui;nq.prototype.setContentImage=nq.prototype.vi;nq.prototype.setContentTitle=nq.prototype.xi;nq.prototype.clearContentMetadata=nq.prototype.eh;nq.prototype.setContentMetadata=nq.prototype.wi;nq.prototype.isIdle=nq.prototype.Mh;nq.prototype.isConnected=nq.prototype.isConnected;var Aq=.5,wq=5,Dq="IDLE",Gq="PLAYING",Eq="BUFFERING",Fq="PAUSED";function Hq(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Iq(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],p=-1,t=-1,w=0;w<q.length;w++)if(null!=q[w]&&""!==q[w].g.trim()){p=w;break}for(w=q.length-1;0<=w;w--)if(null!=q[w]&&""!==q[w].g.trim()){t=w;break}if(-1===
|
|
779
|
+
p||-1===t)q=Jq(d,e),a.nestedCues.push(q);else{for(;p<=t;p++)if(w=q[p]){var x=w.l,z=w.i,v=w.j,B=w.h;if(x!=h||z!=k||v!=l||B!=m)n.payload&&a.nestedCues.push(n),n=Iq(d,e,x,z,v,B),h=x,k=z,l=v,m=B;n.payload+=w.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Jq(d,e),a.nestedCues.push(n));n=Iq(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
|
|
780
|
+
function Iq(a,b,c,d,e,f){a=new Nb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Jq(a,b){a=new Nb(a,b,"");a.lineBreak=!0;return a}function Kq(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Lq(a,b){this.i=[];this.g=1;this.h=0;this.A=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";Mq(this)}function Nq(a,b,c){var d="CC"+((a.A<<1|a.s)+1),e=new Nb(b,c,"");e.lineInterpretation=1;var f=Oq.get(a.g);f&&(e.line=f);return Hq(e,d,a.i,b,c)}function Mq(a){Pq(a,0,15);a.g=1}
|
|
781
|
+
function Qq(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Rq:d=Sq.has(c)?Sq.get(c):String.fromCharCode(c);break;case Tq:d=Uq.get(c);break;case Vq:a.i[a.g].pop();d=Wq.get(c);break;case Xq:a.i[a.g].pop(),d=Yq.get(c)}d&&a.i[a.g].push(new Kq(d,a.m,a.j,a.o,a.l))}}function Zq(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Pq(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
782
|
+
var Rq=0,Tq=1,Vq=2,Xq=3,Sq=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Uq=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Wq=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,
|
|
783
|
+
"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),Yq=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
|
|
784
|
+
[39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),Oq=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function $q(a,b){this.h=ar;this.o=new Lq(a,b);this.i=new Lq(a,b);this.g=this.j=new Lq(a,b);this.l=0;this.m=null}function br(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==cr&&a.h!==dr&&(e=Nq(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,Pq(c,0,15),c=a.j,c.g=0<c.h?c.h:0,Pq(c,0,15),d.g=15);a.h=cr;d.h=b;return e}function er(a){a.h=fr;a.g=a.j;a.g.h=0}function gr(a){Xa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=dr}
|
|
785
|
+
var ar=0,fr=1,cr=3,dr=4,hr="black green blue cyan red yellow magenta black".split(" "),ir="white green blue cyan red yellow magenta white_italics".split(" ");function jr(a,b){this.I=b;this.N=a;this.K=this.l=!1;this.m=this.o=this.G=this.L=this.H=0;this.F=kr;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.s="black";lr(this)}function lr(a){a.i=[];for(var b=0;16>b;b++)a.i.push(mr())}function mr(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function nr(a,b){or(a)&&(a.i[a.h][a.g]=new Kq(b,a.C,a.A,a.s,a.B),a.g++)}function or(a){var b=a.g<a.m&&0<=a.g;return a.h<a.o&&0<=a.h&&b}jr.prototype.isVisible=function(){return this.l};
|
|
786
|
+
function pr(a,b,c){var d=new Nb(a.j,b,"");d.textAlign=a.F===qr?"left":a.F===rr?"right":Qb;var e=d.region;a.I&&(e.id+="svc"+a.I);e.id+="win"+a.N;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?gc:2;switch(a.G){case sr:e.regionAnchorX=0;e.regionAnchorY=0;break;case tr:e.regionAnchorX=50;e.regionAnchorY=0;break;case ur:e.regionAnchorX=100;e.regionAnchorY=0;break;case vr:e.regionAnchorX=0;e.regionAnchorY=50;break;case wr:e.regionAnchorX=
|
|
787
|
+
50;e.regionAnchorY=50;break;case xr:e.regionAnchorX=100;e.regionAnchorY=50;break;case yr:e.regionAnchorX=0;e.regionAnchorY=100;break;case zr:e.regionAnchorX=50;e.regionAnchorY=100;break;case Ar:e.regionAnchorX=100,e.regionAnchorY=100}if(c=Hq(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var qr=0,rr=1,kr=2,sr=0,tr=1,ur=2,vr=3,wr=4,xr=5,yr=6,zr=7,Ar=8;function Br(){this.i=[];this.h=null;this.g=0}function Cr(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Dr(a.h)),a.h=null,a.g=0))}function Dr(a){this.g=0;this.h=a}Dr.prototype.ka=function(){return this.g<this.h.length};Dr.prototype.wa=function(){return this.g};function Er(a){if(!a.ka())throw new R(2,2,3E3);return a.h[a.g++]}Dr.prototype.skip=function(a){if(this.g+a>this.h.length)throw new R(2,2,3E3);this.g+=a};function Fr(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
788
|
+
function Gr(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=Er(b).value;b=null;c=u(Hr(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=pr(e,d,a.i)),lr(e);return b}if(137===c)for(b=Er(b).value,b=u(Hr(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=Er(b).value;b=null;c=u(Hr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=pr(e,d,a.i)),e.l=!1;return b}if(139===c){c=Er(b).value;
|
|
789
|
+
b=null;c=u(Hr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=pr(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Er(b).value,Ir(a,b,d);if(143===c)return d=Ir(a,255,d),Jr(a),d;if(144===c)b.skip(1),d=Er(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=Er(b).value,c=Er(b).value,b.skip(1),a.g&&(b=Kr((c&48)>>4,(c&12)>>2,c&3),a.g.B=Kr((d&48)>>4,(d&12)>>2,d&3),a.g.s=b);else if(146===c)d=Er(b).value,b=Er(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
790
|
+
b.skip(1),d=Er(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new jr(c,a.i);f.j=d;a.h[c]=f}d=Er(b).value;f=Er(b).value;var g=Er(b).value,h=Er(b).value,k=Er(b).value;b=Er(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.L=f&127;b.H=g;b.G=(h&240)>>4;b.K=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null}
|
|
791
|
+
function Hr(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function Ir(a,b,c){var d=null;b=u(Hr(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=pr(f,c,a.i));a.h[e]=null}return d}function Jr(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Kr(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Lr[a<<2|b<<1|c]}
|
|
792
|
+
var Mr=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),Lr="black blue green cyan red magenta yellow white".split(" ");function Nr(){this.h=[];this.g=[];this.i=new Br;this.l=0;this.m=new Map([["CC1",new $q(0,0)],["CC2",new $q(0,1)],["CC3",new $q(1,0)],["CC4",new $q(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;Or(this)}Nr.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Or(this);a=u(this.j.values());for(var b=a.next();!b.done;b=a.next())Jr(b.value)};
|
|
793
|
+
function Or(a){a.o=0;a.s=0;for(var b=u(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=ar,c.g=c.j,c.m=null,Mq(c.i),Mq(c.j),Mq(c.o);a.B=!0}
|
|
794
|
+
Nr.prototype.extract=function(a,b){if(this.B){for(var c=u(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new yg(a,0);if(!(8>a.getLength())&&181===a.P()&&49===a.ra()&&1195456820===a.M()&&3===a.P()&&(c=a.P(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.P(),f=(e&4)>>2,g=a.P(),h=a.P();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Ua:g,vb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
|
|
795
|
+
Nr.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=u(this.h),d=c.next();!d.done;d=c.next())(d=Pr(this,d.value))&&b.push(d);c=u(this.g);for(d=c.next();!d.done;d=c.next())Cr(this.i,d.value);c=u(this.i.i);for(d=c.next();!d.done;d=c.next())d=Qr(this,d.value),b.push.apply(b,y(d));this.i.i=[];this.h=[];this.g=[];return b};
|
|
796
|
+
function Pr(a,b){var c=b.type;if(16===(b.Ua&112)){var d=b.Ua>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.Ua&&255===b.vb||!b.Ua&&!b.vb||!Rr(b.Ua)||!Rr(b.vb))return 45<=++a.l&&Or(a),null;a.l=0;b.Ua&=127;b.vb&=127;var e=b.Ua;if(1<=e&&15>=e||!b.Ua&&!b.vb)return null;e=null;if(16===(b.Ua&112))a:{a.A.add(d),d=b.Ua;a=b.vb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var f=(a&30)>>1;d=
|
|
797
|
+
"white";e=!1;7>f?d=ir[f]:7===f&&(e=!0);a=1===(a&1);c.h!==dr&&(f=c.g,c.h===cr&&b!==f.g&&(c=1+b-f.h,Zq(f,c,1+f.g-f.h,f.h),Pq(f,0,c-1),Pq(f,b+1,15-b)),f.g=b,f.m=a,f.j=e,f.l=d,f.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Qq(c.g,Rq,32),d=!1,b=ir[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=hr[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))Qq(c.g,
|
|
798
|
+
Tq,a);else if(18===(d&246)&&32===(a&224))Qq(c.g,d&1?Xq:Vq,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.vb){case 32:er(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=br(c,2,a);break;case 38:d=br(c,3,a);break;case 39:d=br(c,4,a);break;case 40:Qq(c.g,Rq,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Mq(c.o);gr(c);break;case 43:gr(c);break;case 44:b=c.i;d=null;c.h!==dr&&(d=Nq(b,c.l,a));Pq(b,0,15);break;case 45:b=c.g;c.h!==cr?d=null:(d=Nq(b,c.l,a),e=b.g-b.h+1,Zq(b,
|
|
799
|
+
e-1,e,b.h),Pq(b,0,e-1),Pq(b,b.g,15-b.g),c.l=a);break;case 46:Pq(c.j,0,15);break;case 47:b=null,c.h!==dr&&(b=Nq(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,er(c),c.l=a,d=b}e=d;break a}e=null}else a=b.vb,Qq(c.g,Rq,b.Ua),Qq(c.g,Rq,a);return e}
|
|
800
|
+
function Qr(a,b){var c=[];try{for(;b.ka();){var d=Er(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Er(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Fr(e));for(var g=a.j.get(e),h=b.wa();b.wa()-h<f;){e=b;var k=Er(e),l=k.value,m=k.pts;if(16===l){var n=Er(e);l=l<<16|n.value}if(0<=l&&31>=l){var q=m;if(g.g){var p=g.g;e=null;switch(l){case 8:!or(p)||0>=p.g&&0>=p.h||(0>=p.g?(p.g=p.m-1,p.h--):p.g--,p.i[p.h][p.g]=null);break;case 13:p.isVisible()&&(e=pr(p,q,g.i));if(p.h+1>=p.o){q=p;for(var t=
|
|
801
|
+
0,w=1;16>w;w++,t++)q.i[t]=q.i[w];for(w=0;1>w;w++,t++)q.i[t]=mr()}else p.h++;p.g=0;break;case 14:p.isVisible()&&(e=pr(p,q,g.i));p.i[p.h]=mr();p.g=0;break;case 12:p.isVisible()&&(e=pr(p,q,g.i)),lr(p),q=p,q.h=0,q.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=Gr(g,e,l,m);else{if(4096<=l&&4127>=l)q=l&255,8<=q&&15>=q?e.skip(1):16<=q&&23>=q?e.skip(2):24<=q&&31>=q&&e.skip(3);else if(4224<=l&&4255>=l)q=l&255,128<=q&&135>=q?e.skip(4):136<=q&&143>=q&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?nr(g.g,
|
|
802
|
+
"\u266a"):nr(g.g,String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&nr(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Mr.has(e)){var z=Mr.get(e);nr(g.g,z)}else nr(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?nr(g.g,"_"):nr(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(v){if(v instanceof R&&3E3===v.code)Xa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw v;}return c}function Rr(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
|
|
803
|
+
Nr.prototype.getStreams=function(){return Array.from(this.A)};P("shaka.cea.CeaDecoder",Nr);Ib=function(){return new Nr};function Sr(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(y(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function Tr(){this.j=new Map;this.i=this.h=0;this.g=Ur}
|
|
804
|
+
Tr.prototype.init=function(a){function b(f){f=f.name;f in Vr&&(c.g=Vr[f])}var c=this,d=[],e=[];(new Bg).box("moov",Gg).box("mvex",Gg).O("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.M();g=g.M();c.h=f;c.i=g}).box("trak",Gg).O("tkhd",function(f){f=Ri(f.reader,f.version);d.push(f.trackId)}).box("mdia",Gg).O("mdhd",function(f){f=Pi(f.reader,f.version);e.push(f.timescale)}).box("minf",Gg).box("stbl",Gg).O("stsd",Ig).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",
|
|
805
|
+
b).box("dvh1",b).box("dvhe",b).box("encv",Lg).box("sinf",Gg).box("frma",function(f){f=Si(f.reader).Ea;f in Vr&&(c.g=Vr[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new R(2,2,2010);this.g==Ur&&Va("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
806
|
+
Tr.prototype.parse=function(a){var b=this;if(this.g==Ur)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Bg).box("moof",function(l){f=l.start;g=[];Gg(l)}).box("traf",Gg).O("trun",function(l){l=Qi(l.reader,l.version,l.flags);g.push(l)}).O("tfhd",function(l){l=Ni(l.reader,l.flags);d=l.Yf||b.h;e=l.hh||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).O("tfdt",function(l){h=Oi(l.reader,l.version).baseMediaDecodeTime}).box("mdat",function(l){if(null===h)throw Va("Unable to find base media decode time for CEA captions!"),
|
|
807
|
+
new R(2,2,2010);Wr(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
|
|
808
|
+
function Wr(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(t){return t.xg});n=[].concat.apply([],y(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].gh);b.ka();){g=b.M();var q=b.P(),p=null;p=!1;h=1;switch(a.g){case Xr:p=q&31;p=6==p;break;case Yr:h=2;b.skip(1);p=q>>1&63;p=39==p||40==p;break;default:return}if(p)for(q=0,l<n.length&&(q=n[l].ie||0),q=(c+q)/d,h=u(Sr(b.sb(g-h))),p=h.next();!p.done;p=h.next())k.push({packet:p.value,pts:q});else try{b.skip(g-h)}catch(t){break}m-=g+4;0==m&&(c=l<n.length?
|
|
809
|
+
c+(n[l].yf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}P("shaka.cea.Mp4CeaParser",Tr);var Ur=0,Xr=1,Yr=2,Vr={avc1:Xr,avc3:Xr,hev1:Yr,hvc1:Yr,dvav:Xr,dva1:Xr,dvh1:Yr,dvhe:Yr};Hb["video/mp4"]=function(){return new Tr};function Zr(){this.g=null}Zr.prototype.init=function(){};Zr.prototype.parse=function(a){this.g?this.g.clearData():this.g=new ej;var b=[];a=Ab(a);if(!rj(a))return b;a=this.g.parse(a);var c=a.bd(),d=a.Od();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=u(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=u(Sr(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
|
|
810
|
+
P("shaka.cea.TsCeaParser",Zr);Hb["video/mp2t"]=function(){return new Zr};function $r(a,b,c){var d=as(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new R(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Ac});if(1<f.length)throw new R(2,4,4050);f.length&&(g=bs(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Ac}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Ac?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
|
|
811
|
+
l.Ac});f.length&&(a=cs(e,k,f,c,h),0==a.length&&(a=[Cd("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=u(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Cd(c,k,e));if(h=Array.from(h)[0]||null)for(k=u(a),b=k.next();!b.done;b=k.next())for(b=u(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{Xf:h,Dj:e,drmInfos:a,ye:g,ag:!0}}
|
|
812
|
+
function ds(a,b,c,d){var e=$r(a,c,d);if(b.ag){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.ag=!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 R(2,4,4008);return e.Xf||b.Xf}
|
|
813
|
+
function es(a){var b=0,c=Eb(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=Ab(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function fs(a){a=u($g(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.children){b=u(b.children);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"LA_URL"==c.tagName)return Yg(c)}return""}
|
|
814
|
+
function gs(a){var b=bh(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=Yg(b)))return b;a=bh(a.node,"urn:microsoft:playready","pro");if(!a||!Yg(a))return"";a=Yg(a);a=vd(a);a=es(a).filter(function(c){return c.type===hs})[0];if(!a)return"";a=jd(a.value,!0);return(a=Rg(a,"WRMHEADER"))?fs(a):""}
|
|
815
|
+
function cs(a,b,c,d,e){var f=[];c=u(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Ac];if(h){var k;if((k=bh(g.node,"urn:microsoft:playready","pro"))&&Yg(k)){k=Yg(k);k=vd(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Pg(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Ac)if(l=e,0==l.size)l=null;else{var m=new Uint8Array([16,119,239,236,192,178,77,2,172,227,
|
|
816
|
+
60,30,82,226,251,75]),n=new Uint8Array([]);l=[{initData:Pg(n,m,l,1),initDataType:"cenc",keyId:g.keyId}]}k=Cd(h,b,g.init||a||k||l);if(h=is.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function as(a){var b=[];a=u(a);for(var c=a.next();!c.done;c=a.next())(c=js(c.value))&&b.push(c);return b}
|
|
817
|
+
function js(a){var b=a.attributes.schemeIdUri,c=eh(a,"urn:mpeg:cenc:2013","default_KID"),d=ch(a,"urn:mpeg:cenc:2013","pssh").map(Zg),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new R(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:vd(g),keyId:null}})}catch(g){throw new R(2,4,4007);}return{node:a,Ac:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
|
|
818
|
+
function bs(a){if(!window.crypto||!window.crypto.subtle)throw Va("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new R(2,4,4042);var b=bh(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new R(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new R(2,4,4051);b=bh(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new R(2,4,4051);a=b.attributes.IV;b=rd(b.attributes.keyUriTemplate);
|
|
819
819
|
if(!a||!b)throw new R(2,4,4051);a=wd(a.substr(2));if(16!=a.byteLength)throw new R(2,4,4048);return{Sh:b,iv:a}}
|
|
820
|
-
var
|
|
821
|
-
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=Yg(a))?a:""});function
|
|
820
|
+
var hs=1,is=(new Map).set("com.widevine.alpha",function(a){var b=bh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Yg(b))?b:(a=bh(a.node,"urn:microsoft","laurl"))?rd(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",gs).set("com.microsoft.playready.recommendation",gs).set("com.microsoft.playready.software",gs).set("com.microsoft.playready.hardware",gs).set("org.w3.clearkey",function(a){var b=bh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Yg(b))?b:(a=bh(a.node,"http://dashif.org/guidelines/clearKey",
|
|
821
|
+
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=Yg(a))?a:""});function ks(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&Va("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
|
|
822
822
|
break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
|
|
823
|
-
function
|
|
824
|
-
lh);if(null==q)break;else if(p>=q)break;w=Math.ceil((q-p)/t)-1}else{if(Infinity==a)break;else if(p/b>=a)break;w=Math.ceil((a*b-p)/t)-1}0<k.length&&p!=l&&(k[k.length-1].end=p/b);for(q=0;q<=w;++q)l=p+t,k.push({start:p/b,end:l/b,Mf:p,rb:n,si:k.length+e}),p=l}b=k}return{timescale:d,Da:c,rd:g,Bb:f/d||0,Lf:f,timeline:b}}function
|
|
825
|
-
function
|
|
826
|
-
function
|
|
827
|
-
[];p.children.length;){var t=p.children.shift();t.tagName&&(t.parent=a);a.children.push(t)}t=u(Object.keys(p.attributes));for(var w=t.next();!w.done;w=t.next())w=w.value,a.attributes[w]=p.attributes[w];return
|
|
828
|
-
function
|
|
829
|
-
;function
|
|
830
|
-
function
|
|
831
|
-
function
|
|
832
|
-
d)}function
|
|
833
|
-
function
|
|
834
|
-
function
|
|
835
|
-
function
|
|
836
|
-
function
|
|
837
|
-
3,3009);H=K.g.byteOffset;K=new
|
|
838
|
-
G.next())I=J.value,I.codecs=a.J.codecs,I.mimeType=a.J.mimeType;h.ld(v);p=new
|
|
839
|
-
function
|
|
840
|
-
a.ha.duration?a.ha.start+a.ha.duration:Infinity,b);g&&(g.segmentIndex=f);return{sc:function(){f&&0!=f.getNumReferences()||f.ae(h);return Promise.resolve(f)}}}function
|
|
841
|
-
function
|
|
842
|
-
function
|
|
843
|
-
Infinity,t=!(a.Fb&&a.ha.Ze);n?(c=n,
|
|
844
|
-
function
|
|
845
|
-
function
|
|
846
|
-
w})}function l(){var K=null!=q&&e[q]||p;return K?n+K:Infinity}var m=a.presentationTimeline,n=a.ha.start,q=a.za.id,p=a.ha.duration,t=b.Da,w=b.rd,x=b.timescale,z=b.wc,v=a.bandwidth||null,B=a.J.id,A=a.J.nb,D=n-b.Bb,G=k();c=a.Fb?Math.max(G[0],G[1]-c+1):G[0];g=g||G[1];G=[];for(var J=c;J<=g;++J){var I=h(J);G.push(I)}var E=new
|
|
847
|
-
h(H);N.push(O);H++}return K>l()&&!N.length?null:N})}return Promise.resolve(E)}function
|
|
848
|
-
r.getNumReferences=function(){return this.h?this.h.timeline.length:0};r.release=function(){
|
|
849
|
-
function
|
|
823
|
+
function ls(a,b){var c=ms(a,b,"timescale"),d=1;c&&(d=kh(c)||1);c=ms(a,b,"duration");(c=kh(c||""))&&(c/=d);var e=ms(a,b,"startNumber"),f=Number(ms(a,b,"presentationTimeOffset"))||0,g=lh(e||"");if(null==e||null==g)g=1;var h=ns(a,b,"SegmentTimeline");b=null;if(h){b=d;a=a.ha.duration||Infinity;e=g;h=Xg(h,"S");for(var k=[],l=-f,m=0;m<h.length;++m){var n=h[m],q=h[m+1],p=dh(n,"t",lh),t=dh(n,"d",lh),w=dh(n,"r",jh);n=dh(n,"k",jh)||0;null!=p&&(p-=f);if(!t)break;p=null!=p?p:l;w=w||0;if(0>w)if(q){q=dh(q,"t",
|
|
824
|
+
lh);if(null==q)break;else if(p>=q)break;w=Math.ceil((q-p)/t)-1}else{if(Infinity==a)break;else if(p/b>=a)break;w=Math.ceil((a*b-p)/t)-1}0<k.length&&p!=l&&(k[k.length-1].end=p/b);for(q=0;q<=w;++q)l=p+t,k.push({start:p/b,end:l/b,Mf:p,rb:n,si:k.length+e}),p=l}b=k}return{timescale:d,Da:c,rd:g,Bb:f/d||0,Lf:f,timeline:b}}function os(a,b){return[b(a.J),b(a.ua),b(a.za)].filter(oe)}function ms(a,b,c){b=os(a,b);a=null;b=u(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
|
|
825
|
+
function ns(a,b,c){b=os(a,b);a=null;b=u(b);for(var d=b.next();!d.done&&!(a=ah(d.value,c));d=b.next());return a}
|
|
826
|
+
function ps(a,b,c,d,e,f){for(var g=eh(a,"http://www.w3.org/1999/xlink","href"),h=eh(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=u(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=Tg("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return Uf(new R(2,4,4028));if("onLoad"!=h)return Uf(new R(2,4,4027));var q=Bd([d],[g]);return e.request(0,jg(q,b)).va(function(p){p=Qg(p.data,a.tagName);if(!p)return Uf(new R(2,4,4001,g));for(a.children=
|
|
827
|
+
[];p.children.length;){var t=p.children.shift();t.tagName&&(t.parent=a);a.children.push(t)}t=u(Object.keys(p.attributes));for(var w=t.next();!w.done;w=t.next())w=w.value,a.attributes[w]=p.attributes[w];return qs(a,b,c,q[0],e,f+1)})}
|
|
828
|
+
function qs(a,b,c,d,e,f){f=void 0===f?0:f;if(eh(a,"http://www.w3.org/1999/xlink","href")){var g=ps(a,b,c,d,e,f);c&&(g=g.va(void 0,function(){return qs(a,b,c,d,e,f)}));return g}g=[];for(var h={},k=u(Wg(a)),l=k.next();!l.done;h={mc:h.mc},l=k.next())h.mc=l.value,"urn:mpeg:dash:resolve-to-zero:2013"==eh(h.mc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.mc}}(h)):"SegmentTimeline"!=h.mc.tagName&&g.push(qs(h.mc,b,c,d,e,f));return Yf(g).va(function(){return a})}
|
|
829
|
+
;function rs(a,b,c,d,e,f,g){var h,k=(new Bg).O("sidx",function(l){h=ss(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new R(2,3,3004);}
|
|
830
|
+
function ss(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.M();if(0==k)throw new R(2,3,3005);if(0==g.version){var l=g.reader.M();var m=g.reader.M()}else l=g.reader.zc(),m=g.reader.zc();g.reader.skip(2);var n=g.reader.ra();a=a+g.size+m;for(m=0;m<n;m++){var q=g.reader.M(),p=(q&2147483648)>>>31;q&=2147483647;var t=g.reader.M();g.reader.skip(4);if(1==p)throw new R(2,3,3006);h.push(new ti(l/k+c,(l+t)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=t;a+=q}g.parser.stop();return h};function ts(a){this.h=Eb(a);this.g=new yg(this.h,0)}ts.prototype.ka=function(){return this.g.ka()};
|
|
831
|
+
function us(a){var b=vs(a);if(7<b.length)throw new R(2,3,3002);var c=0;b=u(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=vs(a);a:{d=u(ws);for(var e=d.next();!e.done;e=d.next())if(xb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.wa();else{if(8==b.length&&b[1]&224)throw new R(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.wa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.wa();d=Eb(a.h,a.g.wa(),b);a.g.skip(b);return new xs(c,
|
|
832
|
+
d)}function vs(a){var b=a.g.wa(),c=a.g.P();if(0==c)throw new R(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ab(a.h,b,c)}var ws=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function xs(a,b){this.id=a;this.g=b}
|
|
833
|
+
function ys(a){if(8<a.g.byteLength)throw new R(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new R(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function zs(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new ts(a.g);for(var n=null,q=null;a.ka();){var p=us(a);if(187==p.id){var t=As(p);t&&(p=c*t.Ei,t=b+t.hi,null!=n&&m.push(new ti(n+g,p+g,l,q,t-1,f,g,h,k)),n=p,q=t)}}null!=n&&m.push(new ti(n+g,d+g,l,q,null,f,g,h,k));return m}
|
|
834
|
+
function As(a){var b=new ts(a.g);a=us(b);if(179!=a.id)throw new R(2,3,3013);a=ys(a);b=us(b);if(183!=b.id)throw new R(2,3,3012);b=new ts(b.g);for(var c=0;b.ka();){var d=us(b);if(241==d.id){c=ys(d);break}}return{Ei:a,hi:c}};function Bs(a,b,c){b=ns(a,b,"Initialization");if(!b)return null;var d=a.J.nb(),e=b.attributes.sourceURL;e&&(d=Bd(d,[rd(e)]));e=0;var f=null;if(b=dh(b,"range",ih))e=b.start,f=b.end;c=new ri(function(){return d},e,f,Cs(a),null,null,c);c.codecs=a.J.codecs;c.mimeType=a.J.mimeType;return c}
|
|
835
|
+
function Ds(a,b,c){var d=Number(ms(a,Es,"presentationTimeOffset"))||0,e=ms(a,Es,"timescale"),f=1;e&&(f=kh(e)||1);var g=d/f||0,h=Bs(a,Es,c);Fs(a,h);var k=Ae(a);return{sc:function(){var l=ns(k,Es,"RepresentationIndex");var m=k.J.nb();l&&(l=rd(l.attributes.sourceURL))&&(m=Bd(m,[l]));l=Gs(k);return Hs(k,b,h,m,l.start,l.end,g)}}}
|
|
836
|
+
function Hs(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,G,J,I;return L(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.Fb||!a.ha.Ze,l=a.ha.start,m=a.ha.duration,n=a.J.mimeType.split("/")[1],q=b,p=null,t=[q(d,e,f,!1),"webm"==n?q(c.$(),c.Aa,c.ja,!0):null],q=null,C(E,Promise.all(t),2);w=E.h;x=w[0];z=w[1]||null;v=null;B=l-g;A=l;D=m?l+m:Infinity;if("mp4"==n)var H=rs(x,e,d,c,B,A,D);else{H=new ts(z);if(440786851!=us(H).id)throw new R(2,3,3008);var K=us(H);if(408125543!=K.id)throw new R(2,
|
|
837
|
+
3,3009);H=K.g.byteOffset;K=new ts(K.g);for(var M=null;K.ka();){var N=us(K);if(357149030==N.id){M=N;break}}if(!M)throw new R(2,3,3010);M=new ts(M.g);N=1E6;for(K=null;M.ka();){var O=us(M);if(2807729==O.id)N=ys(O);else if(17545==O.id)if(4==O.g.byteLength)K=O.g.getFloat32(0);else if(8==O.g.byteLength)K=O.g.getFloat64(0);else throw new R(2,3,3003);}if(null==K)throw new R(2,3,3011);M=N/1E9;K*=M;N=us(new ts(x));if(475249515!=N.id)throw new R(2,3,3007);H=zs(N,H,M,K,d,c,B,A,D)}v=H;G=u(v);for(J=G.next();!J.done;J=
|
|
838
|
+
G.next())I=J.value,I.codecs=a.J.codecs,I.mimeType=a.J.mimeType;h.ld(v);p=new Fk(v);k&&p.pc(A,D,!0);return E.return(p)})}function Es(a){return a.pd}function Gs(a){var b=ns(a,Es,"RepresentationIndex");a=ms(a,Es,"indexRange");a=ih(a||"");b&&(a=dh(b,"range",ih,a));return a}function Fs(a,b){Is(a,b);if(!Gs(a))throw new R(2,4,4002);}function Is(a,b){var c=a.J.mimeType.split("/")[1];if(a.J.contentType!=Jd&&"mp4"!=c&&"webm"!=c)throw new R(2,4,4006);if("webm"==c&&!b)throw new R(2,4,4005);}
|
|
839
|
+
function Cs(a){var b=a.J;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.ee,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Js(a,b,c){var d=Bs(a,Ks,c),e=Ls(a);if(!e.Da&&!e.timeline&&1<e.vc.length)throw new R(2,4,4002);if(!e.Da&&!a.ha.duration&&!e.timeline&&1==e.vc.length)throw new R(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new R(2,4,4002);var f=null,g=null;a.za.id&&a.J.id&&(g=b[a.za.id+","+a.J.id])&&(f=g.segmentIndex);var h=Ms(a.ha.start,a.ha.duration,a.J.nb,e,d,c,a.J.mimeType,a.J.codecs);b=!f;f?f.kd(h,a.presentationTimeline.qb()):f=new Fk(h);a.presentationTimeline.ld(h);a.Fb&&a.ha.Ze||f.pc(a.ha.start,
|
|
840
|
+
a.ha.duration?a.ha.start+a.ha.duration:Infinity,b);g&&(g.segmentIndex=f);return{sc:function(){f&&0!=f.getNumReferences()||f.ae(h);return Promise.resolve(f)}}}function Ks(a){return a.Jb}function Ls(a){var b=Ns(a);a=ls(a,Ks);var c=a.rd;0==c&&(c=1);var d=0;a.Da?d=a.Da*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Da:a.Da,startTime:d,rd:c,Bb:a.Bb,timeline:a.timeline,vc:b}}
|
|
841
|
+
function Ms(a,b,c,d,e,f,g,h){var k=d.vc.length;d.timeline&&d.timeline.length!=d.vc.length&&(k=Math.min(d.timeline.length,d.vc.length));for(var l=a-d.Bb,m=b?a+b:Infinity,n=[],q=d.startTime,p={},t=0;t<k;p={Pc:p.Pc,Lc:p.Lc},t++){p.Lc=d.vc[t];var w=q;q=void 0;q=null!=d.Da?w+d.Da:d.timeline?d.timeline[t].end:w+b;p.Pc=null;w=new ti(a+w,a+q,function(x){return function(){null==x.Pc&&(x.Pc=Bd(c(),[x.Lc.Yh]));return x.Pc}}(p),p.Lc.start,p.Lc.end,e,l,a,m,[],"",null,null,ui,f);w.codecs=h;w.mimeType=g;n.push(w)}return n}
|
|
842
|
+
function Ns(a){return[a.J.Jb,a.ua.Jb,a.za.Jb].filter(oe).map(function(b){return Xg(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.kg&&(a.kg=!0);var c=rd(b.attributes.media);b=dh(b,"mediaRange",ih,{start:0,end:null});return{Yh:c,start:b.start,end:b.end}})};function Os(a,b,c,d,e,f,g,h){var k=Ps(a,g),l=Qs(a);Rs(l);var m=Ae(a);if(l.hd)return Is(a,k),{sc:function(){var w=ks(l.hd,m.J.id,null,null,m.bandwidth||null,null);w=Bd(m.J.nb(),[w]);return Hs(m,b,k,w,0,null,l.Bb)}};if(l.Da)return d||"image"===a.ua.contentType||(a.presentationTimeline.hf(l.Da),a.presentationTimeline.de(a.ha.start)),{sc:function(){return Ss(m,l,e,k,f,g,h)}};var n=null;d=d=null;a.za.id&&a.J.id&&(d=a.za.id+","+a.J.id,d=c[d])&&(n=d.segmentIndex);var q=a.ha.start,p=a.ha.duration?q+a.ha.duration:
|
|
843
|
+
Infinity,t=!(a.Fb&&a.ha.Ze);n?(c=n,Ts(c,l,q,p,t,k),c.Ia(a.presentationTimeline.qb())):n=new Us(l,a.J.id,a.bandwidth,a.J.nb,q,p,k,t,g,a.J.zf);l.timeline&&"image"!==a.ua.contentType&&a.presentationTimeline.sg(l.timeline,q);d&&a.Fb&&(d.segmentIndex=n);return{sc:function(){n instanceof Us&&0==n.getNumReferences()&&Ts(n,l,q,p,t,k);return Promise.resolve(n)}}}function Vs(a){return a.qd}
|
|
844
|
+
function Qs(a){var b=ls(a,Vs),c=ms(a,Vs,"media"),d=ms(a,Vs,"index");return{Da:b.Da,timescale:b.timescale,rd:b.rd,Bb:b.Bb,Lf:b.Lf,timeline:b.timeline,wc:c&&rd(c),hd:d,mimeType:a.J.mimeType,codecs:a.J.codecs}}function Rs(a){var b=a.hd?1:0;b+=a.timeline?1:0;b+=a.Da?1:0;if(0==b)throw new R(2,4,4002);1!=b&&(a.hd&&(a.timeline=null),a.Da=null);if(!a.hd&&!a.wc)throw new R(2,4,4002);}
|
|
845
|
+
function Ss(a,b,c,d,e,f,g){function h(K){var M=(K-w)*t,N=M+b.Bb,O=M+n;M=O+t;var S=Math.min(M,l());O=new ti(O,S,function(){var V=N*x;"BigInt"in window&&V>Number.MAX_SAFE_INTEGER&&(V=BigInt(N)*BigInt(x));V=ks(z,B,K,null,v,V);return Bd(A(),[V])},0,null,d,D,n,l(),[],"",null,null,ui,f);O.codecs=a.J.codecs;O.mimeType=a.J.mimeType;O.i=M;return O}function k(){var K=[Math.max(m.qb(),n),Math.min(m.Hb(),l())].map(function(M){return M-n});K=[Math.ceil(K[0]/t),Math.ceil(K[1]/t)-1];a.J.Eb&&K[1]++;return K.map(function(M){return M+
|
|
846
|
+
w})}function l(){var K=null!=q&&e[q]||p;return K?n+K:Infinity}var m=a.presentationTimeline,n=a.ha.start,q=a.za.id,p=a.ha.duration,t=b.Da,w=b.rd,x=b.timescale,z=b.wc,v=a.bandwidth||null,B=a.J.id,A=a.J.nb,D=n-b.Bb,G=k();c=a.Fb?Math.max(G[0],G[1]-c+1):G[0];g=g||G[1];G=[];for(var J=c;J<=g;++J){var I=h(J);G.push(I)}var E=new Fk(G);G=m.Hb()<l();J=m.R();if(G||J){var H=Math.max(c,g+1);c=t;a.J.Eb&&(c=.1);E.le(c,function(){var K=m.qb();E.Ia(K);var M=u(k());M.next();M=M.next().value;for(var N=[];H<=M;){var O=
|
|
847
|
+
h(H);N.push(O);H++}return K>l()&&!N.length?null:N})}return Promise.resolve(E)}function Ps(a,b){var c=ms(a,Vs,"initialization");if(!c)return null;c=rd(c);var d=a.J.id,e=a.bandwidth||null,f=a.J.nb;b=new ri(function(){var g=ks(c,d,null,null,e,null);return Bd(f(),[g])},0,null,Cs(a),null,null,b);b.codecs=a.J.codecs;b.mimeType=a.J.mimeType;return b}function Us(a,b,c,d,e,f,g,h,k,l){Fk.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.i=e;this.l=f;this.s=g;this.A=k;this.G=l;h&&Ws(this)}na(Us,Fk);r=Us.prototype;
|
|
848
|
+
r.getNumReferences=function(){return this.h?this.h.timeline.length:0};r.release=function(){Fk.prototype.release.call(this);this.h=null};r.Ia=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.i<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.j+=b,0===this.getNumReferences()&&this.release())}};
|
|
849
|
+
function Ts(a,b,c,d,e,f){Xs(a,f);if(a.h){c=a.h.timeline;a.h.wc=b.wc;var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end});0<b.length&&a.h.timeline.push.apply(a.h.timeline,y(b));a.l!==d&&(a.l=d)}else a.h=b,a.i=c,a.l=d;e&&Ws(a)}function Xs(a,b){if(a.s!==b){a.s=b;a=u(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&zi(c,b)}}function Ws(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.Ia(a.i)}}
|
|
850
850
|
r.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.i)return this.j;if(!this.h)return null;var b=this.h.timeline;if(a<this.i||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.i;e=d<c?b[d+1].start+this.i:Infinity===this.l?e.end+this.i:this.l;if(a>=f&&a<e)return d+this.j}return null};
|
|
851
851
|
r.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.wc,e=this.h.timeline[a],f=e.si,g=this.h.Lf+e.Mf;c=this.i-this.h.Bb;var h=this.i+e.end,k=h;a===this.getNumReferences()-1&&Infinity!==this.l&&(k=this.l);for(var l=this.h.codecs,m=this.h.mimeType,n=[],q=(e.end-e.start)/e.rb,p={},t=0;t<e.rb;p={Qc:p.Qc,te:p.te},t++){var w=e.start+q*t,x=w+q;p.te=t+1;p.Qc=null;w=new ti(this.i+w,this.i+x,function(z){return function(){if(!b.h)return[];
|
|
852
|
-
null==z.Qc&&(z.Qc=
|
|
853
|
-
function
|
|
854
|
-
function
|
|
855
|
-
function
|
|
856
|
-
function
|
|
857
|
-
function
|
|
858
|
-
h=a.j.get(g),e>h&&a.j.delete(g);d=d.filter(function(k){for(var l=u(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new rc(k.location)).wb))return!1;return!0});d.length&&(a.B=d[0].rf);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=u(a.h.split(",")),g=e.next();!g.done;g=e.next())if(f=b.get(g.value))a.B=a.h,d.push(f);if(!d.length)for(b=u(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Bd(a.i,d)};function
|
|
859
|
-
function
|
|
860
|
-
r.Uf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,G,J,I,E,H,K,M,N,O,S;return L(function(V){if(1==V.g){d=Ld;if(!b&&1==a.length)return e=
|
|
861
|
-
|
|
852
|
+
null==z.Qc&&(z.Qc=Ys(b.h.wc,b.F,f,b.B,g,z.te,b.C));return z.Qc}}(p),0,null,this.s,c,this.i,this.l,[],"",null,null,ui,this.A);w.codecs=l;w.mimeType=m;0==this.G?0<t&&w.Zd():0!=t%this.G&&w.Zd();n.push(w)}c=new ti(this.i+e.start,k,function(){return 0<e.rb?[]:Ys(d,b.F,f,b.B,g,null,b.C)},0,null,this.s,c,this.i,this.l,n,"",null,null,ui,this.A,0<e.rb);c.codecs=l;c.mimeType=m;c.i=h;this.g[a]=c}return c};
|
|
853
|
+
function Ys(a,b,c,d,e,f,g){a=ks(a,b,c,f,d||null,e);return Bd(g(),[a]).map(function(h){return h.toString()})};function Zs(a){this.o=null;this.A=a;this.G=new cg;this.i=[];this.h=null;this.m=[];this.B=null;this.F=[];this.C=300;this.l=new Map;this.j=new Map;this.g=null;this.s="UNKNOWN"}Zs.prototype.configure=function(a){this.o=a};Zs.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};Zs.prototype.setManifestType=function(a){this.s=a};
|
|
854
|
+
function $s(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g)return c=Bd(a.i,[at(a,b)]),d=jg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),dg(a.G,e),ra(l,2),C(l,e.promise,4);if(2!=l.g)return f=l.h,g=id(f.data),h=JSON.parse(g),1==h.VERSION&&bt(a,h,f.uri),ta(l,0);if((k=va(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Mc(function(){$s(a,b)});a.g.U(a.C);F(l)})}
|
|
855
|
+
function at(a,b){if(!a.m.length)return b;b=new rc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Hc(e)&&vc(b,e);return b.toString()}function bt(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Mc(function(){$s(a,d)});if(c=b.TTL)a.C=c;a.g.U(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
|
|
856
|
+
function ct(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Zs.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
|
|
857
|
+
function dt(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=u(a.m),g=f.next();!g.done;e={Pb:e.Pb},g=f.next())if(e.Pb=g.value,g=b.get(e.Pb))d.push({rf:e.Pb,location:g});else if(g=a.F.find(function(k){return function(l){return l.Wi==k.Pb}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].Pg?(h=new rc(h),tc(h,g["URI-REPLACEMENT"].Pg),d.push({rf:e.Pb,location:h.toString()})):d.push({rf:e.Pb,location:h}))}e=Date.now();f=u(a.j.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
|
|
858
|
+
h=a.j.get(g),e>h&&a.j.delete(g);d=d.filter(function(k){for(var l=u(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new rc(k.location)).wb))return!1;return!0});d.length&&(a.B=d[0].rf);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=u(a.h.split(",")),g=e.next();!g.done;g=e.next())if(f=b.get(g.value))a.B=a.h,d.push(f);if(!d.length)for(b=u(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Bd(a.i,d)};function et(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.o=this.m=!1;this.s=new Set}r=et.prototype;r.release=function(){for(var a=u(this.h.concat(this.g,this.l,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.l=[];this.i=[];this.j=[]};r.Fh=function(){return this.j};r.We=function(){return this.l.slice()};r.oh=function(){return this.i};
|
|
859
|
+
function ft(a,b){var c=[],d=[],e=[],f=[];a=u(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[gt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[ht(n),n]})),l=new Map(h.textStreams.map(function(n){return[it(n),n]}));h=new Map(h.imageStreams.map(function(n){return[jt(n),n]}));if(b){var m=kt(Jd);l.set(it(m),m);m=kt("image");h.set(jt(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Rf:c,Ng:d,Kg:e,jg:f}}
|
|
860
|
+
r.Uf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,G,J,I,E,H,K,M,N,O,S;return L(function(V){if(1==V.g){d=Ld;if(!b&&1==a.length)return e=ft(a,!1),f=e.Rf,g=e.Ng,h=e.Kg,k=e.jg,c.h=Array.from(f[0].values()),c.g=Array.from(g[0].values()),c.l=Array.from(h[0].values()),c.i=Array.from(k[0].values()),V.u(2);l=-1;for(m=0;m<a.length;m++)n=a[m],c.s.has(n.id)||(c.s.add(n.id),-1==l&&(l=m));if(-1==l)return V.return();q=ft(a,!0);p=q.Rf;t=q.Ng;w=q.Kg;x=q.jg;return C(V,Promise.all([lt(c,c.h,p,l,mt,
|
|
861
|
+
nt),lt(c,c.g,t,l,mt,nt),lt(c,c.l,w,l,mt,nt),lt(c,c.i,x,l,mt,nt)]),2)}z=0;v=[];if(c.g.length&&c.h.length)for(I=u(c.h),E=I.next();!E.done;E=I.next())for(H=E.value,K=u(c.g),M=K.next();!M.done;M=K.next())N=M.value,O=ci(H.drmInfos,N.drmInfos),H.drmInfos.length&&N.drmInfos.length&&!O.length||(S=z++,v.push({id:S,language:H.language,disabledUntilTime:0,primary:H.primary,audio:H,video:N,bandwidth:(H.bandwidth||0)+(N.bandwidth||0),drmInfos:O,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));
|
|
862
862
|
else for(B=c.g.length?c.g:c.h,A=u(B),D=A.next();!D.done;D=A.next())G=D.value,J=z++,v.push({id:J,language:G.language,disabledUntilTime:0,primary:G.primary,audio:G.type==d.S?G:null,video:G.type==d.fa?G:null,bandwidth:G.bandwidth||0,drmInfos:G.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});c.j=v;F(V)})};
|
|
863
|
-
function
|
|
864
|
-
f=a.map(function(V){return new Map(V.filter(function(Q){return Q.type===b.ve}).map(function(Q){return[
|
|
863
|
+
function ot(a){var b,c,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,G,J,I,E,H,K,M,N,O;return L(function(S){switch(S.g){case 1:b=Ld;if(1==a.length)return S.return(a[0]);c=a.map(function(V){return new Map(V.filter(function(Q){return Q.type===b.S}).map(function(Q){return[gt(Q),Q]}))});d=a.map(function(V){return new Map(V.filter(function(Q){return Q.type===b.fa}).map(function(Q){return[ht(Q),Q]}))});e=a.map(function(V){return new Map(V.filter(function(Q){return Q.type===b.ma}).map(function(Q){return[it(Q),Q]}))});
|
|
864
|
+
f=a.map(function(V){return new Map(V.filter(function(Q){return Q.type===b.ve}).map(function(Q){return[jt(Q),Q]}))});g=u(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=pt(b.ma),k.set(it(l),l);m=u(f);for(n=m.next();!n.done;n=m.next())q=n.value,p=pt(b.ve),q.set(jt(p),p);t=new et;return C(S,lt(t,[],c,0,qt,rt),2);case 2:return w=S.h,C(S,lt(t,[],d,0,qt,rt),3);case 3:return x=S.h,C(S,lt(t,[],e,0,qt,rt),4);case 4:return z=S.h,C(S,lt(t,[],f,0,qt,rt),5);case 5:v=S.h;B=0;if(x.length&&w.length)for(I=u(w),E=
|
|
865
865
|
I.next();!E.done;E=I.next())for(H=E.value,K=u(x),M=K.next();!M.done;M=K.next())N=M.value,O=B++,N.variantIds.push(O),H.variantIds.push(O);else for(A=x.concat(w),D=u(A),G=D.next();!G.done;G=D.next())J=G.value,J.variantIds=[B++];return S.return(x.concat(w).concat(z).concat(v))}})}
|
|
866
|
-
function
|
|
867
|
-
A.next();!t.done;t=A.next())for(D=t.value,G={},J=u(D),z=J.next();!z.done;G={Bd:G.Bd},z=J.next())if(G.Bd=z.value,!
|
|
868
|
-
function
|
|
869
|
-
function
|
|
870
|
-
function
|
|
871
|
-
function
|
|
872
|
-
function
|
|
873
|
-
function
|
|
874
|
-
d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=u(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=u(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=
|
|
875
|
-
b)}function
|
|
876
|
-
function
|
|
877
|
-
function
|
|
878
|
-
function
|
|
879
|
-
function
|
|
880
|
-
if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=
|
|
881
|
-
function
|
|
882
|
-
function
|
|
883
|
-
if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function
|
|
884
|
-
function
|
|
885
|
-
function
|
|
886
|
-
function
|
|
887
|
-
function
|
|
888
|
-
function
|
|
889
|
-
var
|
|
890
|
-
r.configure=function(a){var b=this.i&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.j&&this.j.presentationTimeline.R()&&this.A.hc();this.h&&this.h.configure(this.g);this.l&&(this.l.Ag(this.g.dash.multiTypeVariantsAllowed&&nb()),this.l.Hg(this.g.dash.useStreamOnceInPeriodFlattening))};r.start=function(a,b){var c=this,d;return L(function(e){if(1==e.g)return c.s=b.isLowLatencyMode(),c.o=[a],c.i=b,C(e,
|
|
891
|
-
r.stop=function(){for(var a=u(Object.values(this.m)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.l&&this.l.release();this.g=this.i=null;this.o=[];this.j=null;this.m={};this.l=null;null!=this.A&&(this.A.stop(),this.A=null);this.h&&this.h.destroy();return this.F.destroy()};r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return ra(c,2),C(c,
|
|
892
|
-
r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.R()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.Hb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.G=b.endTime-a,
|
|
893
|
-
function
|
|
894
|
-
function
|
|
895
|
-
q=
|
|
896
|
-
function
|
|
897
|
-
if((w=ah(b,"ContentSteering"))&&a.i){x=w.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=x;else if(a.h=new
|
|
898
|
-
(S=J.map(Zg),I=Bd(d,S));V=function(){return a.h&&E?
|
|
899
|
-
|
|
900
|
-
za:null,ha:null,ua:null,J:null,bandwidth:0,kg:!1,Eb:Q,profiles:df.split(",")};yd=
|
|
901
|
-
return C(Sb,a.l.Uf(
|
|
902
|
-
break}be=Xg(b,"UTCTiming");return C(Sb,
|
|
903
|
-
function
|
|
904
|
-
function
|
|
866
|
+
function lt(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,G,J,I;return L(function(E){switch(E.g){case 1:g=[];for(h=0;h<d;h++)g.push(new Set);for(k=d;k<c.length;k++)g.push(new Set(c[k].values()));l=u(b);m=l.next();case 2:if(m.done){E.u(4);break}n=m.value;return C(E,st(a,n,c,d,f,g),5);case 5:q=E.h;if(!q)throw new R(2,4,4037);m=l.next();E.u(2);break;case 4:p=u(g);for(t=p.next();!t.done;t=p.next())for(w=t.value,x=u(w),z=x.next();!z.done;z=x.next())v=z.value,(B=tt(a,v,c,e,f,g))&&b.push(B);A=u(g);for(t=
|
|
867
|
+
A.next();!t.done;t=A.next())for(D=t.value,G={},J=u(D),z=J.next();!z.done;G={Bd:G.Bd},z=J.next())if(G.Bd=z.value,!ut(G.Bd)&&(I=b.some(function(H){return function(K){return vt(a,H.Bd,K)}}(G))))throw new R(2,4,4037);return E.return(b)}})}function st(a,b,c,d,e,f){return L(function(g){if(1==g.g)return wt(a,c,b),b.matchedStreams?b.segmentIndex?C(g,xt(b,d),2):g.u(2):g.return(!1);yt(b,d,e,f);return g.return(!0)})}
|
|
868
|
+
function xt(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=u(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return C(l,Promise.all(c),2)}if(a.segmentIndex instanceof Ik)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.h.push(k.segmentIndex);F(l)})}
|
|
869
|
+
function tt(a,b,c,d,e,f){if(ut(b))return null;var g=d(b);wt(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return L(function(h){if(g.segmentIndex)return h.u(0);g.segmentIndex=new Ik;return C(h,xt(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;yt(g,0,e,f);return g}
|
|
870
|
+
function yt(a,b,c,d){for(var e=a.matchedStreams;b<e.length;b++){var f=e[b];c(a,f);var g=!0;"audio"==a.type&&0==ve(a.language,f.language)&&(g=!1);if(g&&(d[b].delete(f),f.fullMimeTypes))for(f=u(f.fullMimeTypes.values()),g=f.next();!g.done;g=f.next())a.fullMimeTypes.add(g.value)}}
|
|
871
|
+
function mt(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=u(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
|
|
872
|
+
function qt(a){a=Object.assign({},a);a.roles=a.roles.slice();a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
|
|
873
|
+
function nt(a,b){function c(g,h){g||(g=[]);h=u(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=u(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");d=ci(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new R(2,4,4038);a.drmInfos=
|
|
874
|
+
d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=u(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=u(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=mt(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),nt(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&nt(a.trickModeVideo,
|
|
875
|
+
b)}function rt(a,b){var c=a.roles;c||(c=[]);for(var d=u(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=u(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,y(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=u(b.closedCaptions),c=b.next();!c.done;c=b.next())d=u(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
|
|
876
|
+
function wt(a,b,c){var d=[];b=u(b);for(var e=b.next();!e.done;e=b.next()){e=zt(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
|
|
877
|
+
function zt(a,b,c){var d={audio:gt,video:ht,text:it,image:jt}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return vt(a,l,m)},video:function(l,m){return vt(a,l,m)},text:At,image:Bt}[c.type];for(var g={audio:Ct,video:Dt,text:Et,image:Ft}[c.type],h=u(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.o&&!ut(e)&&b.delete(d(e));return e}
|
|
878
|
+
function Gt(a,b){function c(d){if(!Ht.has(d)){var e=Ud(d);Ht.set(d,e)}return Ht.get(d)}return a.mimeType!=b.mimeType?!1:c(a.codecs)==c(b.codecs)}r.Ag=function(a){this.m=a};r.Hg=function(a){this.o=a};function vt(a,b,c){return!Gt(b,c)&&!a.m||b.drmInfos&&!bi(b.drmInfos,c.drmInfos)?!1:!0}function At(a,b){return b.language?a.forced!==b.forced||0==ve(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function Bt(){return!0}
|
|
879
|
+
function Ct(a,b,c){var d=Gt(a,b),e=Gt(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=ve(a.language,b.language);e=ve(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;
|
|
880
|
+
if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=It(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Jt)return!0;if(d==Kt)return!1;d=It(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Jt?!0:d==Kt?!1:a.bandwidth&&Lt(a.bandwidth,b.bandwidth,c.bandwidth)==Jt?!0:!1}
|
|
881
|
+
function Dt(a,b,c){var d=Gt(a,b),e=Gt(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=It(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Jt)return!0;if(d==Kt)return!1;if(a.frameRate){d=It(a.frameRate,b.frameRate,c.frameRate);if(d==Jt)return!0;if(d==Kt)return!1}return a.bandwidth&&Lt(a.bandwidth,b.bandwidth,c.bandwidth)==Jt?!0:!1}
|
|
882
|
+
function Et(a,b,c){var d=ve(a.language,b.language),e=ve(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;
|
|
883
|
+
if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Ft(a,b,c){return It(a.width*a.height,b.width*b.height,c.width*c.height)==Jt?!0:!1}
|
|
884
|
+
function pt(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1}}
|
|
885
|
+
function kt(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Fk([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set}}
|
|
886
|
+
function It(a,b,c){if(b==a&&a!=c)return Kt;if(c==a&&a!=b)return Jt;if(b>a){if(c<=a||c-a<b-a)return Jt;if(c-a>b-a)return Kt}else{if(c>a)return Kt;if(a-c<a-b)return Jt;if(a-c>a-b)return Kt}return Mt}function Lt(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Jt:b<a?Kt:Mt}function ut(a){switch(a.type){case Jd:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
|
|
887
|
+
function ht(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function gt(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function it(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
888
|
+
function jt(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}P("shaka.util.PeriodCombiner",et);et.prototype.setUseStreamOnce=et.prototype.Hg;et.prototype.setAllowMultiTypeVariants=et.prototype.Ag;et.prototype.combinePeriods=et.prototype.Uf;et.prototype.getImageStreams=et.prototype.oh;et.prototype.getTextStreams=et.prototype.We;et.prototype.getVariants=et.prototype.Fh;var Jt=1,Mt=0,Kt=-1,Ht=new Map;function Nt(a,b){var c=new DOMParser,d=Ot.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function Pt(a,b){try{var c=nd(a);return Nt(c,b)}catch(d){return null}}
|
|
889
|
+
var Ot=new Jc(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 Qt(){var a=this;this.i=this.g=null;this.o=[];this.j=null;this.I=1;this.m={};this.L={};this.l=new et;this.G=0;this.H=new Qa(5);this.A=new Mc(function(){Rt(a)});this.F=new cg;this.B=null;this.K=[];this.C=Infinity;this.s=!1;this.h=null}r=Qt.prototype;
|
|
890
|
+
r.configure=function(a){var b=this.i&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.j&&this.j.presentationTimeline.R()&&this.A.hc();this.h&&this.h.configure(this.g);this.l&&(this.l.Ag(this.g.dash.multiTypeVariantsAllowed&&nb()),this.l.Hg(this.g.dash.useStreamOnceInPeriodFlattening))};r.start=function(a,b){var c=this,d;return L(function(e){if(1==e.g)return c.s=b.isLowLatencyMode(),c.o=[a],c.i=b,C(e,St(c),2);d=e.h;c.i&&Tt(c,d);if(!c.i)throw new R(2,7,7001);return e.return(c.j)})};
|
|
891
|
+
r.stop=function(){for(var a=u(Object.values(this.m)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.l&&this.l.release();this.g=this.i=null;this.o=[];this.j=null;this.m={};this.l=null;null!=this.A&&(this.A.stop(),this.A=null);this.h&&this.h.destroy();return this.F.destroy()};r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return ra(c,2),C(c,St(a),4);if(2!=c.g)return ta(c,0);b=va(c);if(!a.i||!b)return c.return();a.i.onError(b);F(c)})};
|
|
892
|
+
r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.R()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.Hb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.G=b.endTime-a,Tt(this,0))}}};r.banLocation=function(a){this.h&&this.h.banLocation(a)};
|
|
893
|
+
function St(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=a.o,1<a.o.length&&a.h&&(c=dt(a.h,"Location",!0),c.length&&(b=c)),d=jg(b,a.g.retryParameters),e=Date.now(),C(k,Ut(a,d,0,{type:4}),2);if(3!=k.g){f=k.h;if(!a.i)return k.return(0);f.uri&&f.uri!=f.originalUri&&!a.o.includes(f.uri)&&a.o.unshift(f.uri);return C(k,Vt(a,f.data,f.uri),3)}g=Date.now();h=(g-e)/1E3;a.H.sample(1,h);return k.return(h)})}
|
|
894
|
+
function Vt(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;return L(function(t){if(1==t.g){d=b;e=a.g.dash.manifestPreprocessor;f=cm;if(e!=f){pb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");g=Pt(d,"MPD");if(!g)throw new R(2,4,4001,c);e(g);d=od(g.outerHTML)}h=Qg(d,"MPD");if(!h)throw new R(2,4,4001,c);k=a.g.dash.manifestPreprocessorTXml;l=dm;k!=l&&k(h);if(m=a.g.dash.disableXlinkProcessing)return t.return(Wt(a,h,c));n=a.g.dash.xlinkFailGracefully;
|
|
895
|
+
q=qs(h,a.g.retryParameters,n,c,a.i.networkingEngine);dg(a.F,q);return C(t,q.promise,2)}p=t.h;return t.return(Wt(a,p,c))})}
|
|
896
|
+
function Wt(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,G,J,I,E,H,K,M,N,O,S,V,Q,wa,Da,eb,Ga,Wa,ua,mb,zb,ib,$a,cf,xd,Zd,kd,Bc,$d,df,ae,yd,vi,vg,wi,xi,ef,be,ff;return L(function(Sb){switch(Sb.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=Xg(b,"Location");h=u(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=Zg(l))q=Bd(d,[n])[0],m&&(a.h?ct(a.h,"Location",m,q):f.set(m,q)),e.push(q);a.h?(p=dt(a.h,"Location",!0),0<p.length&&(d=a.o=p)):e.length&&(d=a.o=e);t=Promise.resolve();
|
|
897
|
+
if((w=ah(b,"ContentSteering"))&&a.i){x=w.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=x;else if(a.h=new Zs(a.i),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=x,z=Zg(w))(v=dh(w,"queryBeforeStart",nh,!1))?t=$s(a.h,z):$s(a.h,z);B=u(f.keys());for(A=B.next();!A.done;A=B.next())D=A.value,G=f.get(D),ct(a.h,"Location",D,G)}J=Xg(b,"BaseURL");E=!1;if(a.h)for(H=u(J),K=H.next();!K.done;K=H.next())M=K.value,N=M.attributes.serviceLocation,O=Zg(M),N&&O&&(ct(a.h,"BaseURL",N,O),E=!0);E&&a.h||
|
|
898
|
+
(S=J.map(Zg),I=Bd(d,S));V=function(){return a.h&&E?dt(a.h,"BaseURL"):I?I:[]};Q=0;J&&J.length&&(Q=dh(J[0],"availabilityTimeOffset",mh)||0);wa=a.g.dash.ignoreMinBufferTime;Da=0;wa||(Da=dh(b,"minBufferTime",hh)||0);a.G=dh(b,"minimumUpdatePeriod",hh,-1);eb=dh(b,"availabilityStartTime",gh);Ga=dh(b,"timeShiftBufferDepth",hh);Wa=a.g.dash.ignoreSuggestedPresentationDelay;ua=null;Wa||(ua=dh(b,"suggestedPresentationDelay",hh));mb=a.g.dash.ignoreMaxSegmentDuration;zb=null;mb||(zb=dh(b,"maxSegmentDuration",hh));
|
|
899
|
+
ib=b.attributes.type||"static";if(a.j)for($a=a.j.presentationTimeline,cf=u(Object.values(a.m)),xd=cf.next();!xd.done;xd=cf.next())Zd=xd.value,Zd.segmentIndex&&Zd.segmentIndex.Ia($a.qb());else kd=a.g.defaultPresentationDelay||1.5*Da,Bc=null!=ua?ua:kd,$a=new jk(eb,Bc,a.g.dash.autoCorrectDrift);$a.Bc("static"==ib);($d=$a.R())&&!isNaN(a.g.availabilityWindowOverride)&&(Ga=a.g.availabilityWindowOverride);null==Ga&&(Ga=Infinity);$a.ke(Ga);df=b.attributes.profiles||"";ae={Fb:"static"!=ib,presentationTimeline:$a,
|
|
900
|
+
za:null,ha:null,ua:null,J:null,bandwidth:0,kg:!1,Eb:Q,profiles:df.split(",")};yd=Xt(a,ae,V,b);vi=yd.duration;vg=yd.periods;"static"!=ib&&yd.Zf||$a.ab(vi||Infinity);a.C&&!a.s&&(wi=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.s=a.i.isLowLatencyMode());a.s?$a.Bg(a.C):a.C&&Va("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");$a.hf(zb||1);
|
|
901
|
+
return C(Sb,a.l.Uf(vg,ae.Fb),2);case 2:return C(Sb,t,3);case 3:a.s&&(Da=0,xi=null!=ua?ua:a.g.defaultPresentationDelay,$a.Df(xi));if(a.j){a.j.variants=a.l.j;ef=a.l.We();0<ef.length&&(a.j.textStreams=ef);a.j.imageStreams=a.l.i;a.i.filter(a.j);Sb.u(4);break}a.j={presentationTimeline:$a,variants:a.l.j,textStreams:a.l.We(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:Da||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Yt(b)};if(!$a.Mg()){Sb.u(5);
|
|
902
|
+
break}be=Xg(b,"UTCTiming");return C(Sb,Zt(a,V,be),6);case 6:ff=Sb.h;if(!a.i)return Sb.return();$a.Cg(ff);case 5:$a.Xd();case 4:a.i.makeTextStreamsForClosedCaptions(a.j),F(Sb)}})}
|
|
903
|
+
function Yt(a){var b=ah(a,"ServiceDescription");if(!b)return null;a=ah(b,"Latency");b=ah(b,"PlaybackRate");return a&&a.attributes.max||b?{maxLatency:a&&a.attributes.max?parseInt(a.attributes.max,10)/1E3:null,maxPlaybackRate:b?parseFloat(b.attributes.max):null,minLatency:a&&a.attributes.min?parseInt(a.attributes.min,10)/1E3:null,minPlaybackRate:b?parseFloat(b.attributes.min):null}:null}
|
|
904
|
+
function Xt(a,b,c,d){var e=dh(d,"mediaPresentationDuration",hh),f=[],g=0;d=Xg(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=dh(k,"start",hh,g),n=k.attributes.id,q=dh(k,"duration",hh),p=null;if(l){var t=dh(l,"start",hh);null!=t&&(p=t-m)}else null!=e&&(p=e-m);null==p&&(p=q);if(!(null!==a.B&&null!==n&&null!==m&&m<a.B)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=$t(a,b,c,{start:m,duration:p,node:k,Ze:null==p||!l});f.push(g);b.za.id&&p&&(a.L[b.za.id]=p);if(null==
|
|
905
905
|
p){g=null;break}g=m+p}}a.K=f.map(function(w){return w.id});return null!=e?{periods:f,duration:e,Zf:!1}:{periods:f,duration:g,Zf:!0}}
|
|
906
|
-
function
|
|
907
|
-
}d=c.filter(function(m){return!m.Kf});c=c.filter(function(m){return m.Kf});c=u(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Kf.split(" ");g=u(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=u(k.streams);for(var l=k.next();!l.done;h={Cd:h.Cd},l=k.next())h.Cd=l.value,h.Cd.trickModeVideo=e.streams.find(function(m){return function(n){return Ud(m.Cd.codecs)==Ud(n.codecs)}}(h))}}}c=
|
|
908
|
-
d,Jd);d=
|
|
909
|
-
function
|
|
906
|
+
function $t(a,b,c,d){b.za=au(a,d.node,null,c);b.ha=d;b.za.Eb=b.Eb;b.za.id||(b.za.id="__shaka_period_"+d.start);var e=Xg(d.node,"EventStream");c=b.presentationTimeline.qb();e=u(e);for(var f=e.next();!f.done;f=e.next())bu(a,d.start,d.duration,f.value,c);c=Xg(d.node,"AdaptationSet").map(function(m){return ou(a,b,m)}).filter(oe);if(b.Fb){d=[];e=u(c);for(f=e.next();!f.done;f=e.next()){f=u(f.value.li);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new R(2,4,4018);
|
|
907
|
+
}d=c.filter(function(m){return!m.Kf});c=c.filter(function(m){return m.Kf});c=u(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Kf.split(" ");g=u(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=u(k.streams);for(var l=k.next();!l.done;h={Cd:h.Cd},l=k.next())h.Cd=l.value,h.Cd.trickModeVideo=e.streams.find(function(m){return function(n){return Ud(m.Cd.codecs)==Ud(n.codecs)}}(h))}}}c=pu(a.g.disableAudio,d,"audio");e=pu(a.g.disableVideo,d,"video");f=pu(a.g.disableText,
|
|
908
|
+
d,Jd);d=pu(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new R(2,4,4004);return{id:b.za.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function pu(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,y(e.streams));return d},[])}
|
|
909
|
+
function ou(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ua=au(a,c,b.za,null);var e=!1,f=Xg(c,"Role"),g=f.map(function(E){return E.attributes.value}).filter(oe),h=void 0,k=b.ua.contentType==Jd;k&&(h="subtitle");f=u(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.attributes.schemeIdUri;if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.attributes.value,l){case "main":e=!0;break;case "caption":case "subtitle":h=
|
|
910
910
|
l}}var n;m=Xg(c,"EssentialProperty");f=null;var q=!1;l=!1;m=u(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var t=p.attributes.schemeIdUri;"http://dashif.org/guidelines/trickmode"==t?f=p.attributes.value:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?n=d(parseInt(p.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=t&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=t&&("urn:mpeg:dash:ssr:2023"==t?q=!0:l=!0)}var w=null;m=Xg(c,"SupplementalProperty");m=u(m);for(p=m.next();!p.done;p=m.next())p=
|
|
911
911
|
p.value,t=p.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==t?w=parseInt(p.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t&&(n=d(parseInt(p.attributes.value,10)));m=Xg(c,"Accessibility");var x=new Map,z;m=u(m);for(p=m.next();!p.done;p=m.next())if(t=p.value,p=t.attributes.schemeIdUri,t=t.attributes.value,"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=t){t=t.split(";");for(var v=u(t),B=v.next();!B.done;B=v.next()){var A=B.value,D=B=void 0;A.includes("=")?
|
|
912
912
|
(A=A.split("="),B=A[0].startsWith("CC")?A[0]:"CC"+A[0],D=A[1]||"und"):(B="CC"+p,2==t.length?p+=2:p++,D=A);x.set(B,re(D))}}else x.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=1,null!=t)for(t=u(t.split(";")),B=t.next();!B.done;B=t.next())B=B.value,A=v=void 0,B.includes("=")?(B=B.split("="),v="svc"+B[0],A=B[1].split(",")[0].split(":").pop()):(v="svc"+p,p++,A=B),x.set(v,re(A));else x.set("svc1","und");else"urn:mpeg:dash:role:2011"==p?null!=t&&(g.push(t),"captions"==t&&(h="caption")):
|
|
913
|
-
"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==t?z="visually impaired":"2"==t&&(z="hard of hearing"));if(l)return null;l=Xg(c,"ContentProtection");var G
|
|
914
|
-
if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new R(2,4,4003);}if(!b.ua.contentType||"application"==b.ua.contentType)for(b.ua.contentType=
|
|
913
|
+
"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==t?z="visually impaired":"2"==t&&(z="hard of hearing"));if(l)return null;l=Xg(c,"ContentProtection");var G=$r(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),J=re(b.ua.language||"und"),I=c.attributes.label;(l=Xg(c,"Label"))&&l.length&&(l=Yg(l[0]))&&(I=l);l=Xg(c,"Representation");c=l.map(function(E){if(E=qu(a,b,G,h,J,I,e,g,x,E,z,w))E.hdr=E.hdr||n,E.fastSwitching=q;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.ua.contentType;
|
|
914
|
+
if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new R(2,4,4003);}if(!b.ua.contentType||"application"==b.ua.contentType)for(b.ua.contentType=ru(c[0].mimeType,c[0].codecs),k=u(c),p=k.next();!p.done;p=k.next())p.value.type=b.ua.contentType;k=b.ua.id||"__fake__"+a.I++;m=u(c);for(p=m.next();!p.done;p=m.next()){p=p.value;t=u(G.drmInfos);for(v=t.next();!v.done;v=t.next())v=v.value,v.keyIds=v.keyIds&&p.keyIds?new Set([].concat(y(v.keyIds),y(p.keyIds))):v.keyIds||p.keyIds;a.g.dash.enableAudioGroups&&
|
|
915
915
|
(p.groupId=k)}l=l.map(function(E){return E.attributes.id}).filter(oe);return{id:k,contentType:b.ua.contentType,language:J,Ej:e,streams:c,drmInfos:G.drmInfos,Kf:f,li:l}}
|
|
916
|
-
function
|
|
917
|
-
E.data.byteLength)throw new R(2,4,4049);H={name:"AES-CBC"};K=w;return C(M,window.crypto.subtle.importKey("raw",E.data,H,!0,["decrypt"]),3)}K.cryptoKey=M.h;w.fetchKey=void 0;F(M)})}}}x=function(E,H,K,M){return
|
|
918
|
-
p)&&4002==E.code)return null;throw E;}n=Xg(l,"ContentProtection");n=
|
|
916
|
+
function qu(a,b,c,d,e,f,g,h,k,l,m,n){b.J=au(a,l,b.ua,null);a.C=Math.min(a.C,b.J.Eb);if(!su(b.J))return null;var q=b.ha.start;b.bandwidth=dh(l,"bandwidth",kh)||0;var p=b.J.contentType,t=p==Jd||"application"==p;p="image"==p;try{var w=void 0;if(c.ye){var x=b.J.nb,z=Bd(x(),[c.ye.Sh]),v=jg(z,a.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:c.ye.iv,firstMediaSequenceNumber:0,fetchKey:function(){var E,H,K;return L(function(M){if(1==M.g)return C(M,Ut(a,v,6),2);if(3!=M.g){E=M.h;if(!E.data||16!=
|
|
917
|
+
E.data.byteLength)throw new R(2,4,4049);H={name:"AES-CBC"};K=w;return C(M,window.crypto.subtle.importKey("raw",E.data,H,!0,["decrypt"]),3)}K.cryptoKey=M.h;w.fetchKey=void 0;F(M)})}}}x=function(E,H,K,M){return tu(a,E,H,K,M)};if(b.J.pd)var B=Ds(b,x,w);else if(b.J.Jb)B=Js(b,a.m,w);else if(b.J.qd)B=Os(b,x,a.m,!!a.j,a.g.dash.initialSegmentLimit,a.L,w,n);else{var A=b.ha.duration||0,D=b.J.nb;B={sc:function(){var E=Hk(q,A,D());E.qc(function(H){H.mimeType=b.J.mimeType;H.codecs=b.J.codecs});return Promise.resolve(E)}}}}catch(E){if((t||
|
|
918
|
+
p)&&4002==E.code)return null;throw E;}n=Xg(l,"ContentProtection");n=ds(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);x=!1;Xg(l,"SupplementalProperty").some(function(E){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==E.attributes.schemeIdUri&&"JOC"==E.attributes.value})&&(x=!0);z=!1;t&&(z=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var G;if(p&&((l=Xg(l,"EssentialProperty").find(function(E){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(E.attributes.schemeIdUri)}))&&
|
|
919
919
|
(G=l.attributes.value),!G))return null;var J;l=b.J.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(J="PQ");t=b.J.id?b.za.id+","+b.J.id:"";var I=t&&a.m[t]?a.m[t]:{id:a.I++,originalId:b.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){I.segmentIndex&&(I.segmentIndex.release(),I.segmentIndex=null)},segmentIndex:null,mimeType:b.J.mimeType,codecs:l,
|
|
920
920
|
frameRate:b.J.frameRate,pixelAspectRatio:b.J.pixelAspectRatio,bandwidth:b.bandwidth,width:b.J.width,height:b.J.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.ua.language,label:f,type:b.ua.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.J.emsgSchemeIdUris,roles:h,forced:z,channelsCount:b.J.ee,audioSamplingRate:b.J.audioSamplingRate,spatialAudio:x,closedCaptions:k,hdr:J,videoLayout:void 0,tilesLayout:G,accessibilityPurpose:m,external:!1,
|
|
921
921
|
fastSwitching:!1,fullMimeTypes:new Set([Nd(b.J.mimeType,b.J.codecs)])};I.createSegmentIndex=function(){var E;return L(function(H){if(1==H.g){if(I.segmentIndex)return H.u(0);E=I;return C(H,B.sc(),3)}E.segmentIndex=H.h;F(H)})};t&&b.Fb&&!a.m[t]&&(a.m[t]=I);return I}
|
|
922
|
-
function
|
|
923
|
-
function
|
|
924
|
-
oh)||c.frameRate,q=b.attributes.sar||c.pixelAspectRatio,p=
|
|
925
|
-
dh(A,"cadence",jh));return{nb:function(){return Bd(d(),f.length?a.h&&h?
|
|
926
|
-
function
|
|
927
|
-
function
|
|
928
|
-
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function
|
|
929
|
-
function
|
|
930
|
-
function
|
|
931
|
-
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":
|
|
932
|
-
3);break;case 5:va(n);case 3:g=f.next();n.u(2);break;case 4:return
|
|
933
|
-
function
|
|
934
|
-
function
|
|
935
|
-
function
|
|
936
|
-
function
|
|
937
|
-
function
|
|
938
|
-
c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=u(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=
|
|
939
|
-
g.name&&(g.attributes.push(new
|
|
940
|
-
var
|
|
941
|
-
function
|
|
942
|
-
function
|
|
943
|
-
null,q=null,p=null,t;(new Bg).box("moov",Gg).box("trak",Gg).O("tkhd",function(v){v=
|
|
944
|
-
v.P();G&128;)G=v.P();if(3==A)v.ra(),G=v.P(),G&128&&v.ra(),G&64&&v.skip(v.P()),G&32&&v.ra();else if(4==A)D=v.P(),v.skip(12);else if(5==A)break}D&&(B+="."+
|
|
945
|
-
function(v){t=v.name;Lg(v)}).box("dvav",function(v){t=v.name;Lg(v)}).box("dvh1",function(v){t=v.name;Lg(v)}).box("dvhe",function(v){t=v.name;Lg(v)}).box("vp09",function(v){t=v.name;Lg(v)}).box("av01",function(v){t=v.name;Lg(v)}).box("avcC",function(v){var B=t||"";switch(t){case "dvav":B="avc3";break;case "dva1":B="avc1"}v=v.reader;v.skip(1);v=B+"."+
|
|
946
|
-
A.skip(1);v=A.P();var D=["","A","B","C"][v>>6],G=v&31,J=A.M(),I=(v&32)>>5?"H":"L";v=[A.P(),A.P(),A.P(),A.P(),A.P(),A.P()];A=A.P();for(var E=0,H=0;32>H;H++){E|=J&1;if(31==H)break;E<<=1;J>>=1}B=B+("."+D+G)+("."+
|
|
947
|
-
v=A.P();A=A.P();f.push(B+"."+
|
|
948
|
-
Gg).box("frma",function(v){v=
|
|
949
|
-
for(b=a.next();!b.done;b=a.next())b=b.value,x.set(b,b);z.g()}return{type:w?"audio":"video",mimeType:w?"audio/mp4":"video/mp4",codecs:
|
|
950
|
-
function
|
|
951
|
-
this.da=new Map;this.ia=new Map;this.pa=new Map;this.lb=this.B=!1;this.cb=new Qa(5);this.j=null}r=
|
|
922
|
+
function Rt(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,ra(d,2),C(d,St(a),4);case 4:b=d.h;ta(d,3);break;case 2:if(c=va(d),a.i){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c)}case 3:if(!a.i)return d.return();a.i.onManifestUpdated();Tt(a,b);F(d)}})}function Tt(a,b){if(!(0>a.G)){var c=a.G;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.A.U(Math.max(c-b,Ra(a.H)))}}
|
|
923
|
+
function au(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ee:null,audioSamplingRate:null,Eb:0,zf:0};d=d||c.nb;var e=b.attributes.id,f=Xg(b,"BaseURL"),g,h=!1;if(a.h)for(var k=u(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=Zg(m);l&&m&&(ct(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(Zg));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=b.attributes.codecs||c.codecs;var n=dh(b,"frameRate",
|
|
924
|
+
oh)||c.frameRate,q=b.attributes.sar||c.pixelAspectRatio,p=uu(Xg(b,"InbandEventStream"),c.emsgSchemeIdUris),t=Xg(b,"AudioChannelConfiguration");t=vu(t)||c.ee;var w=dh(b,"audioSamplingRate",lh)||c.audioSamplingRate;k||(k=ru(l,m));var x=ah(b,"SegmentBase"),z=ah(b,"SegmentTemplate"),v=x?dh(x,"availabilityTimeOffset",mh)||0:0,B=z?dh(z,"availabilityTimeOffset",mh)||0:0,A=f&&f.length?dh(f[0],"availabilityTimeOffset",mh)||0:0;v=c.Eb+A+v+B;B=null;(A=ah(b,"SegmentSequenceProperties"))&&(A=ah(A,"SAP"))&&(B=
|
|
925
|
+
dh(A,"cadence",jh));return{nb:function(){return Bd(d(),f.length?a.h&&h?dt(a.h,e):g?g:[]:[])},pd:x||c.pd,Jb:ah(b,"SegmentList")||c.Jb,qd:z||c.qd,width:dh(b,"width",lh)||c.width,height:dh(b,"height",lh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:q,emsgSchemeIdUris:p,id:e,language:b.attributes.lang,ee:t,audioSamplingRate:w,Eb:v,zf:B||c.zf}}
|
|
926
|
+
function uu(a,b){b=b.slice();a=u(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
|
|
927
|
+
function vu(a){a=u(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.attributes.schemeIdUri)if(c=c.attributes.value)switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
|
|
928
|
+
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function su(a){var b=a.pd?1:0;b+=a.Jb?1:0;b+=a.qd?1:0;if(0==b)return a.contentType==Jd||"application"==a.contentType?!0:!1;1!=b&&(a.pd&&(a.Jb=null),a.qd=null);return!0}
|
|
929
|
+
function wu(a,b,c,d){var e,f,g,h,k,l,m;return L(function(n){if(1==n.g)return e=[rd(c)],f=Bd(b(),e),g=jg(f,a.g.retryParameters),g.method=d,h=a.i.networkingEngine.request(4,g),dg(a.F,h),C(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=id(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
|
|
930
|
+
function Zt(a,b,c){var d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:d=c.map(function(q){return{scheme:q.attributes.schemeIdUri,value:q.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=u(d),g=f.next();case 2:if(g.done){n.u(4);break}h=g.value;ra(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.u(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.u(8);
|
|
931
|
+
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Va("NTP UTCTiming scheme is not supported");break;default:Va("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return C(n,wu(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return C(n,wu(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ta(n,
|
|
932
|
+
3);break;case 5:va(n);case 3:g=f.next();n.u(2);break;case 4:return Va("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
|
|
933
|
+
function bu(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=dh(d,"timescale",lh)||1;d=u(Xg(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=dh(k,"presentationTime",lh)||0,m=dh(k,"duration",lh)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.attributes.id||"",eventElement:ph(k),eventNode:k},a.i.onTimelineRegionAdded(k))}}
|
|
934
|
+
function tu(a,b,c,d,e){var f,g,h,k;return L(function(l){if(1==l.g)return f=pg,g=e?0:1,h=jl(b,c,d,a.g.retryParameters),C(l,Ut(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function ru(a,b){b=Nd(a,b);return ee(b)?Jd:a.split("/")[0]}function Ut(a,b,c,d){b=a.i.networkingEngine.request(c,b,d);dg(a.F,b);return b.promise}P("shaka.dash.DashParser",Qt);mi["application/dash+xml"]=function(){return new Qt};mi["video/vnd.mpeg.dash.mpd"]=function(){return new Qt};function xu(){}P("shaka.dependencies",xu);xu.has=function(a){return yu.has(a)};xu.add=function(a,b){if(!zu[a])throw Error(a+" is not supported");a==Au?pb("mux.js","mux.js is no longer used in Shaka Player."):yu.set(a,function(){return b})};var Au="muxjs",zu={Fj:Au,ISOBoxer:"ISOBoxer"};xu.Allowed=zu;var yu=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function Bu(a,b,c){this.type=a;this.g=b;this.segments=c||null}function Cu(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}Cu.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
|
|
935
|
+
function Du(a){var b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function Eu(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Z(a,b,c){return(a=Eu(a,b))?a.value:c||null}function Fu(a,b){a=Eu(a,b);if(!a)throw new R(2,4,4023,b);return a.value}function Gu(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.rb=c}function Hu(a,b){this.name=a;this.value=b};function Iu(a,b){return a.filter(function(c){return c.name==b})}function Ju(a,b){return a.filter(function(c){return Fu(c,"TYPE")==b})}function Ku(a,b){a=u(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Lu(a,b,c){c=void 0===c?0:c;return(a=Ku(a,b))?Number(a.value):c}function Mu(a,b,c){return b?Nu(a,[b],c):[]}
|
|
936
|
+
function Nu(a,b,c){if(!b.length)return[];b=Bd(a,b);a=[];b=u(b);for(var d=b.next();!d.done;d=b.next()){var e=a,f=e.push;var g=d.value;if((d=c)&&d.size){g=String(g).replace(/%7B/g,"{").replace(/%7D/g,"}");var h=g.match(/{\$\w*}/g);if(h){h=u(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=k.slice(2,k.length-1),m=d.get(l);if(m)g=g.replace(k,m);else throw new R(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function Ou(a){this.h=a||"";this.g=0}function Pu(a){Qu(a,/[ \t]+/gm)}function Qu(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Ru(a){return a.g==a.h.length?null:(a=Qu(a,/[^ \t\n]*/gm))?a[0]:null};function Su(){this.g=0}
|
|
937
|
+
function Tu(a,b){b=id(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new R(2,4,4015);b=0;for(var d=!0,e=u(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=Uu(a,f),--a.g,Vu.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=Uu(a,g);if(Wu.includes(g.name)){if(1!=b)throw new R(2,4,4017);g=
|
|
938
|
+
c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=u(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=Uu(a,k),Vu.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==Z(k,"TYPE")?f.push(k):"MAP"==Z(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new Gu(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new Gu("",d,f)));return new Bu(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
|
|
939
|
+
g.name&&(g.attributes.push(new Hu("URI",h)),d=!0)}}return new Bu(b,e)}function Uu(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new R(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Ou(d);var f;(f=Qu(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Qu(d,g);)c.push(new Hu(f[1],f[2]||f[3])),Pu(d)}return new Cu(a,b,c,e)}
|
|
940
|
+
var Vu="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 EXT-X-PART-INF".split(" "),Wu="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Xu(){}function Yu(a){try{var b=Zu(a);return Wf({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Uf(c)}}
|
|
941
|
+
function Zu(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new R(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new R(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=vd(a):e=od(a);return{data:e,contentType:c}}P("shaka.net.DataUriPlugin",Xu);Xu.parse=Yu;fg("data",Yu);function $u(a){var b=Xd(a),c=b.split("/")[0];a=Yd(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Nf:null}}
|
|
942
|
+
function av(a,b){function c(v){return d(v.name)}function d(v){v=v.toLowerCase();switch(v){case "avc1":case "avc3":f.push(v+".42E01E");h=!0;break;case "hev1":case "hvc1":f.push(v+".1.6.L93.90");h=!0;break;case "dvh1":case "dvhe":f.push(v+".05.04");h=!0;break;case "vp09":f.push(v+".00.10.08");h=!0;break;case "av01":f.push(v+".0.01M.08");h=!0;break;case "mp4a":e.push("mp4a.40.2");g=!0;break;case "ac-3":case "ec-3":case "opus":case "flac":e.push(v),g=!0}}var e=[],f=[],g=!1,h=!1,k=null,l=null,m=null,n=
|
|
943
|
+
null,q=null,p=null,t;(new Bg).box("moov",Gg).box("trak",Gg).O("tkhd",function(v){v=Ri(v.reader,v.version);l=String(v.height);m=String(v.width)}).box("mdia",Gg).O("mdhd",function(v){k=Pi(v.reader,v.version).language}).box("minf",Gg).box("stbl",Gg).O("stsd",Ig).box("mp4a",function(v){var B=v.reader;B.skip(6);B.skip(2);B.skip(8);var A=B.ra();B.skip(2);B.skip(2);B.skip(2);B=B.ra()+B.ra()/65536;n=A;q=B;v.reader.ka()?Gg(v):c(v)}).box("esds",function(v){v=v.reader;for(var B="mp4a",A,D;v.ka();){A=v.P();for(var G=
|
|
944
|
+
v.P();G&128;)G=v.P();if(3==A)v.ra(),G=v.P(),G&128&&v.ra(),G&64&&v.skip(v.P()),G&32&&v.ra();else if(4==A)D=v.P(),v.skip(12);else if(5==A)break}D&&(B+="."+Ti(D),5==A&&v.ka()&&(A=v.P(),D=(A&248)>>3,31===D&&v.ka()&&(D=32+((A&7)<<3)+((v.P()&224)>>5)),B+="."+D));e.push(B);g=!0}).box("ac-3",c).box("ec-3",c).box("opus",c).box("Opus",c).box("fLaC",c).box("avc1",function(v){t=v.name;Lg(v)}).box("avc3",function(v){t=v.name;Lg(v)}).box("hev1",function(v){t=v.name;Lg(v)}).box("hvc1",function(v){t=v.name;Lg(v)}).box("dva1",
|
|
945
|
+
function(v){t=v.name;Lg(v)}).box("dvav",function(v){t=v.name;Lg(v)}).box("dvh1",function(v){t=v.name;Lg(v)}).box("dvhe",function(v){t=v.name;Lg(v)}).box("vp09",function(v){t=v.name;Lg(v)}).box("av01",function(v){t=v.name;Lg(v)}).box("avcC",function(v){var B=t||"";switch(t){case "dvav":B="avc3";break;case "dva1":B="avc1"}v=v.reader;v.skip(1);v=B+"."+Ti(v.P())+Ti(v.P())+Ti(v.P());f.push(v);h=!0}).box("hvcC",function(v){var B=t||"";switch(t){case "dvh1":B="hvc1";break;case "dvhe":B="hev1"}var A=v.reader;
|
|
946
|
+
A.skip(1);v=A.P();var D=["","A","B","C"][v>>6],G=v&31,J=A.M(),I=(v&32)>>5?"H":"L";v=[A.P(),A.P(),A.P(),A.P(),A.P(),A.P()];A=A.P();for(var E=0,H=0;32>H;H++){E|=J&1;if(31==H)break;E<<=1;J>>=1}B=B+("."+D+G)+("."+Ti(E,!0));B+="."+I+A;D="";for(G=v.length;G--;)if((I=v[G])||D)D="."+I.toString(16).toUpperCase()+D;B+=D;f.push(B);h=!0}).box("dvcC",function(v){var B=t||"";switch(t){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B="dva1";break;case "avc3":B="dvav"}var A=v.reader;A.skip(2);
|
|
947
|
+
v=A.P();A=A.P();f.push(B+"."+Ui(v>>1&127)+"."+Ui(v<<5&32|A>>3&31));h=!0}).O("vpcC",function(v){var B=t||"",A=v.reader;v=A.P();var D=A.P();A=A.P()>>4&15;f.push(B+"."+Ui(v)+"."+Ui(D)+"."+Ui(A));h=!0}).box("av1C",function(v){var B=t||"",A=v.reader;A.skip(1);v=A.P();A=A.P();var D=v>>>5,G=(A&64)>>6;f.push(B+"."+D+"."+Ui(v&31)+(A>>>7?"H":"M")+"."+Ui(2===D&&G?(A&32)>>5?12:10:G?10:8)+"."+((A&16)>>4)+"."+((A&8)>>3)+((A&4)>>2)+(A&3)+"."+Ui(1)+"."+Ui(1)+"."+Ui(1)+".0");h=!0}).box("enca",Mg).box("encv",Lg).box("sinf",
|
|
948
|
+
Gg).box("frma",function(v){v=Si(v.reader).Ea;d(v)}).box("colr",function(v){v=v.reader;var B=null,A=v.sb(4);var D=String.fromCharCode(A[0]);D+=String.fromCharCode(A[1]);D+=String.fromCharCode(A[2]);D+=String.fromCharCode(A[3]);if("nclx"===D)switch(v.ra(),A=v.ra(),v.ra(),A){case 1:case 6:case 13:case 14:case 15:B="SDR";break;case 16:B="PQ";break;case 18:B="HLG"}p=B}).parse(a||b,!0);if(!e.length&&!f.length)return null;var w=g&&!h,x=new Map;if(h){var z=new Gb("video/mp4");a&&z.init(a);z.i(b);a=u(z.j());
|
|
949
|
+
for(b=a.next();!b.done;b=a.next())b=b.value,x.set(b,b);z.g()}return{type:w?"audio":"video",mimeType:w?"audio/mp4":"video/mp4",codecs:bv(e.concat(f)).join(", "),language:k,height:l,width:m,channelCount:n,sampleRate:q,closedCaptions:x,Nf:p}}function bv(a){var b=new Set,c=[];a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Wd(d);b.has(e)||(c.push(d),b.add(e))}b=Kd("audio",c);d=Kd("video",c);a=Kd(Jd,c);d=cv(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
|
|
950
|
+
function cv(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")});return b?kb('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}function dv(a){var b=null;(new Bg).box("moov",Gg).box("trak",Gg).box("mdia",Gg).box("minf",Gg).box("stbl",Gg).O("stsd",Ig).box("encv",Lg).box("enca",Mg).box("sinf",Gg).box("schi",Gg).O("tenc",function(c){c=c.reader;c.P();c.P();c.P();c.P();b=zd(c.sb(16))}).parse(a,!0);return b};function ev(){var a=this;this.g=this.i=null;this.A=1;this.o=new Map;this.H=new Map;this.K=new Map;this.K.set("video",new Map);this.K.set("audio",new Map);this.K.set(Jd,new Map);this.K.set("image",new Map);this.Ta=new Set;this.h=new Map;this.l=null;this.aa="";this.Ra=new Su;this.I=-1;this.T=Infinity;this.ea=this.mb=!1;this.s=new Mc(function(){fv(a)});this.qa=gv;this.C=null;this.Sa=0;this.m=Infinity;this.ta=this.sa=this.L=0;this.N=new cg;this.F=new Map;this.G=new Map;this.Y=new Map;this.ba=new Map;
|
|
951
|
+
this.da=new Map;this.ia=new Map;this.pa=new Map;this.lb=this.B=!1;this.cb=new Qa(5);this.j=null}r=ev.prototype;r.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};r.start=function(a,b){var c=this,d;return L(function(e){return 1==e.g?(c.i=b,c.B=b.isLowLatencyMode(),C(e,hv(c,[a]),2)):3!=e.g?(d=e.h,c.aa=d.uri,C(e,iv(c,d.data,a),3)):e.return(c.C)})};
|
|
952
952
|
r.stop=function(){this.s&&(this.s.stop(),this.s=null);var a=[];this.N&&(a.push(this.N.destroy()),this.N=null);this.g=this.i=null;this.Ta.clear();this.C=null;this.h.clear();this.H.clear();this.G.clear();this.o.clear();this.Y.clear();this.ba.clear();this.da.clear();this.ia.clear();this.pa.clear();this.j&&this.j.destroy();return Promise.all(a)};
|
|
953
|
-
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){if(!
|
|
954
|
-
h&&
|
|
955
|
-
function
|
|
956
|
-
b.$().includes(m)||b.ug.push(m);n=
|
|
957
|
-
"SKIPPED-SEGMENTS")):0,E=
|
|
958
|
-
function
|
|
953
|
+
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){if(!jv(a))return m.return();b=[];c=Array.from(a.h.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=u(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(kv(a,g));return C(m,Promise.all(b),2)}lv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.fd});d.length&&!h&&(k=mv,nv(a,k.Rg),l=d.map(function(n){return n.yb}),a.l.ab(Math.min.apply(Math,y(l))),a.i.updateDuration());
|
|
954
|
+
h&&ov(a);F(m)})};function pv(a,b){return jv(a)?a.K.get(b.type):b.$d}
|
|
955
|
+
function kv(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,G,J,I,E,H,K,M,N,O,S;return L(function(V){if(1==V.g){c=[];d=u(b.$());for(e=d.next();!e.done;e=d.next())f=e.value,g=new rc(f),h=g.g,b.Gd&&(0<=b.gb&&h.add("_HLS_msn",String(b.gb)),0<=b.hb&&h.add("_HLS_part",String(b.hb))),b.Hd&&h.add("_HLS_skip","YES"),Hc(h)&&vc(g,h),c.push(g.toString());return C(V,hv(a,c,!0),2)}if(3!=V.g){k=V.h;if(!b.stream.segmentIndex)return V.return();l=Tu(a.Ra,k.data);if(1!=l.type)throw new R(2,4,4017);m=k.uri;m==k.originalUri||
|
|
956
|
+
b.$().includes(m)||b.ug.push(m);n=Iu(l.g,"EXT-X-DEFINE");q=qv(a,n,m);p=b.stream;t=pv(a,b);return C(V,rv(a,l,p.mimeType,b.$,q),3)}w=V.h;x=w.keyIds;z=w.drmInfos;v=function(Q,wa){return Q.size===wa.size&&[].concat(y(Q)).every(function(Da){return wa.has(Da)})};v(p.keyIds,x)||(p.keyIds=x,p.drmInfos=z,a.i.newDrmInfo(p));B=sv(a,l,p,t,q,b.$,b.type);A=B.segments;if(D=B.bandwidth)p.bandwidth=D;p.segmentIndex.kd(A,a.l.qb());A.length&&(G=Lu(l.g,"EXT-X-MEDIA-SEQUENCE",0),I=(J=Ku(l.g,"EXT-X-SKIP"))?Number(Z(J,
|
|
957
|
+
"SKIPPED-SEGMENTS")):0,E=tv(G,A),H=E.gb,K=E.hb,b.gb=H+I,b.hb=K,M=t.get(G),p.segmentIndex.Ia(M));N=p.segmentIndex.g[0]||null;b.cc=N.startTime;O=A[A.length-1];b.yb=O.endTime;if(S=Ku(l.g,"EXT-X-ENDLIST"))b.fd=!0;uv(a,l);F(V)})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(a){this.j&&this.j.banLocation(a)};
|
|
958
|
+
function vv(a,b){for(var c=-1==a.I,d=u(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=pv(a,e);if(f=f.g[0]||null){g=u(g);for(var h=g.next();!h.done;h=g.next()){h=u(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.I=Math.max(a.I,k));e.Ee=k;break}}}}if(!(0>a.I))for(b=u(b),e=b.next();!e.done;e=b.next())if(c=e.value,wv(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.I-c.Ee,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),xv(a,
|
|
959
959
|
c,d)}
|
|
960
|
-
function
|
|
961
|
-
function
|
|
962
|
-
function
|
|
963
|
-
|
|
964
|
-
primary:!0,audio:"audio"==z?K.stream:null,video:"video"==z?K.stream:null,bandwidth:K.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new R(2,7,7001);1==d.type&&(
|
|
965
|
-
type:"HLS",serviceDescription:null};if(a.ea||!a.g.hls.disableCodecGuessing){ua.u(9);break}O=[];S=u(a.C.variants);for(V=S.next();!V.done;V=S.next())Q=V.value,Q.audio&&""===Q.audio.codecs&&O.push(Q.audio.createSegmentIndex()),Q.video&&""===Q.video.codecs&&O.push(Q.video.createSegmentIndex());return C(ua,Promise.all(O),9);case 9:a.i.makeTextStreamsForClosedCaptions(a.C);if(1==f.length){wa=[];Da=f[0];
|
|
960
|
+
function yv(a,b){if(Infinity==a.T){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.h&&(a.T=Math.min(a.T,d.h))}}b=a.T;if(Infinity!=b)for(d=u(a.h.values()),c=d.next();!c.done;c=d.next())if(c=c.value,!wv(a,c.type)){var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.h)Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.$(),"Expect AV sync issues!");else for(xv(a,c,f.h-b-f.startTime),c=u(e),e=c.next();!e.done;e=c.next())e.value.Hf(b)}}}
|
|
961
|
+
function xv(a,b,c){b.cc+=c;b.yb+=c;a=pv(a,b);for(var d=u(a),e=d.next();!e.done;e=d.next()){var f=u(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.$()}
|
|
962
|
+
function iv(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,G,J,I,E,H,K,M,N,O,S,V,Q,wa,Da,eb,Ga,Wa;return L(function(ua){switch(ua.g){case 1:d=Tu(a.Ra,b);e=Iu(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new jk(null,0);a.l.Bc(!0);k=function(){return[c]};if(1==d.type)return C(ua,zv(a,d,k),7);Av(a,e);l=Iu(d.g,"EXT-X-MEDIA");m=Iu(d.g,"EXT-X-STREAM-INF");n=Iu(d.g,"EXT-X-IMAGE-STREAM-INF");q=Iu(d.g,"EXT-X-I-FRAME-STREAM-INF");p=Iu(d.g,"EXT-X-SESSION-KEY");t=Iu(d.g,"EXT-X-SESSION-DATA");w=Iu(d.g,"EXT-X-CONTENT-STEERING");
|
|
963
|
+
Bv(a,t);return C(ua,Cv(a,w),4);case 4:return Dv(a,m),Ev(a,l),C(ua,Fv(a,m,p,l,k,a.o),5);case 5:return f=ua.h,g=Gv(a,l),C(ua,Hv(a,n,q),6);case 6:h=ua.h;ua.u(3);break;case 7:return x=ua.h,z=x.type,v=x.mimeType,B=x.codecs,A=x.language,D=x.height,G=x.width,J=x.channelCount,I=x.sampleRate,E=x.closedCaptions,H=x.Nf,C(ua,Iv(a,a.A++,d,k,c,B,z,A,!0,"Media Playlist",J,E,null,!1,I,!1,v),8);case 8:K=ua.h,a.h.set(c,K),"video"==z&&Jv(K.stream,G,D,null,H,null),f.push({id:0,language:re(A||"und"),disabledUntilTime:0,
|
|
964
|
+
primary:!0,audio:"audio"==z?K.stream:null,video:"video"==z?K.stream:null,bandwidth:K.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new R(2,7,7001);1==d.type&&(jv(a)&&(Kv(a,d),M=a.m,a.s.U(M)),N=Array.from(a.h.values()),Lv(a,N),ov(a));a.C={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
|
|
965
|
+
type:"HLS",serviceDescription:null};if(a.ea||!a.g.hls.disableCodecGuessing){ua.u(9);break}O=[];S=u(a.C.variants);for(V=S.next();!V.done;V=S.next())Q=V.value,Q.audio&&""===Q.audio.codecs&&O.push(Q.audio.createSegmentIndex()),Q.video&&""===Q.video.codecs&&O.push(Q.video.createSegmentIndex());return C(ua,Promise.all(O),9);case 9:a.i.makeTextStreamsForClosedCaptions(a.C);if(1==f.length){wa=[];Da=f[0];eb=u([Da.video,Da.audio]);for(Ga=eb.next();!Ga.done;Ga=eb.next())(Wa=Ga.value)&&!Wa.segmentIndex&&wa.push(Wa.createSegmentIndex());
|
|
966
966
|
if(0<wa.length)return C(ua,Promise.all(wa),0)}ua.u(0)}})}
|
|
967
|
-
function
|
|
968
|
-
u(
|
|
967
|
+
function zv(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,G,J;return L(function(I){switch(I.g){case 1:d=$u(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return I.return(d);e=b.segments[0];f=Mu(c(),e.h);g=f[0];h=new rc(g);k=h.Ma.split(".").pop();if(l=Mv[k])return I.return($u(l));m=pg;n=null;q=Nv(a,b,e.g,c);a.Y.clear();if(!q){I.u(2);break}p=jl(q.$(),q.Xb(),q.Ub(),a.g.retryParameters);return C(I,Ov(a,p,m,{type:0}),3);case 3:t=I.h,n=t.data;case 2:w=0;x=null;if(z=Ku(e.g,"EXT-X-BYTERANGE"))v=
|
|
968
|
+
u(Pv(null,z.value)),w=v.next().value,x=v.next().value;B=jl(f,w,x,a.g.retryParameters);return C(I,Ov(a,B,m,{type:1}),4);case 4:A=I.h;(D=A.headers["content-type"])&&(D=D.split(";")[0].toLowerCase());if("ts"==k||"video/mp2t"==D){var E=A.data;var H=Ab(E);H=(new ej).parse(H);var K=H.bd();H=H.Xe();var M=[],N=!1,O=!1;switch(K.audio){case "aac":case "aac-loas":M.push("mp4a.40.2");N=!0;break;case "mp3":M.push("mp4a.40.34");N=!0;break;case "ac3":M.push("ac-3");N=!0;break;case "ec3":M.push("ec-3");N=!0;break;
|
|
969
969
|
case "opus":M.push("opus"),N=!0}switch(K.video){case "avc":H.Ea?M.push(H.Ea):M.push("avc1.42E01E");O=!0;break;case "hvc":H.Ea?M.push(H.Ea):M.push("hvc1.1.6.L93.90");O=!0;break;case "av1":M.push("av01.0.01M.08"),O=!0}if(M.length){K=N&&!O;N=new Map;if(O){O=new Gb("video/mp2t");O.i(E);E=u(O.j());for(var S=E.next();!S.done;S=E.next())S=S.value,N.set(S,S);O.g()}H={type:K?"audio":"video",mimeType:"video/mp2t",codecs:M.join(", "),language:null,height:H.height,width:H.width,channelCount:null,sampleRate:null,
|
|
970
|
-
closedCaptions:N,Nf:null}}else H=null;if(G=H)return I.return(G)}else if("mp4"==k||"cmfv"==k||"m4s"==k||"fmp4"==k||"video/mp4"==D||"audio/mp4"==D||"video/iso.segment"==D)if(J
|
|
971
|
-
function
|
|
972
|
-
c.h&&a.l.Dg(c.h);a.l.Xd()}function
|
|
973
|
-
function
|
|
974
|
-
function
|
|
975
|
-
function
|
|
976
|
-
function
|
|
977
|
-
function
|
|
978
|
-
function
|
|
979
|
-
function
|
|
980
|
-
q=Z(g,"CHARACTERISTICS"),p=
|
|
981
|
-
function
|
|
982
|
-
function
|
|
983
|
-
w.next())z=x.value,h.add(z);g.push(p)}case 4:l=k.next();Ga.u(3);break;case 2:v={};B=u(b);for(A=B.next();!A.done;A=B.next())D=A.value,G=
|
|
984
|
-
|
|
985
|
-
function
|
|
986
|
-
"URI")});k=e.audio.find(function(x){return x&&x.$().find(function(z){return t.includes(z)})});h=
|
|
987
|
-
q=Z(c,"NAME"),p=
|
|
988
|
-
function
|
|
989
|
-
function
|
|
990
|
-
function
|
|
970
|
+
closedCaptions:N,Nf:null}}else H=null;if(G=H)return I.return(G)}else if("mp4"==k||"cmfv"==k||"m4s"==k||"fmp4"==k||"video/mp4"==D||"audio/mp4"==D||"video/iso.segment"==D)if(J=av(n,A.data))return I.return(J);return I.return(d)}})}
|
|
971
|
+
function ov(a){if(jv(a)){if(a.qa==Qv){for(var b,c=b=Infinity,d=u(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.yb),c=Math.min(c,e.cc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.s);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.ke(b)}}else a.l.ab(Rv(a));if(!a.l.o)for(b=u(a.h.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
|
|
972
|
+
c.h&&a.l.Dg(c.h);a.l.Xd()}function Av(a,b){var c=(new rc(a.aa)).g;b=u(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.o.has(d)||a.o.set(d,f));e&&(d=c.get(e)[0])&&!a.o.has(d)&&a.o.set(e,d)}}
|
|
973
|
+
function qv(a,b,c){c=(new rc(c)).g;var d=new Map;b=u(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Z(f,"NAME"),h=Z(f,"VALUE");e=Z(f,"QUERYPARAM");f=Z(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.o.get(f))&&d.set(f,e)}return d}
|
|
974
|
+
function Dv(a,b){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=Sv(a,d);if(f){var g=Hd(Jd,d);a.G.set(f,g);Kb(d,g)}e&&(f=Hd("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Hd("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
|
|
975
|
+
function Bv(a,b){b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"DATA-ID");c=Z(d,"URI");var f=Z(d,"LANGUAGE");d=Z(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Mu([a.aa],c,a.o)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new T("sessiondata",e);if(a.i)a.i.onEvent(c)}}
|
|
976
|
+
function Cv(a,b){var c,d,e,f,g,h;return L(function(k){if(!a.i||!a.g)return k.return();d=u(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.j=new Zs(a.i);a.j.configure(a.g);a.j.i=[a.aa];a.j.setManifestType("HLS");a.j.h=g;c=$s(a.j,h);break}return C(k,c,0)})}
|
|
977
|
+
function Gv(a,b){var c=Ju(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Tv(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=u(c);for(var d=c.next();!d.done;d=c.next()){var e=Fu(d.value,"GROUP-ID");if(d=a.G.get(e))if(e=a.H.get(e)){e=u(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Uv(Jd,d)||Vv(Jd),Wv(f.stream)}}return b.filter(function(g){return g})}
|
|
978
|
+
function Wv(a){a.fullMimeTypes=new Set([Nd(a.mimeType,a.codecs)])}
|
|
979
|
+
function Hv(a,b,c){var d,e;return L(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return L(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ra(m,2);return C(m,Xv(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=va(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Fu(g,"URI"),k=Z(g,"CODECS")||"";if(a.h.has(h))var l=a.h.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"),
|
|
980
|
+
q=Z(g,"CHARACTERISTICS"),p=Yv(a,a.A++,[h],k,"image",m,!1,n,null,null,q,!1,null,!1),t=Z(g,"RESOLUTION"),w=u(t?t.split("x"):[null,null]),x=w.next().value,z=w.next().value;p.stream.width=Number(x)||void 0;p.stream.height=Number(z)||void 0;var v=Z(g,"BANDWIDTH");v&&(p.stream.bandwidth=Number(v));a.h.set(h,p);l=p}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(B){if(a.g.hls.ignoreImageStreamFailures)return null;throw B;}})),C(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
|
|
981
|
+
function Zv(a,b,c){b=b.filter(function(h){var k=Z(h,"URI")||"";return"SUBTITLES"!=Z(h,"TYPE")&&""!=k});var d={};b=u(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Du(e);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Tv(a,d[g],c)}
|
|
982
|
+
function Fv(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,G,J,I,E,H,K,M,N,O,S,V,Q,wa,Da,eb;return L(function(Ga){switch(Ga.g){case 1:g=[];h=new Set;if(!(0<c.length)){Ga.u(2);break}k=u(c);l=k.next();case 3:if(l.done){Ga.u(2);break}m=l.value;n=Fu(m,"METHOD");q=Z(m,"KEYFORMAT")||"identity";p=null;if("NONE"==n||$v(n)){Ga.u(4);break}if("identity"!=q){p=(t=aw[q])?t(m,""):null;Ga.u(6);break}return C(Ga,bw(a,m,"",e,null,f),8);case 8:p=Ga.h;case 6:if(p){if(p.keyIds)for(w=u(p.keyIds),x=w.next();!x.done;x=
|
|
983
|
+
w.next())z=x.value,h.add(z);g.push(p)}case 4:l=k.next();Ga.u(3);break;case 2:v={};B=u(b);for(A=B.next();!A.done;A=B.next())D=A.value,G=Du(D),v[G]?v[G].push(D):v[G]=[D];J=[];for(I in v)E=v[I],H=E[0],K=Z(H,"FRAME-RATE"),M=Number(Z(H,"AVERAGE-BANDWIDTH"))||Number(Fu(H,"BANDWIDTH")),N=Z(H,"RESOLUTION"),O=u(N?N.split("x"):[null,null]),S=O.next().value,V=O.next().value,Q=Z(H,"VIDEO-RANGE"),(wa=Z(H,"REQ-VIDEO-LAYOUT"))&&wa.includes(",")&&(Da=wa.split(",").filter(function(Wa){return"CH-STEREO"==Wa||"CH-MONO"==
|
|
984
|
+
Wa}),wa=Da[0]),wa=wa||"CH-MONO",eb=cw(a,E,d,M),J.push.apply(J,y(dw(a,eb.audio,eb.video,M,S,V,K,Q,wa,g,h)));return Ga.return(J.filter(function(Wa){return null!=Wa}))}})}
|
|
985
|
+
function cw(a,b,c,d){for(var e={audio:[],video:[]},f=new Map,g=[],h=!1,k=!1,l=u(b),m=l.next();!m.done;m=l.next()){var n=m.value;m=Z(n,"AUDIO");var q=Z(n,"VIDEO"),p=m||q;p&&(g.includes(p)||g.push(p),(n=Z(n,"PATHWAY-ID"))&&f.set(p,n),m?h=!0:q&&(k=!0))}g.length&&c.length&&(l=c.filter(function(x){return g.includes(Fu(x,"GROUP-ID"))}),Zv(a,l,f));l=(f=g.sort().join(","))&&a.H.has(f)?a.H.get(f):[];h?e.audio.push.apply(e.audio,y(l)):k&&e.video.push.apply(e.video,y(l));m=!1;var t=b.map(function(x){return Fu(x,
|
|
986
|
+
"URI")});k=e.audio.find(function(x){return x&&x.$().find(function(z){return t.includes(z)})});h=Sv(a,b[0]);q=Hd("video",h);(p=Hd("audio",h))&&!q?(k="audio",m=0<e.audio.length):!e.audio.length&&!e.video.length&&p&&q?(k="video",h=[[q,p].join()]):e.audio.length&&k?(k="audio",m=!0):k=e.video.length&&!e.audio.length?"audio":"video";if(!m){var w=n=p=q=m=null;!l.length&&(c=c.find(function(x){var z=Z(x,"URI")||"",v=Z(x,"TYPE");x=Fu(x,"GROUP-ID");return"SUBTITLES"!=v&&""==z&&g.includes(x)}))&&(m=Z(c,"LANGUAGE"),
|
|
987
|
+
q=Z(c,"NAME"),p=ew(c),fw(c),n=Z(c,"CHARACTERISTICS"),w=gw(c));a=hw(a,b,h,k,m,q,p,n,w);f&&(a.stream.groupId=f);l.length||(a.stream.bandwidth=d);e[a.stream.type]=[a]}return e}
|
|
988
|
+
function Sv(a,b){var c=Z(b,"CODECS")||"";b=Z(b,"SUPPLEMENTAL-CODECS");a.ea=0<c.length;a.ea||a.g.hls.disableCodecGuessing||(c=[],a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec),c=c.join(","));a=c.split(/\s*,\s*/);b&&(b=b.split(/\s*,\s*/).map(function(d){return d.split("/")[0]}),a.push.apply(a,y(b)));return bv(a)}function ew(a){return(a=Z(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
|
|
989
|
+
function gw(a){return(a=Z(a,"SAMPLE-RATE"))?parseInt(a,10):null}function fw(a){return(a=Z(a,"CHANNELS"))?a.includes("/JOC"):!1}
|
|
990
|
+
function dw(a,b,c,d,e,f,g,h,k,l,m){for(var n=u(c),q=n.next();!q.done;q=n.next())Jv(q.value.stream,e,f,g,h,k);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=u(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=u(c),h=g.next();!h.done;h=g.next()){var p=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=p?p.stream:null)k.drmInfos=l,k.keyIds=m;n=f?f.stream.drmInfos:null;q=p?p.stream.drmInfos:null;p=p?p.$().sort().join(","):"";var t=f?f.$().sort().join(","):
|
|
991
991
|
"";p=p+" - "+t;h&&k&&!bi(n,q)||a.Ta.has(p)||(h={id:a.A++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.Ta.add(p))}return e}
|
|
992
|
-
function
|
|
993
|
-
function
|
|
994
|
-
m=n.next().value;n=n.next().value;(m=c.get(m))&&
|
|
995
|
-
function
|
|
992
|
+
function Ev(a,b){b=Ju(b,"CLOSED-CAPTIONS");b=u(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"LANGUAGE");c=re(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=Fu(d,"GROUP-ID");d=Fu(d,"INSTREAM-ID").replace("SERVICE","svc");a.F.get(e)||a.F.set(e,new Map);a.F.get(e).set(d,c)}}
|
|
993
|
+
function Tv(a,b,c){for(var d=[],e=[],f=new Map,g=u(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Fu(k,"URI");k=Fu(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=Fu(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Jd);if(k==Jd)b=Z(h,"CODECS")||"";else{e=u(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.G.has(l)){b=a.G.get(l);break}}e=d.sort().join(",");if(a.h.has(e))return a.h.get(e);l=a.A++;if(a.j){f=u(f);for(var m=f.next();!m.done;m=f.next()){var n=u(m.value);
|
|
994
|
+
m=n.next().value;n=n.next().value;(m=c.get(m))&&ct(a.j,l,m,n)}}c=Z(h,"LANGUAGE");f=Z(h,"NAME");m="YES"==Z(h,"DEFAULT");n="audio"==k?ew(h):null;var q="audio"==k?fw(h):!1,p=Z(h,"CHARACTERISTICS"),t="YES"==Z(h,"FORCED");h="audio"==k?gw(h):null;d=Yv(a,l,d,b,k,c,m,f,n,null,p,t,h,q);d.stream&&(d.stream.groupId=g);a.H.has(g)?a.H.get(g).push(d):a.H.set(g,[d]);a.h.set(e,d);return d}
|
|
995
|
+
function Xv(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(q){if(1==q.g){c=Fu(b,"URI");d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return q.return(a.h.get(c));e=Z(b,"LANGUAGE");f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=Yv(a,a.A++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Z(b,"RESOLUTION"))?C(q,h.stream.createSegmentIndex(),3):q.u(2)}2!=q.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
|
|
996
996
|
Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return q.return(h)})}
|
|
997
|
-
function
|
|
998
|
-
function
|
|
999
|
-
if(D.aborted)return ua.return();O=N.stream;
|
|
1000
|
-
|
|
1001
|
-
function(){if(B)return B;A=new AbortController;return B=new Promise(function(D){D(t(A.signal))})};x.closeSegmentIndex=function(){B&&!x.segmentIndex&&A.abort();x.segmentIndex&&(x.segmentIndex.release(),x.segmentIndex=null);B=null};return v}function
|
|
1002
|
-
function
|
|
1003
|
-
function
|
|
1004
|
-
function
|
|
1005
|
-
|
|
1006
|
-
0);Ga=
|
|
1007
|
-
function
|
|
997
|
+
function hw(a,b,c,d,e,f,g,h,k){for(var l=a.A++,m=[],n=u(b),q=n.next();!q.done;q=n.next()){var p=q.value;q=Fu(p,"URI");p=Z(p,"PATHWAY-ID");a.j&&p&&ct(a.j,l,p,q);m.push(q)}n=m.sort().join(",");if(a.h.has(n))return a.h.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d){if(b&&"NONE"!=b){b=a.F.get(b);break a}if(!b&&a.F.size)for(b=u(a.F.keys()).next();!b.done;){b=a.F.get(b.value);break a}}b=null}c=Gd(d,c);d=Yv(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.h.set(n,d);return d}
|
|
998
|
+
function Yv(a,b,c,d,e,f,g,h,k,l,m,n,q,p){function t(D){var G,J,I,E,H,K,M,N,O,S,V,Q,wa,Da,eb,Ga,Wa;return L(function(ua){switch(ua.g){case 1:return G=v.$(),C(ua,hv(a,v.$(),!0),2);case 2:J=ua.h;if(D.aborted)return ua.return();I=J.uri;I==J.originalUri||G.includes(I)||z.push(I);E=Tu(a.Ra,J.data);H=void 0;if(a.ea||!a.g.hls.disableCodecGuessing){ua.u(3);break}return C(ua,zv(a,E,w),4);case 4:K=ua.h,H=K.mimeType,d=K.codecs;case 3:return M=jv(a),C(ua,Iv(a,0,E,w,I,d,e,f,g,h,k,l,m,n,q,p,H),5);case 5:N=ua.h;
|
|
999
|
+
if(D.aborted)return ua.return();O=N.stream;jv(a)&&!M&&Kv(a,E);v.cc=N.cc;v.yb=N.yb;v.Hd=N.Hd;v.Gd=N.Gd;v.fd=N.fd;v.$d=N.$d;v.gb=N.gb;v.hb=N.hb;v.ef=!0;x.segmentIndex=O.segmentIndex;x.encrypted=O.encrypted;x.drmInfos=O.drmInfos;x.keyIds=O.keyIds;x.mimeType=O.mimeType;x.bandwidth=x.bandwidth||O.bandwidth;x.codecs=x.codecs||O.codecs;Wv(x);x.drmInfos.length&&a.i.newDrmInfo(x);S=Ld;if(e==S.fa||e==S.S)for(V=u(a.h.values()),Q=V.next();!Q.done;Q=V.next())wa=Q.value,wa.ef||wa.type!=e||(wa.stream.mimeType=O.mimeType,
|
|
1000
|
+
Wv(wa.stream));e==S.ma&&(Da=O.segmentIndex.get(0))&&Da.ca&&(x.mimeType="application/mp4",Wv(x));iw(a)&&(a.mb?Lv(a,[v]):(a.mb=!0,eb=Array.from(a.h.values()),Ga=eb.filter(function(mb){return mb.stream.segmentIndex}),Lv(a,Ga),ov(a),Wa=a.m,0<Wa&&a.s.U(Wa)));F(ua)}})}function w(){return a.j&&1<c.length?dt(a.j,b):z.concat(Nu([a.aa],c,a.o))}var x=jw(a,d,e,f,g,h,k,l,m,n,q,p),z=[],v={stream:x,type:e,ug:z,$:w,cc:0,yb:0,$d:new Map,Hd:!1,Gd:!1,fd:!1,Ee:-1,gb:-1,hb:-1,ef:!1},B=null,A=new AbortController;x.createSegmentIndex=
|
|
1001
|
+
function(){if(B)return B;A=new AbortController;return B=new Promise(function(D){D(t(A.signal))})};x.closeSegmentIndex=function(){B&&!x.segmentIndex&&A.abort();x.segmentIndex&&(x.segmentIndex.release(),x.segmentIndex=null);B=null};return v}function Rv(a){var b=Infinity;a=u(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.yb));return b}
|
|
1002
|
+
function lv(a,b){var c=[];b=u(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.qc(function(e){c.push(e)});a.l.ld(c)}function Lv(a,b){if(!jv(a))for(var c=Rv(a),d=u(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.pc(0,c);lv(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?vv(a,b):(yv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&vv(a,b))}
|
|
1003
|
+
function wv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function iw(a){if(!a.C)return!1;var b=[],c=[];a=u(a.C.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
|
|
1004
|
+
function Iv(a,b,c,d,e,f,g,h,k,l,m,n,q,p,t,w,x){var z,v,B,A,D,G,J,I,E,H,K,M,N,O,S,V,Q,wa,Da,eb,Ga,Wa,ua;return L(function(mb){switch(mb.g){case 1:if(1!=c.type)throw new R(2,4,4017);z=Iu(c.g,"EXT-X-DEFINE");v=qv(a,z,e);var zb=Ku(c.g,"EXT-X-PLAYLIST-TYPE"),ib=Ku(c.g,"EXT-X-ENDLIST");ib=zb&&"VOD"==zb.value||ib;zb=zb&&"EVENT"==zb.value&&!ib;zb=!ib&&!zb;ib?nv(a,gv):zb?nv(a,Qv):nv(a,kw);jv(a)&&uv(a,c);if(x){mb.u(2);break}return C(mb,lw(a,g,f,c,v,d),3);case 3:x=mb.h;case 2:return C(mb,rv(a,c,x,d,v),4);case 4:B=
|
|
1005
|
+
mb.h;A=B.drmInfos;D=B.keyIds;G=B.encrypted;J=B.Vg;if(G&&!A.length&&!J)throw new R(2,4,4026);I=jw(a,f,g,h,k,l,m,n,q,p,t,w);I.encrypted=G;I.drmInfos=A;I.keyIds=D;I.mimeType=x;Wv(I);E=jv(a)?a.K.get(g):new Map;H=sv(a,c,I,E,v,d,g);K=H.segments;if(M=H.bandwidth)I.bandwidth=M;jv(a)&&uv(a,c);N=K[0].startTime;O=K[K.length-1];S=O.endTime;V=new Fk(K);I.segmentIndex=V;wa=(Q=Ku(c.g,"EXT-X-SERVER-CONTROL"))?null!=Eu(Q,"CAN-SKIP-UNTIL"):!1;Da=Q?null!=Eu(Q,"CAN-BLOCK-RELOAD"):!1;eb=Lu(c.g,"EXT-X-MEDIA-SEQUENCE",
|
|
1006
|
+
0);Ga=tv(eb,K);Wa=Ga.gb;ua=Ga.hb;return mb.return({stream:I,type:g,ug:[],$:d,cc:N,yb:S,Hd:wa,Gd:Da,fd:!1,Ee:-1,gb:Wa,hb:ua,$d:E,ef:!1})}})}function tv(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{gb:a,hb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{gb:a,hb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{gb:a,hb:c}}
|
|
1007
|
+
function jw(a,b,c,d,e,f,g,h,k,l,m,n){var q=Uv(c,b)||Vv(c),p=[];if(k){k=u(k.split(","));for(var t=k.next();!t.done;t=k.next())p.push(t.value)}k=void 0;t=null;c==Jd?k=p.includes("public.accessibility.transcribes-spoken-dialog")&&p.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":p.includes("public.accessibility.describes-video")&&(t="visually impaired");p.length||"subtitle"!==k||p.push("subtitle");a={id:a.A++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1008
1008
|
segmentIndex:null,mimeType:q,codecs:b,kind:c==Jd?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:re(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:p,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:t,external:!1,fastSwitching:!1,fullMimeTypes:new Set};
|
|
1009
|
-
|
|
1010
|
-
function
|
|
1011
|
-
!0;K=Z(I,"KEYFORMAT")||"identity";M=null;if(
|
|
1012
|
-
function
|
|
1013
|
-
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,q,p,t,w;return L(function(x){if(1==x.g)return l=
|
|
1009
|
+
Wv(a);return a}
|
|
1010
|
+
function rv(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,G,J,I,E,H,K,M,N,O,S,V;return L(function(Q){switch(Q.g){case 1:f=new Map;if(b.segments)for(g=u(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=Iu(k.g,"EXT-X-KEY"),m=null,l.length)for(m=Nv(a,b,k.g,d,e),n=u(l),q=n.next();!q.done;q=n.next())p=q.value,f.set(p,m);w=t=!1;x=[];z=new Set;v=u(f);B=v.next();case 2:if(B.done){Q.u(4);break}A=B.value;D=u(A);G=D.next().value;J=D.next().value;I=G;E=J;H=Fu(I,"METHOD");if("NONE"==H){Q.u(3);break}t=
|
|
1011
|
+
!0;K=Z(I,"KEYFORMAT")||"identity";M=null;if($v(H)){w=!0;Q.u(3);break}if("identity"!=K){M=(N=aw[K])?N(I,c):null;Q.u(6);break}return C(Q,bw(a,I,c,d,E,e),8);case 8:M=Q.h;case 6:if(M){if(M.keyIds)for(O=u(M.keyIds),S=O.next();!S.done;S=O.next())V=S.value,z.add(V);x.push(M)}case 3:B=v.next();Q.u(2);break;case 4:return Q.return({drmInfos:x,keyIds:z,encrypted:t,Vg:w})}})}
|
|
1012
|
+
function mw(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Va("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new R(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=wd(g.substr(2));if(16!=h.byteLength)throw new R(2,4,4048);}else f=Lu(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.ba.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Fu(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
|
|
1013
|
+
256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,q,p,t,w;return L(function(x){if(1==x.g)return l=Mu(d(),Fu(b,"URI"),e),m=l.sort().join(""),a.da.has(m)||(n=jg(l,a.g.retryParameters),q=Ov(a,n,6),a.da.set(m,q)),C(x,a.da.get(m),2);if(3!=x.g){p=x.h;if(!p.data||p.data.byteLength!=k.bitsKey/8)throw new R(2,4,4049);t={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};w=k;return C(x,window.crypto.subtle.importKey("raw",p.data,t,!0,["decrypt"]),3)}w.cryptoKey=x.h;k.fetchKey=void 0;
|
|
1014
1014
|
F(x)})};a.ba.set(c,k)}return a.ba.get(c)}
|
|
1015
|
-
function
|
|
1016
|
-
|
|
1017
|
-
function
|
|
1018
|
-
function
|
|
1019
|
-
function
|
|
1015
|
+
function uv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Ku(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Ku(b.g,"EXT-X-TARGETDURATION");if(!d)throw new R(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Ku(b.g,"EXT-X-PART-INF"))a.L=Number(Fu(e,"PART-TARGET"));b=Ku(b.g,"EXT-X-SERVER-CONTROL");a.B&&a.L?(a.m=a.lb?5*a.L<=c?Math.min(a.L,a.m):Math.min(c,a.m):Math.min(a.L,a.m),a.ta=b?Number(Fu(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
|
|
1016
|
+
Eu(b,"HOLD-BACK"):null,a.sa=c?Number(c.value):0);a.Sa=Math.max(d,a.Sa)}function Kv(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.ta)b=a.ta;else if(a.sa)b=a.sa;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Sa*c}a.l.Eg(0);a.l.Df(b);a.l.Bc(!1)}
|
|
1017
|
+
function Nv(a,b,c,d,e){var f=Ku(c,"EXT-X-MAP");if(!f)return null;var g=Fu(f,"URI"),h=Mu(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.Y.has(g)){var k=void 0,l=null;c=u(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?$v(Fu(m,"METHOD"))&&m.id<f.id&&(k=mw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=nw(h,f,l,k);a.Y.set(g,b)}return a.Y.get(g)}
|
|
1018
|
+
function nw(a,b,c,d){var e=0,f=null;b=Z(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new ri(function(){return a},e,f,null,null,null,d)}
|
|
1019
|
+
function ow(a,b,c,d,e,f,g,h,k){var l=d.g,m=Ku(l,"EXTINF"),n=0,q=0,p=null;d.rb.length&&!a.B&&Va("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var t=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Ku(l,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(t=gh(w.value))}var x=ui;Ku(l,"EXT-X-GAP")&&(x=2);if(!m){if(0==d.rb.length)throw new R(2,4,4024,"EXTINF");
|
|
1020
1020
|
if(!a.B)return null}var z=[];w=!1;var v=null,B=!1,A=!1;if(a.B&&d.rb.length){n=("video/mp4"==g.mimeType||"audio/mp4"==g.mimeType)&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=t,G={},J=0;J<d.rb.length;G={Nc:G.Nc,yd:G.yd},J++){var I=d.rb[J],E=0==J?c:z[z.length-1],H=0==J?e:E.endTime,K=Number(Z(I,"DURATION"))||a.L;if(K){var M=H+K,N=0,O=null;"EXT-X-PRELOAD-HINT"==I.name?(N=(N=Z(I,"BYTERANGE-START"))?Number(N):0,(E=Z(I,"BYTERANGE-LENGTH"))?O=N+Number(E)-1:N&&(O=Number.MAX_SAFE_INTEGER)):
|
|
1021
|
-
(N=Z(I,"BYTERANGE"),O=u(
|
|
1022
|
-
1].endTime;else return null;w&&(B||0!=z[0].Aa?(w=!1,v=null):z=[]);(m=
|
|
1023
|
-
function
|
|
1024
|
-
function
|
|
1025
|
-
k=
|
|
1021
|
+
(N=Z(I,"BYTERANGE"),O=u(Pv(E,N)),N=O.next().value,O=O.next().value);G.yd=Z(I,"URI");if(G.yd){E=ui;"YES"==Z(I,"GAP")&&(E=2,B=!0);G.Nc=null;var S=function(Q){return function(){null==Q.Nc&&(Q.Nc=Mu(h(),Q.yd,f));return Q.Nc}}(G);n&&0<=N&&null!=O&&(v=S,w=!0);H=new ti(H,M,S,N,O,b,0,0,Infinity,[],"",null,D,E,k);"EXT-X-PRELOAD-HINT"==I.name&&(H.ff(),A=!0);"YES"!=Z(I,"INDEPENDENT")&&0<J&&H.Zd();z.push(H);D&&(D+=K)}}}}if(m){m=Number(m.value.split(",")[0]);if(0==m)return null;n=e+m}else if(z.length)n=z[z.length-
|
|
1022
|
+
1].endTime;else return null;w&&(B||0!=z[0].Aa?(w=!1,v=null):z=[]);(m=Ku(l,"EXT-X-BYTERANGE"))?(p=u(Pv(c,m.value)),q=p.next().value,p=p.next().value):z.length&&(q=z[0].Aa,p=z[z.length-1].ja);c="";m=null;"image"==g.type&&(c="1x1",g=Ku(l,"EXT-X-TILES"))&&(c=Fu(g,"LAYOUT"),(g=Z(g,"DURATION"))&&(m=Number(g)));var V=null;b=new ti(e,n,function(){if(v)return v();null==V&&(V=Mu(h(),d.h,f));return V||[]},q,p,b,0,0,Infinity,z,c,m,t,x,k,0<z.length&&!!d.h);w&&(a.lb=!0,b.ng(),A&&b.ff());return b}
|
|
1023
|
+
function Pv(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.ja+1,d=c+b-1);return[c,d]}
|
|
1024
|
+
function sv(a,b,c,d,e,f,g){var h=b.segments,k=void 0,l=Lu(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),m=Lu(b.g,"EXT-X-MEDIA-SEQUENCE",0),n=Ku(b.g,"EXT-X-SKIP"),q=n?Number(Z(n,"SKIPPED-SEGMENTS")):0,p=m+q,t=0;jv(a)&&d.has(p)&&(t=d.get(p));0===t&&a.qa==Qv&&0<d.size&&!d.has(p)&&(t=a.l.qb());var w=[],x=null;n=[];for(var z=0;z<h.length;z++){var v=h[z],B=0==z?t:x.endTime;p=m+q+z;Ku(v.g,"EXT-X-DISCONTINUITY")&&l++;var A=u(v.g);for(var D=A.next();!D.done;D=A.next())D=D.value,"EXT-X-KEY"==D.name&&($v(Fu(D,"METHOD"))?
|
|
1025
|
+
k=mw(a,D,b,f,e):k=void 0);d.set(p,B);A=Nv(a,b,v.g,f,e);!a.B&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.B=a.i.isLowLatencyMode());if(B=ow(a,A,x,v,B,e,c,f,k))(x=Lu(v.g,"EXT-X-BITRATE"))?n.push({bitrate:x,duration:B.endTime-B.startTime}):n.length&&(x=n.pop(),x.duration+=B.endTime-B.startTime,n.push(x)),x=B,B.j=l,wv(a,g)&&null!=a.I&&p<a.I||w.push(B)}b=void 0;n.length&&(b=n.reduce(function(G,J){return G+J.duration},0),b=Math.round(n.reduce(function(G,J){return G+J.bitrate*J.duration},0)/
|
|
1026
1026
|
b*1E3));if(n=w.some(function(G){return null!=G.h}))for(c={},d=0;d<w.length;c={Gc:c.Gc,Fc:c.Fc,td:c.td,Cb:c.Cb,Cc:c.Cc},d++)if(c.Cb=w[d],null==c.Cb.h)for(c.Fc=0,c.Gc=d,e=function(G){return function(){var J=w[G.Gc];if(J){if(null!=J.h)return J.h+G.Fc;G.Fc-=J.endTime-J.startTime;G.Gc+=1}return null}}(c),c.Cc=0,c.td=d,f=function(G){return function(){var J=w[G.td];if(J){J!=G.Cb&&(G.Cc+=J.endTime-J.startTime);if(null!=J.h)return J.h+G.Cc;--G.td}return null}}(c);null==c.Cb.h;)c.Cb.h=f(),null==c.Cb.h&&(c.Cb.h=
|
|
1027
|
-
e());if(n)for(c=u(w),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=u(e.g),f=e.next();!f.done;f=e.next())f=f.value,f.h=d,d+=f.endTime-f.startTime;c=a.T;if(n&&Infinity!=c&&!
|
|
1028
|
-
function
|
|
1029
|
-
function
|
|
1030
|
-
|
|
1031
|
-
function
|
|
1032
|
-
function
|
|
1033
|
-
function
|
|
1034
|
-
3);case 3:p=D.h,l=zd(p.data);case 2:t="00000000000000000000000000000000";if(!e){D.u(4);break}if(a.pa.has(e)){w=a.pa.get(e);D.u(5);break}x=
|
|
1035
|
-
var
|
|
1036
|
-
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"}}
|
|
1037
|
-
|
|
1038
|
-
Ab(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Pg(a,b,new Set,0);return Cd("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},
|
|
1039
|
-
function
|
|
1040
|
-
function
|
|
1041
|
-
2)),[0,0]));h=
|
|
1042
|
-
case "audio":g=
|
|
1043
|
-
255]));e=
|
|
1044
|
-
a.byteLength);b.set(
|
|
1045
|
-
function
|
|
1046
|
-
0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(y(
|
|
1047
|
-
a.encrypted&&(g=
|
|
1048
|
-
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=
|
|
1049
|
-
a.ga);else{c=
|
|
1050
|
-
a=
|
|
1051
|
-
function
|
|
1052
|
-
0,0,0,0,0,1,8]);f=
|
|
1053
|
-
function
|
|
1054
|
-
0;var q=Math.floor(m%(
|
|
1055
|
-
g,k);e.call(d,b,[f,
|
|
1056
|
-
function
|
|
1057
|
-
var
|
|
1058
|
-
0,0,0,0,0,0,0]),
|
|
1059
|
-
function
|
|
1060
|
-
r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return ra(c,2),C(c,
|
|
1061
|
-
function
|
|
1062
|
-
l);n(m);m=od(m.outerHTML)}var q=Qg(m,"SmoothStreamingMedia");if(!q)throw new R(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=
|
|
1063
|
-
"Duration",lh,Infinity);l||a.i.ab(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};p=Xg(q,"Protection");var t;n=a.g.mss.keySystemsBySystemId;m=[];p=u(p);for(t=p.next();!t.done;t=p.next())m=m.concat(Xg(t.value,"ProtectionHeader"));if(m.length){p=[];for(t=0;t<m.length;t++){var w=m[t],x=w.attributes.SystemID.toLowerCase(),z=n[x];if(z){var v=
|
|
1064
|
-
v[4],v[7],v[6]].concat(y(v.slice(8))));v=zd(v);break a}v=null}else v=null;B=vd(Yg(w));x=wd(x.replace(/-/g,""));x=[{initData:Pg(B,x,new Set,0),initDataType:"cenc",keyId:v}];x=Cd(z,"cenc",x);v&&x.keyIds.add(v);if(z=
|
|
1065
|
-
dh(J,"d",lh);J=dh(J,"r",jh);if(!H)break;E=null!=E?E:D;J=J||0;if(0>J)if(I){I=dh(I,"t",lh);if(null==I)break;else if(E>=I)break;J=Math.ceil((I-E)/H)-1}else{if(Infinity==v)break;else if(E/x>=v)break;J=Math.ceil((v*x-E)/H)-1}for(I=0;I<=J;++I)D=E+H,A.push({start:E/x,end:D/x,Mf:E}),E=D}x=A;z=u(z);for(v=z.next();!v.done;v=z.next())(v=
|
|
1027
|
+
e());if(n)for(c=u(w),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=u(e.g),f=e.next();!f.done;f=e.next())f=f.value,f.h=d,d+=f.endTime-f.startTime;c=a.T;if(n&&Infinity!=c&&!wv(a,g))for(a=u(w),d=a.next();!d.done;d=a.next())d.value.Hf(c);return{segments:w,bandwidth:b}}function Uv(a,b){if(a==Jd){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}
|
|
1028
|
+
function Vv(a){return a==Jd?"text/vtt":pw[a].mp4}
|
|
1029
|
+
function lw(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,t,w,x,z,v;return L(function(B){switch(B.g){case 1:g=pg;h=Math.trunc((d.segments.length-1)/2);k=Mu(f(),d.segments[h].h,e);l=new rc(k[0]);m=l.Ma.split(".").pop();n=pw[b];if((q=n[m])||(q=Mv[m])||(q=Uv(b,c)))return B.return(q);t=1;w=jg(k,a.g.retryParameters);ra(B,2);w.method="HEAD";return C(B,Ov(a,w,g,{type:t}),4);case 4:x=B.h;p=x.headers["content-type"];ta(B,3);break;case 2:z=va(B);if(!z||1002!=z.code&&1001!=z.code){B.u(3);break}w.method="GET";return C(B,
|
|
1030
|
+
Ov(a,w,g,{type:t}),6);case 6:v=B.h,p=v.headers["content-type"];case 3:return p?B.return(p.split(";")[0]):B.return(Vv(b))}})}function Jv(a,b,c,d,e,f){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0)}function hv(a,b,c){return Ov(a,jg(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
1031
|
+
function fv(a){var b,c,d,e,f,g;L(function(h){switch(h.g){case 1:if(!a.i)return h.return();ra(h,2);b=Date.now();return C(h,a.update(),4);case 4:c=Date.now();jv(a)&&(d=(c-b)/1E3,a.cb.sample(1,d),e=a.m,f=Math.max(0,e-Ra(a.cb)),a.s.U(f));ta(h,3);break;case 2:g=va(h);if(!a.i)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(g),h.return();g.severity=1;a.i.onError(g);a.s.U(.1);case 3:if(!a.i)return h.return();a.i.onManifestUpdated();F(h)}})}
|
|
1032
|
+
function jv(a){return a.qa!=gv}function nv(a,b){a.qa=b;a.l&&a.l.Bc(!jv(a));jv(a)||a.s.stop()}function Ov(a,b,c,d){if(!a.N)throw new R(2,7,7001);b=a.i.networkingEngine.request(c,b,d);dg(a.N,b);return b.promise}function $v(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
1033
|
+
function bw(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,t,w,x,z,v,B,A;return L(function(D){switch(D.g){case 1:if("video/mp2t"==c)throw new R(2,4,4040);if(fd())throw new R(2,4,4041);g=Fu(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return D.return(null);k=Mu(d(),Fu(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=zd(vd(k[0].split("data:text/plain;base64,").pop()));D.u(2);break}m=k.sort().join("");a.ia.has(m)||(n=jg(k,a.g.retryParameters),q=Ov(a,n,6),a.ia.set(m,q));return C(D,a.ia.get(m),
|
|
1034
|
+
3);case 3:p=D.h,l=zd(p.data);case 2:t="00000000000000000000000000000000";if(!e){D.u(4);break}if(a.pa.has(e)){w=a.pa.get(e);D.u(5);break}x=jl(e.$(),e.Xb(),e.Ub(),a.g.retryParameters);z=pg;return C(D,Ov(a,x,z,{type:0}),6);case 6:v=D.h,w=dv(v.data),a.pa.set(e,w);case 5:w&&(t=w);case 4:return B=new Map,B.set(t,l),A="cenc","SAMPLE-AES"==g&&(A="cbcs"),D.return(Fd(B,A))}})}P("shaka.hls.HlsParser",ev);
|
|
1035
|
+
var Mv={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},pw={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
1036
|
+
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"}},aw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new R(2,4,4040);if(fd())throw new R(2,4,4041);a=Fu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Cd("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=
|
|
1037
|
+
Fu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Fu(a,"URI");b=Zu(b.split("?")[0]);b=Ab(b.data);c=Cd("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Fu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");a=Fu(a,"URI");a=Zu(a.split("?")[0]);a=
|
|
1038
|
+
Ab(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Pg(a,b,new Set,0);return Cd("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},gv="VOD",kw="EVENT",Qv="LIVE",mv={Rg:gv,Qi:kw,Yi:Qv};mi["application/x-mpegurl"]=function(){return new ev};mi["application/vnd.apple.mpegurl"]=function(){return new ev};function qw(a){var b=0,c=Eb(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=Ab(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function rw(a){if(a=sw(a))a:{a=u($g(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=ah(b.value,"LA_URL")){a=Yg(b);break a}a=""}else a="";return a}
|
|
1039
|
+
function sw(a){a=vd(Yg(a));a=qw(a).filter(function(b){return b.type===tw})[0];if(!a)return null;a=jd(a.value,!0);return(a=Rg(a,"WRMHEADER"))?a:null}var tw=1,uw=(new Map).set("com.microsoft.playready",rw).set("com.microsoft.playready.recommendation",rw).set("com.microsoft.playready.software",rw).set("com.microsoft.playready.hardware",rw);function vw(a){if(!ww){ww=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);xw=yw("ftyp",b,d,b,c);b=yw("dref",zw);Aw=yw("dinf",b)}this.g=a}
|
|
1040
|
+
function Bw(a){for(var b=[],c=u(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=yw;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(Cw+1));m=Math.floor(m%(Cw+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(Dw(h,4)),[0,0,0,0],y(Dw(n,4)),y(Dw(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],y(Dw(k,2)),[0,0],y(Dw(l,
|
|
1041
|
+
2)),[0,0]));h=yw("tkhd",h);k=yw;n=g.duration*g.timescale;l=Math.floor(n/(Cw+1));n=Math.floor(n%(Cw+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(Dw(g.timescale,4)),y(Dw(l,4)),y(Dw(n,4)),y(Dw(m,2)),[0,0]));l=yw("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Ew;break;case "audio":m=Fw}n=yw("hdlr",m);a:{switch(g.type){case "video":g=yw("minf",yw("vmhd",Gw),Aw,Hw(g));break a;
|
|
1042
|
+
case "audio":g=yw("minf",yw("smhd",Iw),Aw,Hw(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Ad.apply(sd,y(b));f=a.g[0];c=yw;d=f.duration*f.timescale;e=Math.floor(d/(Cw+1));d=Math.floor(d%(Cw+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(Dw(f.timescale,4)),y(Dw(e,4)),y(Dw(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,
|
|
1043
|
+
255]));e=yw("mvhd",e);d=[];a=u(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(y(Dw(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=yw("trex",k),h.call(g,k);a=Ad.apply(sd,y(d));a=yw("mvex",a);d=[];if(f.encrypted){f=u(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=u(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=Ad.apply(sd,y(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(xw.byteLength+
|
|
1044
|
+
a.byteLength);b.set(xw);b.set(a,xw.byteLength);return b}
|
|
1045
|
+
function Hw(a){var b=yw,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.oa.byteLength)var e=yw("avcC",a.oa);else{e=yw;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Qa.length;n++){var q=Jw(a.Qa[n]);switch(q[0]&31){case 7:g.push(q);f+=q.length+2;break;case 8:h.push(q),f+=q.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
|
|
1046
|
+
0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(y(Dw(c,2)),y(Dw(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=Kw(a);g=new Uint8Array([]);
|
|
1047
|
+
a.encrypted&&(g=Lw(a),d="encv");c=yw(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.oa.byteLength&&(c=yw("hvcC",a.oa)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(y(Dw(d,2)),y(Dw(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=Kw(a),g=new Uint8Array([]),a.encrypted&&(g=Lw(a),e="encv"),c=yw(e,d,
|
|
1048
|
+
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=yw(".mp3",Mw(a));else if(a.codecs.includes("ac-3"))c=yw("dac3",a.ga),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=Lw(a),d="enca"),a=yw(d,Mw(a),c,e);else if(a.codecs.includes("ec-3"))c=yw("dec3",a.ga),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=Lw(a),d="enca"),a=yw(d,Mw(a),c,e);else if(a.codecs.includes("opus"))c=yw("dOps",a.ga),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=Lw(a),d="enca"),a=yw(d,Mw(a),c,e);else{if(0<a.ga.byteLength)c=yw("esds",
|
|
1049
|
+
a.ga);else{c=yw;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Gd("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(y(Dw(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=Lw(a),d="enca");
|
|
1050
|
+
a=yw(d,Mw(a),c,e)}c=a}a=yw("stsd",Nw,c);return b("stbl",a,yw("stts",Ow),yw("stsc",Pw),yw("stsz",Qw),yw("stco",Rw))}function Kw(a){if(!a.xa&&!a.ya)return new Uint8Array([]);var b=a.ya;a=new Uint8Array([].concat(y(Dw(a.xa,4)),y(Dw(b,4))));return yw("pasp",a)}function Mw(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(y(Dw(a.stream.audioSamplingRate||44100,2)),[0,0]))}
|
|
1051
|
+
function Lw(a){var b=yw;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(y(Dw(d,4))));c=yw("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=yw("schm",d);e=yw;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=u(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=u(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=Jw(h.value)}a=new Uint8Array([0,
|
|
1052
|
+
0,0,0,0,0,1,8]);f=yw("tenc",a,f);return b("sinf",c,d,e("schi",f))}
|
|
1053
|
+
function Sw(a){var b=[];a=u(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=yw;var g=new Uint8Array([0,0,0,0].concat(y(Dw(c.data?c.data.jb:0,4))));g=yw("mfhd",g);var h;var k=c.data?c.data.Oa:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Ha<<4|m.Ka<<2|m.Ja}k=yw("sdtp",l);var n=k.length+92;l=yw;h=new Uint8Array([0,0,0,58].concat(y(Dw(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=yw("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
|
|
1054
|
+
0;var q=Math.floor(m%(Cw+1));m=new Uint8Array([1,0,0,0].concat(y(Dw(Math.floor(m/(Cw+1)),4)),y(Dw(q,4))));m=yw("tfdt",m);var p=n;n=c.data?c.data.Oa:[];q=n.length;var t=12+16*q,w=new Uint8Array(t);p+=8+t;w.set(["video"===c.type?1:0,0,15,1].concat(y(Dw(q,4)),y(Dw(p,4))),0);for(p=0;p<q;p++){var x=n[p];t=Dw(x.duration,4);var z=Dw(x.size,4),v=x.flags;x=Dw(x.Va,4);w.set([].concat(y(t),y(z),[v.Xa<<2|v.Ha,v.Ka<<6|v.Ja<<4|v.Ya,v.Ga&61440,v.Ga&15],y(x)),12+16*p)}n=yw("trun",w);k=l("traf",h,m,n,k);f=f("moof",
|
|
1055
|
+
g,k);e.call(d,b,[f,Tw(c)])}return Ad.apply(sd,y(b))}function Tw(a){a=(a.data?a.data.Oa:[]).map(function(b){return b.data});a=Ad.apply(sd,y(a));return yw("mdat",a)}function Dw(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function Jw(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}
|
|
1056
|
+
function yw(a){var b=Ha.apply(1,arguments),c=Uw[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],Uw[a]=c);for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
|
|
1057
|
+
var ww=!1,Cw=Math.pow(2,32)-1,Uw={},Ew=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Fw=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Ow=new Uint8Array([0,0,0,0,0,0,0,0]),Pw=new Uint8Array([0,0,0,0,0,0,0,0]),Rw=new Uint8Array([0,0,0,0,0,0,0,0]),Qw=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Gw=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Iw=new Uint8Array([0,
|
|
1058
|
+
0,0,0,0,0,0,0]),Nw=new Uint8Array([0,0,0,0,0,0,0,1]),xw=new Uint8Array([]),zw=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Aw=new Uint8Array([]);function Vw(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.B=new Qa(5);this.o=new Mc(function(){Ww(a)});this.A=new cg;this.m=new Map}r=Vw.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this;return L(function(d){if(1==d.g)return c.l=[a],c.h=b,C(d,Xw(c),2);if(!c.h)throw new R(2,7,7001);return d.return(c.j)})};
|
|
1059
|
+
function Ww(a){var b;L(function(c){switch(c.g){case 1:return ra(c,2),C(c,Xw(a),4);case 4:ta(c,3);break;case 2:b=va(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();F(c)}})}r.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.A.destroy()};
|
|
1060
|
+
r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return ra(c,2),C(c,Xw(a),4);if(2!=c.g)return ta(c,0);b=va(c);if(!a.h||!b)return c.return();a.h.onError(b);F(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(){};
|
|
1061
|
+
function Xw(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=jg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),dg(a.A,e),C(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=cm){pb("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=Pt(m,"SmoothStreamingMedia");if(!m)throw new R(2,4,4046,
|
|
1062
|
+
l);n(m);m=od(m.outerHTML)}var q=Qg(m,"SmoothStreamingMedia");if(!q)throw new R(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=dm&&l(q);a.i||(a.i=new jk(null,0));if(l=dh(q,"IsLive",nh,!1))throw new R(2,4,4047);a.i.Bc(!l);n=dh(q,"TimeScale",lh,1E7);m=dh(q,"DVRWindowLength",lh);l&&(0===m||isNaN(m))&&(m=Infinity);var p=dh(q,"CanSeek",nh,!1);0===m&&p&&(m=Infinity);p=null;m&&0<m&&(p=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(p=a.g.availabilityWindowOverride);null==p&&(p=Infinity);a.i.ke(p);m=dh(q,
|
|
1063
|
+
"Duration",lh,Infinity);l||a.i.ab(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};p=Xg(q,"Protection");var t;n=a.g.mss.keySystemsBySystemId;m=[];p=u(p);for(t=p.next();!t.done;t=p.next())m=m.concat(Xg(t.value,"ProtectionHeader"));if(m.length){p=[];for(t=0;t<m.length;t++){var w=m[t],x=w.attributes.SystemID.toLowerCase(),z=n[x];if(z){var v=sw(w);if(v)a:{v=u($g(v,"DATA"));for(var B=v.next();!B.done;B=v.next())if(B=ah(B.value,"KID")){v=vd(Yg(B));v=new Uint8Array([v[3],v[2],v[1],v[0],v[5],
|
|
1064
|
+
v[4],v[7],v[6]].concat(y(v.slice(8))));v=zd(v);break a}v=null}else v=null;B=vd(Yg(w));x=wd(x.replace(/-/g,""));x=[{initData:Pg(B,x,new Set,0),initDataType:"cenc",keyId:v}];x=Cd(z,"cenc",x);v&&x.keyIds.add(v);if(z=uw.get(z))x.licenseServerUri=z(w);p.push(x)}}n=p}else n=[];t=n;p=[];n=[];m=[];q=Xg(q,"StreamIndex");q=u(q);for(w=q.next();!w.done;w=q.next()){w=w.value;z=Xg(w,"QualityLevel");x=l.timescale;v=l.duration;B=Xg(w,"c");for(var A=[],D=0,G=0;G<B.length;++G){var J=B[G],I=B[G+1],E=dh(J,"t",lh),H=
|
|
1065
|
+
dh(J,"d",lh);J=dh(J,"r",jh);if(!H)break;E=null!=E?E:D;J=J||0;if(0>J)if(I){I=dh(I,"t",lh);if(null==I)break;else if(E>=I)break;J=Math.ceil((I-E)/H)-1}else{if(Infinity==v)break;else if(E/x>=v)break;J=Math.ceil((v*x-E)/H)-1}for(I=0;I<=J;++I)D=E+H,A.push({start:E/x,end:D/x,Mf:E}),E=D}x=A;z=u(z);for(v=z.next();!v.done;v=z.next())(v=Yw(a,w,v.value,x,t,l))&&("audio"!=v.type||a.g.disableAudio?"video"!=v.type||a.g.disableVideo?v.type!=Jd||a.g.disableText||m.push(v):n.push(v):p.push(v))}q=[];p=u(0<p.length?
|
|
1066
1066
|
p:[null]);for(t=p.next();!t.done;t=p.next())for(t=t.value,w=u(0<n.length?n:[null]),v=w.next();!v.done;v=w.next())z=q,x=z.push,v=v.value,B=0,t&&t.bandwidth&&0<t.bandwidth&&(B+=t.bandwidth),v&&v.bandwidth&&0<v.bandwidth&&(B+=v.bandwidth),v={id:a.s++,language:t?t.language:"und",disabledUntilTime:0,primary:!!t&&t.primary||!!v&&v.primary,audio:t,video:v,bandwidth:B,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},x.call(z,v);l.variants=q;l.textStreams=m;a.j?(a.j.variants=l.variants,a.j.textStreams=
|
|
1067
1067
|
l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null},a.i.Xd());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.B.sample(1,h);F(k)})}
|
|
1068
|
-
function
|
|
1068
|
+
function Yw(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return Va("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.s++,l=dh(c,"Bitrate",kh),m=dh(c,"MaxWidth",kh),n=dh(c,"MaxHeight",kh),q=dh(c,"Channels",kh),p=dh(c,"SamplingRate",kh),t=f.duration;d.length&&(t=d[d.length-1].end-d[0].start);var w=a.i.getDuration();a.i.ab(Math.min(t,w));var x={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1069
1069
|
closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:re(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:q,audioSamplingRate:p,spatialAudio:!1,closedCaptions:null,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],
|
|
1070
|
-
mssPrivateData:{duration:t,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=
|
|
1071
|
-
e),null;c
|
|
1072
|
-
x.createSegmentIndex=function(){if(x.segmentIndex)return Promise.resolve();if(a.m.has(x.id))var z=a.m.get(x.id);else z=[],"video"==x.type&&(z=x.mssPrivateData.codecPrivateData.split("00000001").slice(1)),z={id:x.id,type:x.type,codecs:x.codecs,encrypted:x.encrypted,timescale:x.mssPrivateData.timescale,duration:x.mssPrivateData.duration,Qa:z,ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:null,stream:x},z=
|
|
1073
|
-
z),x,b,d);x.segmentIndex=new
|
|
1074
|
-
function
|
|
1075
|
-
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function
|
|
1076
|
-
function
|
|
1077
|
-
mi["application/vnd.ms-sstr+xml"]=function(){return new
|
|
1078
|
-
function
|
|
1079
|
-
J.value.byteLength;if(!g){H.u(5);break}return C(H,g(J.value),5);case 5:I=Date.now();if(100<I-p||J.done)E=J.done?0:x-n,e(I-p,n-q,E),q=n,p=I;J.done?D.close():(D.enqueue(J.value),G());F(H)}})}G()};new k({start:z});return C(A,l.arrayBuffer(),6);case 6:m=A.h;case 5:ta(A,3);break;case 2:v=va(A);if(d.Tf)throw new R(1,1,7001,a,b);if(d.Lg)throw new R(1,1,1003,a,b);throw new R(1,1,1002,a,v,b);case 3:return B=
|
|
1080
|
-
function
|
|
1081
|
-
|
|
1082
|
-
function
|
|
1070
|
+
mssPrivateData:{duration:t,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=Zw[e])&&x.roles.push(e),"main"===e&&(x.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return Va('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!$w.includes(e.toUpperCase()))return Va("Codec not supported:",
|
|
1071
|
+
e),null;c=ax(c,g,e,x);x.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Va("Quality unsupported without CodecPrivateData",g),null;x.type="audio";x.mimeType="mss/audio/mp4";x.codecs=bx(e,c);break;case "video":if(!c)return Va("Quality unsupported without CodecPrivateData",g),null;x.type="video";x.mimeType="mss/video/mp4";x.codecs=cx(c);break;case "text":if(x.type=Jd,x.mimeType="application/mp4","TTML"===e||"DFXP"===e)x.codecs="stpp"}x.fullMimeTypes.add(Nd(x.mimeType,x.codecs));
|
|
1072
|
+
x.createSegmentIndex=function(){if(x.segmentIndex)return Promise.resolve();if(a.m.has(x.id))var z=a.m.get(x.id);else z=[],"video"==x.type&&(z=x.mssPrivateData.codecPrivateData.split("00000001").slice(1)),z={id:x.id,type:x.type,codecs:x.codecs,encrypted:x.encrypted,timescale:x.mssPrivateData.timescale,duration:x.mssPrivateData.duration,Qa:z,ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:null,stream:x},z=Bw(new vw([z])),a.m.set(x.id,z);z=dx(a,new ri(function(){return[]},0,null,null,void 0,
|
|
1073
|
+
z),x,b,d);x.segmentIndex=new Fk(z);return Promise.resolve()};x.closeSegmentIndex=function(){x.segmentIndex&&(x.segmentIndex.release(),x.segmentIndex=null)};return x}
|
|
1074
|
+
function ax(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
|
|
1075
|
+
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function bx(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function cx(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
1076
|
+
function dx(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=u(e);for(var h=e.next();!h.done;g={Mc:g.Mc},h=e.next())g.Mc=h.value,d.push(new ti(g.Mc.start,g.Mc.end,function(k){return function(){return Bd(a.l,[f.replace("{start time}",String(k.Mc.Mf))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}P("shaka.mss.MssParser",Vw);var $w="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Zw={CAPT:"main",SUBT:"alternate",DESC:"main"};
|
|
1077
|
+
mi["application/vnd.ms-sstr+xml"]=function(){return new Vw};function ex(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=nd(b)}catch(g){}throw new R(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function fx(){}function gx(a,b,c,d,e){var f=new hx;wg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new ix,h={Tf:!1,Lg:!1};a=jx(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 Tf(a,function(){h.Tf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Mc(function(){h.Lg=!0;g.abort()});k.U(b/1E3);a.finally(function(){k.stop()})}return a}
|
|
1078
|
+
function jx(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,t,w,x,z,v,B;return L(function(A){switch(A.g){case 1:return h=kx,k=lx,q=n=0,p=Date.now(),ra(A,2),C(A,h(a,c),4);case 4:l=A.h;f(mx(l.headers));if("HEAD"==c.method){A.u(5);break}t=l.clone().body.getReader();x=(w=l.headers.get("Content-Length"))?parseInt(w,10):0;z=function(D){function G(){var J,I,E;return L(function(H){switch(H.g){case 1:return ra(H,2),C(H,t.read(),4);case 4:J=H.h;ta(H,3);break;case 2:return va(H),H.return();case 3:if(J.done){H.u(5);break}n+=
|
|
1079
|
+
J.value.byteLength;if(!g){H.u(5);break}return C(H,g(J.value),5);case 5:I=Date.now();if(100<I-p||J.done)E=J.done?0:x-n,e(I-p,n-q,E),q=n,p=I;J.done?D.close():(D.enqueue(J.value),G());F(H)}})}G()};new k({start:z});return C(A,l.arrayBuffer(),6);case 6:m=A.h;case 5:ta(A,3);break;case 2:v=va(A);if(d.Tf)throw new R(1,1,7001,a,b);if(d.Lg)throw new R(1,1,1003,a,b);throw new R(1,1,1002,a,v,b);case 3:return B=mx(l.headers),A.return(ex(B,m,l.status,a,l.url,b))}})}
|
|
1080
|
+
function mx(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function nx(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}P("shaka.net.HttpFetchPlugin",fx);fx.isSupported=nx;fx.parse=gx;var kx=window.fetch,ix=window.AbortController,lx=window.ReadableStream,hx=window.Headers;
|
|
1081
|
+
nx()&&(fg("http",gx,2,!0),fg("https",gx,2,!0),fg("blob",gx,2,!0));function ox(){}
|
|
1082
|
+
function px(a,b,c,d,e){var f=new qx,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new R(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var p=rx(f);e(p);n=!0}};f.onload=function(p){var t=rx(f),w=f.response;try{d(Date.now()-g,p.loaded-h,0);var x=ex(t,w,f.status,a,f.responseURL,c);l(x)}catch(z){m(z)}};f.onerror=function(p){m(new R(1,
|
|
1083
1083
|
1,1002,a,p,c))};f.ontimeout=function(){m(new R(1,1,1003,a,c))};f.onprogress=function(p){var t=Date.now();if(100<t-g||p.lengthComputable&&p.loaded==p.total)d(t-g,p.loaded-h,4==f.readyState?0:p.total-p.loaded),h=p.loaded,g=t};for(var q in b.headers)f.setRequestHeader(q.toLowerCase(),b.headers[q]);f.send(b.body)});return new Tf(k,function(){f.abort();return Promise.resolve()})}
|
|
1084
|
-
function
|
|
1085
|
-
function
|
|
1086
|
-
function
|
|
1087
|
-
function
|
|
1088
|
-
r.updateManifest=function(){return Promise.reject(new R(2,9,9016,"Cannot modify values in "+this.g))};function
|
|
1089
|
-
r.getManifests=function(a){var b=this,c;return L(function(d){if(1==d.g)return C(d,
|
|
1090
|
-
function
|
|
1091
|
-
function
|
|
1092
|
-
function
|
|
1093
|
-
|
|
1094
|
-
function
|
|
1095
|
-
function
|
|
1096
|
-
function
|
|
1097
|
-
|
|
1098
|
-
function
|
|
1099
|
-
function
|
|
1100
|
-
|
|
1101
|
-
function
|
|
1102
|
-
function
|
|
1103
|
-
f=u(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=u(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=u(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function
|
|
1104
|
-
|
|
1084
|
+
function rx(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}P("shaka.net.HttpXHRPlugin",ox);ox.parse=px;var qx=window.XMLHttpRequest;fg("http",px,1,!0);fg("https",px,1,!0);fg("blob",px,1,!0);function sx(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function tx(a){return a.$().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Aa+":"+a.ja}function ux(a,b){return jl(a.g.$(),a.g.Aa,a.g.ja,b.streaming.retryParameters)};function vx(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function wx(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}vx.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function xx(a){var b=this;this.o=a;this.j=new Map;this.i=new rg(function(){return yx(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new vx}xx.prototype.destroy=function(){return this.i.destroy()};function zx(a,b,c){a.m=b;a.l=c}function yx(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
|
|
1085
|
+
function Ax(a,b,c,d,e,f){sg(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,q,p;return L(function(t){if(1==t.g)return C(t,Bx(a,c),2);h=t.h;if(a.i.g)throw new R(2,9,7001);if(e)for(m in k=Ab(h),l=new Og(k),l.data)n=Number(m),q=l.data[n],p=l.g[n],a.l(q,p);a.g.close(d,h.byteLength);var w=a.g;a.m(0==w.i?0:w.j/w.i,a.g.h);return t.return(f(h))})});a.j.set(b,g)}function Cx(a){return L(function(b){return 1==b.g?C(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
|
|
1086
|
+
function Bx(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=pg,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),C(g,d.promise,2);f=g.h;Kb(a.h,e);return g.return(f.data)})};function Dx(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Sf;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Dx.prototype.abort=function(){var a=this;return L(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ra(b,2);return C(b,a.g,4)}if(2!=b.g)return ta(b,0);va(b);F(b)})};
|
|
1087
|
+
function Ex(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return L(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return C(g,b(f.key,f.value,f),2)}f.continue();F(g)})}})}Dx.prototype.store=function(){return this.h};Dx.prototype.promise=function(){return this.g};function Fx(a){this.h=a;this.g=[]}Fx.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Gx(a,b){return Hx(a,b,"readwrite")}function Hx(a,b,c){c=a.h.transaction([b],c);var d=new Dx(c,b);a.g.push(d);d.promise().then(function(){Kb(a.g,d)},function(){Kb(a.g,d)});return d};function Ix(a,b,c){this.h=new Fx(a);this.i=b;this.g=c}r=Ix.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return Jx(this.i)};r.removeSegments=function(a,b){return Kx(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return L(function(d){if(1==d.g)return C(d,Lx(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Vf(e)}))})};r.addManifests=function(){return Jx(this.g)};
|
|
1088
|
+
r.updateManifest=function(){return Promise.reject(new R(2,9,9016,"Cannot modify values in "+this.g))};function Mx(a,b,c){a=Gx(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=Gx(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return Kx(this,this.g,a,b)};
|
|
1089
|
+
r.getManifests=function(a){var b=this,c;return L(function(d){if(1==d.g)return C(d,Lx(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Vc(e)})))})};r.getAllManifests=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=Hx(a.h,a.g,"readonly"),c=new Map,C(d,Ex(b,function(e,f){var g;return L(function(h){if(1==h.g)return C(h,a.Vc(f),2);g=h.h;c.set(e,g);F(h)})}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};r.Vf=function(a){return a};r.Vc=function(a){return Promise.resolve(a)};
|
|
1090
|
+
function Jx(a){return Promise.reject(new R(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=Gx(c.h,a);e=d.store();f=[];g={};h=u(b);for(k=h.next();!k.done;g={zd:g.zd},k=h.next())l=k.value,g.zd=e.add(l),g.zd.onsuccess=function(n){return function(){f.push(n.zd.result)}}(g);return C(m,d.promise(),2)}return m.return(f)})};
|
|
1091
|
+
function Kx(a,b,c,d){a=Gx(a.h,b);b=a.store();var e={};c=u(c);for(var f=c.next();!f.done;e={xd:e.xd},f=c.next())e.xd=f.value,b.delete(e.xd).onsuccess=function(g){return function(){return d(g.xd)}}(e);return a.promise()}
|
|
1092
|
+
function Lx(a,b,c){var d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=Hx(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=u(c);for(l=k.next();!l.done;h={Kc:h.Kc,Ic:h.Ic},l=k.next())h.Ic=l.value,h.Kc=e.get(h.Ic),h.Kc.onsuccess=function(n){return function(){void 0==n.Kc.result&&g.push(n.Ic);f[n.Ic]=n.Kc.result}}(h);return C(m,d.promise(),2)}if(g.length)throw new R(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function Nx(a){this.g=new Fx(a)}Nx.prototype.destroy=function(){return this.g.destroy()};Nx.prototype.getAll=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=Hx(a.g,"session-ids","readonly"),c=[],C(d,Ex(b,function(e,f){c.push(f)}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};Nx.prototype.add=function(a){var b=Gx(this.g,"session-ids"),c=b.store();a=u(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
|
|
1093
|
+
Nx.prototype.remove=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=Gx(b.g,"session-ids"),C(d,Ex(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):C(d,c.promise(),0)})};function Ox(){this.g=new Map}Ox.prototype.destroy=function(){for(var a=[],b=u(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Ox.prototype.init=function(){var a=this;Px.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=u(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
|
|
1094
|
+
function Qx(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{fb:d,Ba:f},Ba:e})})});if(b)return b;throw new R(2,9,9013,"Could not find a cell that supports add-operations");}function Rx(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({fb:d,Ba:f},e)})})}
|
|
1095
|
+
function Sx(a,b,c){a=a.g.get(b);if(!a)throw new R(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new R(2,9,9013,"Could not find cell with name "+c);return b}function Tx(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Ux(a){var b=Array.from(a.g.keys());if(!b.length)throw new R(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
1096
|
+
function Vx(a){var b,c,d;return L(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Px,d.forEach(function(f){(f=f())&&b.push(f)})),C(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.u(0):C(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Wx(a,b){Px.set(a,b)}P("shaka.offline.StorageMuxer",Ox);Ox.unregister=function(a){Px.delete(a)};Ox.register=Wx;Ox.prototype.destroy=Ox.prototype.destroy;var Px=new Map;function Xx(){Ix.apply(this,arguments)}na(Xx,Ix);Xx.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return L(function(g){d=Gx(c.h,c.g);e=d.store();f=new Sf;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new R(2,9,9012,"Could not find values for "+a))};return C(g,Promise.all([d.promise(),f]),0)})};
|
|
1097
|
+
Xx.prototype.Vc=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Yx(a.periods[c],e),b.push(f);return C(h,ot(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
|
|
1098
|
+
function Yx(a,b){Zx(a);for(var c=u(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return $x(e,a.startTime,b)})}
|
|
1099
|
+
function $x(a,b,c){var d=a.initSegmentUri?ay(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
|
|
1100
|
+
ay(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}Xx.prototype.Vf=function(a){return{data:a.data}};
|
|
1101
|
+
function ay(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new R(2,9,9004,"Could not parse uri "+a);}
|
|
1102
|
+
function Zx(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=u(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=u(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=u(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
|
|
1103
|
+
f=u(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=u(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=u(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function by(){Ix.apply(this,arguments)}na(by,Ix);
|
|
1104
|
+
by.prototype.Vc=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=u(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(cy(n,k.startTime,k.startTime+e));f=l;b.push(f)}return C(h,ot(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
|
|
1105
1105
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
1106
|
-
function
|
|
1107
|
-
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function
|
|
1108
|
-
r.init=function(){var a=this,b=new Sf,c=!1,d=new Mc(function(){c=!0;b.reject(new R(2,9,9017))});d.U(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
|
|
1109
|
-
new
|
|
1106
|
+
function cy(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,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,
|
|
1107
|
+
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function dy(){Ix.apply(this,arguments)}na(dy,Ix);r=dy.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return Mx(this,a,b)};r.Vc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function ey(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=ey.prototype;
|
|
1108
|
+
r.init=function(){var a=this,b=new Sf,c=!1,d=new Mc(function(){c=!0;b.reject(new R(2,9,9017))});d.U(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 Xx(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new by(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
1109
|
+
new by(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new dy(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Nx(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=u(["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 R(2,
|
|
1110
1110
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return C(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return C(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return C(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return C(b,a.j.destroy(),8);case 8:if(!a.m){b.u(10);break}return C(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),F(b)}})};
|
|
1111
1111
|
r.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};r.getEmeSessionCell=function(){return this.m};
|
|
1112
|
-
r.erase=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return C(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return C(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return C(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return C(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),C(b,
|
|
1113
|
-
function
|
|
1114
|
-
function
|
|
1115
|
-
function
|
|
1112
|
+
r.erase=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return C(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return C(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return C(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return C(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),C(b,fy(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,C(b,a.init(),0)}})};
|
|
1113
|
+
function fy(){var a=new Sf,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new R(2,9,9001,b.error));c.preventDefault()};return a}Wx("idb",function(){return Yc()||Qc()||!window.indexedDB?null:new ey});function gy(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}gy.prototype.fb=function(){return this.i};gy.prototype.Ba=function(){return this.h};gy.prototype.key=function(){return this.l};gy.prototype.toString=function(){return this.j};
|
|
1114
|
+
function hy(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new gy(b,c,d,Number(a[4])):null};function iy(a,b){this.h=a;this.g=b}
|
|
1115
|
+
function jy(a,b){var c=new jk(null,0);c.ab(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=ky(a,d,e,c);e=b.streams.filter(function(l){return l.type==Jd}).map(function(l){return ly(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return ly(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=u(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
|
|
1116
1116
|
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null}}
|
|
1117
|
-
function
|
|
1118
|
-
b.next())for(e=e.value,g=
|
|
1119
|
-
function
|
|
1117
|
+
function ky(a,b,c,d){for(var e=new Set,f=u(b),g=f.next();!g.done;g=f.next()){var h=u(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=u(c);for(g=f.next();!g.done;g=f.next())for(h=u(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=u(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=u(b);for(e=b.next();!e.done;e=
|
|
1118
|
+
b.next())for(e=e.value,g=ly(a,e,d),h=u(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=u(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=ly(a,e,d),g=u(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
|
|
1119
|
+
function ly(a,b,c){var d=b.segments.map(function(e){return my(a,e,b)});c.ld(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Fk(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
|
|
1120
1120
|
null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([Nd(b.mimeType,b.codecs)])}}
|
|
1121
|
-
function
|
|
1122
|
-
r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=
|
|
1121
|
+
function my(a,b,c){var d=new gy("segment",a.h,a.g,b.dataKey);a=new ti(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?ny(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";return a}function ny(a,b){var c=new gy("segment",a.h,a.g,b);return new ri(function(){return[c.toString()]},0,null)};function oy(){this.g=null}r=oy.prototype;r.configure=function(){};
|
|
1122
|
+
r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=hy(a);c.g=d;if(null==d||"manifest"!=d.g)throw new R(2,1,9004,a);e=new Ox;sa(m,2);return C(m,e.init(),4);case 4:return C(m,Sx(e,d.fb(),d.Ba()),5);case 5:return f=m.h,C(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new iy(d.fb(),d.Ba()),l=jy(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return xa(m),C(m,e.destroy(),7);case 7:ya(m,0)}})};r.stop=function(){return Promise.resolve()};
|
|
1123
1123
|
r.update=function(){};
|
|
1124
|
-
r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new
|
|
1125
|
-
r.onInitialVariantChosen=function(){};r.banLocation=function(){};mi["application/x-offline-manifest"]=function(){return new
|
|
1126
|
-
function
|
|
1127
|
-
function
|
|
1128
|
-
h.g)return ra(h,2),C(h,Kh(d,g),4);if(2!=h.g)return e.push(g),ta(h,0);va(h);F(h)})})),6);case 6:return C(f,d.destroy(),7);case 7:return f.return(e)}})}function
|
|
1129
|
-
function
|
|
1130
|
-
case 4:b.h=null,b.g=null,F(k)}})})}function
|
|
1131
|
-
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new
|
|
1132
|
-
function
|
|
1133
|
-
q,b,c,e,f),w=t.Th,x=t.Jf,C(A,l.Ba.addManifests([w]),11);case 11:z=A.h;
|
|
1134
|
-
|
|
1135
|
-
function
|
|
1136
|
-
2)}if(!D)return N.u(0);
|
|
1137
|
-
v=Object.values(l),C(B,g.removeSegments(v,function(){}),10);case 10:throw z;}})}function
|
|
1138
|
-
function
|
|
1139
|
-
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return C(z,a.updateManifest(b,c),4);case 4:g=!0;f();ta(z,0);break;case 2:return w=va(z),C(z,
|
|
1140
|
-
function
|
|
1124
|
+
r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new Ox,ra(m,2,3),C(m,e.init(),5);case 5:return C(m,Sx(e,d.fb(),d.Ba()),6);case 6:return f=m.h,C(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.u(3);break}return C(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),C(m,e.destroy(),10);case 10:ya(m,0);break;case 2:va(m),m.u(3)}})};
|
|
1125
|
+
r.onInitialVariantChosen=function(){};r.banLocation=function(){};mi["application/x-offline-manifest"]=function(){return new oy};function py(){}function qy(a){var b=hy(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Wf(a)):a=b&&"segment"==b.g?ry(b.key(),b):Uf(new R(2,1,9004,a));return a}
|
|
1126
|
+
function ry(a,b){var c=new Ox;return Wf(void 0).va(function(){return c.init()}).va(function(){return Sx(c,b.fb(),b.Ba())}).va(function(d){return d.getSegments([b.key()])}).va(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}P("shaka.offline.OfflineScheme",py);py.plugin=qy;fg("offline",qy);function sy(a,b,c){var d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:d=[];for(var m=[],n=u(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var p=!1,t=u(m),w=t.next();!w.done;w=t.next())if(w=w.value,ty(w.info,q)){w.sessionIds.push(q.sessionId);p=!0;break}p||m.push({info:q,sessionIds:[q.sessionId]})}e=u(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=uy(a,b,g);return C(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})}
|
|
1127
|
+
function uy(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new qh({zb:b,onError:function(){},fe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ra(f,2),d.configure(a),C(f,yh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ta(f,3);break;case 2:return va(f),C(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],C(f,Promise.all(c.sessionIds.map(function(g){return L(function(h){if(1==
|
|
1128
|
+
h.g)return ra(h,2),C(h,Kh(d,g),4);if(2!=h.g)return e.push(g),ta(h,0);va(h);F(h)})})),6);case 6:return C(f,d.destroy(),7);case 7:return f.return(e)}})}function ty(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Lb(a.audioCapabilities,b.audioCapabilities,c)&&Lb(a.videoCapabilities,b.videoCapabilities,c)};function vy(a,b,c){var d=b.presentationTimeline.getDuration();b=wy(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function xy(a,b){var c=jy(new iy(a.fb(),a.Ba()),b),d=b.appMetadata||{};c=wy(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
|
|
1129
|
+
function wy(a){var b=[],c=lf(a.variants);c=u(c);for(var d=c.next();!d.done;d=c.next())b.push(Ye(d.value));a=u(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Ze(c.value));return b};function yy(){this.g={}}function zy(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Ay(a,b){a.g[b.id]=b.bandwidth||2048}function By(a,b){a=a.g[b];null==a&&(a=0);return a};function Cy(a){var b=this;if(a&&a.constructor!=X)throw new R(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Vb()):(this.h=bm(),this.g=new eg);this.i=[];this.j=[];var c=!a;this.l=new rg(function(){var d,e,f,g,h;return L(function(k){switch(k.g){case 1:return C(k,Promise.all(b.j.map(function(l){return yx(l)})),2);case 2:d=function(){};e=[];f=u(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return C(k,Promise.all(e),3);case 3:if(!c){k.u(4);break}return C(k,b.g.destroy(),4);
|
|
1130
|
+
case 4:b.h=null,b.g=null,F(k)}})})}function Dy(){if(Nc())a:{var a=u(Px.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}r=Cy.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ul(a,b));return fm(this.h,a)};r.getConfiguration=function(){var a=bm();fm(a,this.h,bm());return a};r.Vb=function(){return this.g};
|
|
1131
|
+
r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new xx(this.g);this.j.push(f);b=Ey(this,a,b||{},function(){var g;return L(function(h){if(1==h.g)return c?h.u(2):C(h,Nm(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=li(a,c||null);return h.return(g())})},e,f);b=new Tf(b,function(){return yx(f)});b.finally(function(){Kb(d.j,f)});return Fy(this,b)};
|
|
1132
|
+
function Ey(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,t,w,x,z,v,B;return L(function(A){switch(A.g){case 1:return Gy(),h=g=null,k=new Ox,n=m=l=null,ra(A,2,3),C(A,d(),5);case 5:return g=A.h,C(A,Hy(a,b,g,e),6);case 6:q=A.h;Iy(a);p=!q.presentationTimeline.R()&&!q.presentationTimeline.ac();if(!p)throw new R(2,9,9005,b);return C(A,a.oc(q,function(D){n=n||D},e),7);case 7:h=A.h;Iy(a);if(n)throw n;return C(A,Jy(q,h,e),8);case 8:return C(A,k.init(),9);case 9:return Iy(a),C(A,Qx(k),10);case 10:return l=A.h,Iy(a),t=Ky(h,
|
|
1133
|
+
q,b,c,e,f),w=t.Th,x=t.Jf,C(A,l.Ba.addManifests([w]),11);case 11:z=A.h;Iy(a);m=z[0];Iy(a);if(n)throw n;return C(A,Ly(a,x,m,w,f,e,l.Ba,q,h),12);case 12:return Iy(a),My(q,w,h,e),C(A,l.Ba.updateManifest(m,w),13);case 13:return Iy(a),v=new gy("manifest",l.path.fb,l.path.Ba,m),A.return(xy(v,w));case 3:return xa(A),C(A,k.destroy(),14);case 14:if(!g){A.u(15);break}return C(A,g.stop(),15);case 15:if(!h){A.u(17);break}return C(A,h.destroy(),17);case 17:ya(A,0);break;case 2:B=va(A);if(null==m){A.u(19);break}return C(A,
|
|
1134
|
+
Ny(m),19);case 19:throw n||B;}})}
|
|
1135
|
+
function Ly(a,b,c,d,e,f,g,h,k){var l,m,n,q,p,t,w,x,z,v;return L(function(B){switch(B.g){case 1:l={};m=0;n=function(A,D){var G,J,I,E,H,K,M;return L(function(N){if(1==N.g){G={};J=u(A);for(I=J.next();!I.done;G={Ob:G.Ob},I=J.next())G.Ob=I.value,E=ux(G.Ob,f),H=G.Ob.i,K=G.Ob.h,M=function(O){return function(S){var V,Q,wa;return L(function(Da){if(1==Da.g)return C(Da,g.addSegments([{data:S}]),2);V=Da.h;Iy(a);Q=O.Ob.g;wa=tx(Q);l[wa]=V[0];m+=S.byteLength;F(Da)})}}(G),Ax(e,G.Ob.groupId,E,H,K,M);return C(N,Cx(e),
|
|
1136
|
+
2)}if(!D)return N.u(0);Iy(a);My(h,d,k,f);return C(N,g.updateManifest(c,d),0)})};q=!1;ra(B,2);if(!Oy(h)||!q||Py(h)){B.u(4);break}return C(B,n(b.filter(function(A){return A.h}),!0),5);case 5:return Iy(a),b=b.filter(function(A){return!A.h}),p=l,t=m,l={},m=0,C(B,Qy(g,c,d,p,t,function(){return Iy(a)}),6);case 6:Iy(a);case 4:if(q){B.u(7);break}return C(B,n(b,!1),8);case 8:return Iy(a),w=l,x=m,l={},m=0,C(B,Qy(g,c,d,w,x,function(){return Iy(a)}),9);case 9:Iy(a);case 7:ta(B,0);break;case 2:return z=va(B),
|
|
1137
|
+
v=Object.values(l),C(B,g.removeSegments(v,function(){}),10);case 10:throw z;}})}function Ny(a){var b,c,d,e;return L(function(f){switch(f.g){case 1:return b=new Ox,C(f,b.init(),2);case 2:return C(f,Qx(b),3);case 3:return c=f.h,d=new gy("manifest",c.path.fb,c.path.Ba,a),C(f,b.destroy(),4);case 4:return e=new Cy,C(f,e.remove(d.toString()),0)}})}
|
|
1138
|
+
function Qy(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,t,w,x;return L(function(z){switch(z.g){case 1:g=!1;ra(z,2);h=!0;k=u(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=u(m.segments),q=n.next();!q.done;q=n.next())p=q.value,t=p.pendingSegmentRefId?d[p.pendingSegmentRefId]:null,null!=t&&(p.dataKey=t,p.pendingSegmentRefId=void 0),t=p.pendingInitSegmentRefId?d[p.pendingInitSegmentRefId]:null,null!=t&&(p.initSegmentKey=t,p.pendingInitSegmentRefId=void 0),p.pendingSegmentRefId&&(h=!1),p.pendingInitSegmentRefId&&
|
|
1139
|
+
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return C(z,a.updateManifest(b,c),4);case 4:g=!0;f();ta(z,0);break;case 2:return w=va(z),C(z,Ny(b),5);case 5:if(g){z.u(6);break}x=Object.values(d);return C(z,a.removeSegments(x,function(){}),6);case 6:throw w;}})}
|
|
1140
|
+
function Jy(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,t,w,x,z,v,B,A,D,G,J,I,E,H,K,M,N,O;return L(function(S){switch(S.g){case 1:return d={width:Infinity,height:Infinity},Ee(a,c.restrictions,d),C(S,Ie(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Ce(a,g,h,f);k=u(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(Ye(m));n=u(a.textStreams);for(q=n.next();!q.done;q=n.next())p=q.value,e.push(Ze(p));
|
|
1141
1141
|
t=u(a.imageStreams);for(w=t.next();!w.done;w=t.next())x=w.value,e.push($e(x));return C(S,c.offline.trackSelectionCallback(e),3);case 3:z=S.h;v=a.presentationTimeline.getDuration();B=0;A=u(z);for(D=A.next();!D.done;D=A.next())G=D.value,J=G.bandwidth*v/8,B+=J;ra(S,4);return C(S,c.offline.downloadSizeCallback(B),6);case 6:I=S.h;if(!I)throw new R(2,9,9014);ta(S,5);break;case 4:E=va(S);if(E instanceof R)throw E;throw new R(2,9,9015);case 5:H=new Set;K=new Set;M=new Set;N=u(z);for(D=N.next();!D.done;D=
|
|
1142
|
-
N.next())O=D.value,"variant"==O.type&&H.add(O.id),"text"==O.type&&K.add(O.id),"image"==O.type&&M.add(O.id);a.variants=a.variants.filter(function(V){return H.has(V.id)});a.textStreams=a.textStreams.filter(function(V){return K.has(V.id)});a.imageStreams=a.imageStreams.filter(function(V){return M.has(V.id)});
|
|
1143
|
-
function
|
|
1144
|
-
q&&n&&(q.initData=[]);return{Th:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.cd(),streams:f,sessionIds:n?Qh(a):[],drmInfo:q,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Jf:m}}function
|
|
1145
|
-
function
|
|
1146
|
-
function
|
|
1147
|
-
function
|
|
1148
|
-
function
|
|
1149
|
-
function
|
|
1150
|
-
r.list=function(){return
|
|
1151
|
-
function
|
|
1152
|
-
c.configure(d.manifest),
|
|
1153
|
-
function
|
|
1154
|
-
function
|
|
1155
|
-
spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;
|
|
1156
|
-
endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});k=(k+1)%h});return g}function
|
|
1157
|
-
function
|
|
1158
|
-
function
|
|
1159
|
-
function
|
|
1160
|
-
function
|
|
1161
|
-
|
|
1162
|
-
var
|
|
1163
|
-
function
|
|
1164
|
-
function
|
|
1165
|
-
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",
|
|
1166
|
-
function
|
|
1167
|
-
function
|
|
1168
|
-
(p+="; spatialRendering=true");l=kb(p);if(!l)return q.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,q.return(b);m=a.keySystemConfiguration;return C(q,
|
|
1169
|
-
function
|
|
1170
|
-
function
|
|
1171
|
-
distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=(a?a.contentType:"")+"#"+(b?b.contentType:"")+"#"+c.keySystem;l=null;ra(m,2);if(k in
|
|
1172
|
-
function
|
|
1173
|
-
var
|
|
1174
|
-
function
|
|
1175
|
-
function
|
|
1176
|
-
function
|
|
1177
|
-
function
|
|
1178
|
-
function
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
function
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
function
|
|
1142
|
+
N.next())O=D.value,"variant"==O.type&&H.add(O.id),"text"==O.type&&K.add(O.id),"image"==O.type&&M.add(O.id);a.variants=a.variants.filter(function(V){return H.has(V.id)});a.textStreams=a.textStreams.filter(function(V){return K.has(V.id)});a.imageStreams=a.imageStreams.filter(function(V){return M.has(V.id)});Ry(a);F(S)}})}
|
|
1143
|
+
function Ky(a,b,c,d,e,f){var g=vy(c,b,d),h=e.offline.progressCallback;zx(f,function(p,t){g.size=t;h(g,p)},function(p,t){k&&e.offline.usePersistentLicense&&l==t&&Gh(a,"cenc",p)});var k=Oy(b)&&!Py(b),l=null;k&&(l=Sy.get(a.g.keySystem));for(var m=new yy,n=u(b.textStreams),q=n.next();!q.done;q=n.next())m.g[q.value.id]=52;n=u(b.imageStreams);for(q=n.next();!q.done;q=n.next())Ay(m,q.value);q=u(b.variants);for(n=q.next();!n.done;n=q.next())zy(m,n.value);m=Ty(f,m,b,e);f=m.streams;m=m.Jf;q=a.g;n=e.offline.usePersistentLicense;
|
|
1144
|
+
q&&n&&(q.initData=[]);return{Th:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.cd(),streams:f,sessionIds:n?Qh(a):[],drmInfo:q,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Jf:m}}function Oy(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
1145
|
+
function Py(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function My(a,b,c,d){b.expiration=c.cd();c=Qh(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Oy(a)&&d.offline.usePersistentLicense&&!c.length)throw new R(2,9,9007);}r.remove=function(a){return Uy(this,Vy(this,a))};
|
|
1146
|
+
function Vy(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:Gy();c=hy(b);if(null==c||"manifest"!=c.g)throw new R(2,9,9004,b);d=c;e=new Ox;sa(k,2);return C(k,e.init(),4);case 4:return C(k,Sx(e,d.fb(),d.Ba()),5);case 5:return f=k.h,C(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],C(k,Promise.all([Wy(a,h,e),Xy(f,d,h)]),2);case 2:return xa(k),C(k,e.destroy(),8);case 8:ya(k,0)}})}
|
|
1147
|
+
function Yy(a,b){for(var c=[],d=u(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Nd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Nd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Wy(a,b,c){return L(function(d){return C(d,Zy(a.g,a.h.drm,c,b),0)})}
|
|
1148
|
+
function Xy(a,b,c){function d(){}var e=$y(c);xy(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.ki=function(){return Uy(this,az(this))};
|
|
1149
|
+
function az(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return Gy(),b=a.g,c=a.h.drm,d=new Ox,e=!1,sa(n,2),C(n,d.init(),4);case 4:f=[],Tx(d,function(q){return f.push(q)}),g=u(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return C(n,k.getAll(),8);case 8:return l=n.h,C(n,sy(c,b,l),9);case 9:return m=n.h,C(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.u(5);break;case 2:return xa(n),C(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n.return(!e)}})}
|
|
1150
|
+
r.list=function(){return Uy(this,bz())};function bz(){var a,b,c;return L(function(d){switch(d.g){case 1:return Gy(),a=[],b=new Ox,sa(d,2),C(d,b.init(),4);case 4:return c=Promise.resolve(),Rx(b,function(e,f){c=c.then(function(){var g;return L(function(h){if(1==h.g)return C(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=xy(new gy("manifest",e.fb,e.Ba,l),k);a.push(k)});F(h)})})}),C(d,c,2);case 2:return xa(d),C(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d.return(a)}})}
|
|
1151
|
+
function Hy(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate}},
|
|
1152
|
+
c.configure(d.manifest),Iy(a),C(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Iy(a),k=cz(h),C(l,Promise.all(tg(k,function(m){return m.createSegmentIndex()})),3);Iy(a);if(e)throw e;return l.return(h)})}r.oc=function(a,b,c){var d=this,e;return L(function(f){return 1==f.g?(e=new qh({zb:d.g,onError:b,fe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),C(f,vh(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?C(f,Ih(e),3):f.return(e)})};
|
|
1153
|
+
function Ty(a,b,c,d){var e=new Map,f=cz(c),g=new Map;f=u(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=dz(a,b,c,h,d,e);g.set(h.id,k)}a=u(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Jf:Array.from(e.values())}}
|
|
1154
|
+
function dz(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,
|
|
1155
|
+
spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;ez(d,c.presentationTimeline.qb(),function(l){var m=tx(l),n=void 0;if(!f.has(m)){var q=l.endTime-l.startTime;q=By(b,d.id)*q;q=wx(a.g,q);f.set(m,new sx(l,q,k,!1))}l.ca&&(n=tx(l.ca),f.has(n)||(q=.5*By(b,d.id),q=wx(a.g,q),f.set(n,new sx(l.ca,q,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,
|
|
1156
|
+
endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});k=(k+1)%h});return g}function ez(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function Iy(a){if(a.l.g)throw new R(2,9,7001);}function Gy(){if(!Dy())throw new R(2,9,9E3);}
|
|
1157
|
+
function Uy(a,b){return L(function(c){if(1==c.g)return a.i.push(b),sa(c,2),C(c,b,4);if(2!=c.g)return c.return(c.h);xa(c);Kb(a.i,b);return ya(c,0)})}function Fy(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Kb(a.i,c)})}function $y(a){var b=new Set;a=u(a.streams);for(var c=a.next();!c.done;c=a.next()){c=u(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
|
|
1158
|
+
function Zy(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Ux(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Yy(d,!1),videoCapabilities:Yy(d,!0)}});return C(h,sy(b,a,f),2)}return 3!=h.g?(g=h.h,C(h,e.remove(g),3)):C(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
1159
|
+
function cz(a){for(var b=new Set,c=u(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=u(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=u(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
|
|
1160
|
+
function Ry(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=u(b),d=c.next();!d.done;d=c.next()){d=u(b);for(var e=d.next();!e.done;e=d.next());}b=u(a);for(c=b.next();!c.done;c=b.next())for(c=u(a),d=c.next();!d.done;d=c.next());}P("shaka.offline.Storage",Cy);Cy.deleteAll=function(){var a;return L(function(b){return 1==b.g?(a=new Ox,sa(b,2),C(b,Vx(a),2)):5!=b.g?(xa(b),C(b,a.destroy(),5)):ya(b,0)})};
|
|
1161
|
+
Cy.prototype.list=Cy.prototype.list;Cy.prototype.removeEmeSessions=Cy.prototype.ki;Cy.prototype.remove=Cy.prototype.remove;Cy.prototype.store=Cy.prototype.store;Cy.prototype.getNetworkingEngine=Cy.prototype.Vb;Cy.prototype.getConfiguration=Cy.prototype.getConfiguration;Cy.prototype.configure=Cy.prototype.configure;Cy.prototype.destroy=Cy.prototype.destroy;Cy.support=Dy;
|
|
1162
|
+
var Sy=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95");ap.offline=Dy;function fz(){}function gz(a,b){a={priority:b||0,callback:a};for(b=0;b<hz.length;b++)if(hz[b].priority<a.priority){hz.splice(b,0,a);return}hz.push(a)}P("shaka.polyfill",fz);fz.register=gz;fz.installAll=function(){for(var a=u(hz),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Va("Error installing polyfill!",c)}}};var hz=[];function iz(){this.g=new jz}function kz(){window.AbortController||(window.AbortController=iz,window.AbortSignal=jz)}iz.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new T("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(iz.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});fz.AbortController=iz;iz.install=kz;
|
|
1163
|
+
function jz(){bg.call(this);this.h=!1;this.g=void 0;this.onabort=null}na(jz,bg);da.Object.defineProperties(jz.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});gz(kz);function lz(){}function mz(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=u(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())nz(b.value)}function nz(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}fz.Aria=lz;lz.install=mz;gz(mz);function oz(){}function pz(){qz()}fz.EncryptionScheme=oz;oz.install=pz;gz(pz,-2);function rz(){}
|
|
1164
|
+
function sz(){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}}),
|
|
1165
|
+
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",tz);document.addEventListener("webkitfullscreenerror",tz);document.addEventListener("mozfullscreenchange",tz);document.addEventListener("mozfullscreenerror",tz);document.addEventListener("MSFullscreenChange",tz);document.addEventListener("MSFullscreenError",tz)}}
|
|
1166
|
+
function tz(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)}fz.Fullscreen=rz;rz.install=sz;gz(sz);function uz(){}function vz(){var a=!0;!Yc()||Yc()&&Rc("Android")||Yc()&&Rc("Fuchsia")||(a=!1);if(Zc()||ad()||$c()||Vc()||Sc()||Rc("PC=EOS")||bd())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),wz=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=xz)}
|
|
1167
|
+
function xz(a){var b,c,d,e,f,g,h,k,l,m,n;return L(function(q){switch(q.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};c=a.video;d=a.audio;if("media-source"!=a.type){if("file"==a.type){if(c&&(e=c.contentType,f=Oc(e),!f)||d&&(g=d.contentType,h=Oc(g),!h))return q.return(b)}else return q.return(b);q.u(2);break}if(!Nc())return q.return(b);if(!c){q.u(3);break}return C(q,yz(c),4);case 4:if(k=q.h,!k)return q.return(b);case 3:if(d){var p=d.contentType;Yc()&&d.spatialRendering&&
|
|
1168
|
+
(p+="; spatialRendering=true");l=kb(p);if(!l)return q.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,q.return(b);m=a.keySystemConfiguration;return C(q,zz(c,d,m),6);case 6:if(n=q.h)b.supported=!0,b.keySystemAccess=n;case 5:return q.return(b)}})}
|
|
1169
|
+
function yz(a){var b,c;return L(function(d){return 1==d.g?Yc()?C(d,Az(a),3):Sc()?(b=a.contentType,a.width&&a.height&&(b+="; width="+a.width,b+="; height="+a.height),a.framerate&&(b+="; framerate="+a.framerate),a.bitrate&&(b+="; bitrate="+a.bitrate),d.return(kb(b))):d.u(2):2!=d.g?(c=d.h,d.return(c)):d.return(kb(a.contentType))})}
|
|
1170
|
+
function zz(a,b,c){var d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},Sc()&&b.contentType.includes('codecs="ac-3"')&&(f.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(f.encryptionScheme=c.audio.encryptionScheme),d.push(f));c.video&&(g={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(g.encryptionScheme=c.video.encryptionScheme),e.push(g));h={initDataTypes:[c.initDataType],
|
|
1171
|
+
distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=(a?a.contentType:"")+"#"+(b?b.contentType:"")+"#"+c.keySystem;l=null;ra(m,2);if(k in Bz){l=Bz[k];m.u(4);break}return C(m,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:l=m.h,Bz[k]=l;case 4:ta(m,3);break;case 2:va(m);case 3:return m.return(l)}})}
|
|
1172
|
+
function Az(a){var b,c;return L(function(d){if(1==d.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return d.return(kb(a.contentType));b=a.contentType;a.width&&a.height&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(b+="; framerate="+a.framerate);"pq"===a.transferFunction&&(b+="; eotf=smpte2084");c=!1;return b in Cz?(c=Cz[b],d.u(2)):C(d,cast.__platform__.canDisplayType(b),3)}2!=d.g&&(c=d.h,Cz[b]=c);return d.return(c)})}fz.MediaCapabilities=uz;uz.install=vz;
|
|
1173
|
+
var wz=null;uz.originalMcap=wz;var Bz={};uz.memoizedMediaKeySystemAccessRequests_=Bz;var Cz={};uz.memoizedCanDisplayTypeRequests_=Cz;gz(vz,-1);function Dz(){}function Ez(){var a=cd();if(window.MediaSource||window.ManagedMediaSource)a?10>=a?window.MediaSource=null:12>=a?(Fz(),Gz()):15>=a&&Fz():Rc("DT_STB_BCM")?(Fz(),Gz()):(Uc()||Tc()||Rc("Tizen 4"))&&Hz();(window.MediaSource||window.ManagedMediaSource)&&Iz();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Jz()}
|
|
1174
|
+
function Fz(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ha.apply(0,arguments));b.abort=function(){};return b}}function Gz(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
|
|
1175
|
+
function Iz(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=Td(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=Td(c)&&b(c)}}}
|
|
1176
|
+
function Hz(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=Wd(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=Wd(c)&&b(c)}}}
|
|
1177
|
+
function Jz(){var a=MediaSource.isTypeSupported;Vc()||(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)})}fz.MediaSource=Dz;Dz.install=Ez;gz(Ez);function Kz(){}function Lz(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?Mz():void 0!=window.orientation&&Nz())}function Mz(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
|
|
1178
|
+
function Nz(){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 Oz;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new T("change");b.dispatchEvent(c)})}fz.Orientation=Kz;Kz.install=Lz;function Oz(){bg.call(this);this.type="";this.angle=0}na(Oz,bg);
|
|
1179
|
+
Oz.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
|
|
1180
|
+
Oz.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};gz(Lz);function Pz(){}var Qz,Rz,Sz,Tz,Uz,Vz;function Wz(a,b){try{var c=new Xz(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Yz(a){var b=this.mediaKeys;b&&b!=a&&Zz(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Zz(a,this):Promise.resolve()}
|
|
1181
|
+
function $z(a){a=Ab(a.initData);if(Eb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=jd(a.subarray(4),!0);a=od(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Bb(a);this.dispatchEvent(b)}fz.PatchedMediaKeysApple=Pz;
|
|
1182
|
+
Pz.uninstall=function(){Qz&&(Qz=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Rz),HTMLMediaElement.prototype.setMediaKeys=Sz,window.MediaKeys=Tz,window.MediaKeySystemAccess=Uz,navigator.requestMediaKeySystemAccess=Vz,Rz=Vz=Sz=Uz=Tz=null,window.shakaMediaKeysPolyfill="")};
|
|
1183
|
+
Pz.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)Qz=!0,Rz=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Sz=HTMLMediaElement.prototype.setMediaKeys,Tz=window.MediaKeys,Uz=window.MediaKeySystemAccess,Vz=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Yz;window.MediaKeys=aA;window.MediaKeySystemAccess=Xz;navigator.requestMediaKeySystemAccess=
|
|
1184
|
+
Wz;window.shakaMediaKeysPolyfill=bA}};
|
|
1185
|
+
function Xz(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=u(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=u(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
1186
1186
|
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=u(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
1187
|
-
|
|
1188
|
-
function
|
|
1189
|
-
r.generateRequest=function(a,b){var c=this;this.h=new Sf;try{var d=this.l.createSession("video/mp4",Ab(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Yb()?"license-request":"license-renewal").set("message",Bb(e.message));e=new T("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(
|
|
1190
|
-
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:
|
|
1191
|
-
r.update=function(a){this.g=new Sf;try{this.i.update(Ab(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ib()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function
|
|
1192
|
-
function
|
|
1193
|
-
function
|
|
1194
|
-
|
|
1195
|
-
function
|
|
1196
|
-
function
|
|
1197
|
-
function
|
|
1187
|
+
Xz.prototype.createMediaKeys=function(){var a=new aA(this.keySystem);return Promise.resolve(a)};Xz.prototype.getConfiguration=function(){return this.g};function aA(a){this.h=new WebKitMediaKeys(a);this.g=new db}aA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new cA(this.h,a)};aA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
1188
|
+
function Zz(a,b){a.g.ib();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",$z);try{return qk(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}aA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function cA(a){bg.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new db;this.sessionId="";this.expiration=NaN;this.closed=new Sf;this.keyStatuses=new dA}na(cA,bg);r=cA.prototype;
|
|
1189
|
+
r.generateRequest=function(a,b){var c=this;this.h=new Sf;try{var d=this.l.createSession("video/mp4",Ab(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Yb()?"license-request":"license-renewal").set("message",Bb(e.message));e=new T("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(eA(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
|
|
1190
|
+
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:eA(c,"output-not-allowed");break;default:eA(c,"internal-error")}});eA(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
1191
|
+
r.update=function(a){this.g=new Sf;try{this.i.update(Ab(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ib()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function eA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b)}
|
|
1192
|
+
function dA(){this.size=0;this.g=void 0}r=dA.prototype;r.Yb=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,di.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=di.value();return this.g&&xb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var bA="apple";function fA(){}function gA(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||Tc()||Rc("Tizen 4")||Rc("Tizen 5.0")||Wc())&&(MediaKeys.prototype.setServerCertificate=hA)}function hA(){return Promise.resolve(!1)}fz.PatchedMediaKeysCert=fA;fA.install=gA;gz(gA);function iA(){}function jA(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=kA,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=lA,window.MediaKeys=mA,window.MediaKeySystemAccess=nA,window.shakaMediaKeysPolyfill=oA)}function kA(){return Promise.reject(Error("The key system specified is not supported."))}
|
|
1193
|
+
function lA(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}fz.PatchedMediaKeysNop=iA;iA.install=jA;function mA(){throw new TypeError("Illegal constructor.");}mA.prototype.createSession=function(){};mA.prototype.setServerCertificate=function(){};mA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function nA(){this.keySystem="";throw new TypeError("Illegal constructor.");}nA.prototype.getConfiguration=function(){};
|
|
1194
|
+
nA.prototype.createMediaKeys=function(){};var oA="nop";gz(jA,-10);function pA(){}
|
|
1195
|
+
function qA(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)rA="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=sA;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=tA;window.MediaKeys=uA;window.MediaKeySystemAccess=vA;window.shakaMediaKeysPolyfill=wA}}
|
|
1196
|
+
function xA(a){var b=rA;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function sA(a,b){try{var c=new vA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function tA(a){var b=this.mediaKeys;b&&b!=a&&yA(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&yA(a,this);return Promise.resolve()}fz.PatchedMediaKeysWebkit=pA;pA.install=qA;
|
|
1197
|
+
function vA(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=u(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=u(f.audioCapabilities),
|
|
1198
1198
|
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=u(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
|
|
1199
|
-
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
1200
|
-
function
|
|
1201
|
-
d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=
|
|
1202
|
-
|
|
1203
|
-
function
|
|
1204
|
-
function
|
|
1205
|
-
function
|
|
1206
|
-
function
|
|
1207
|
-
r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=
|
|
1208
|
-
r.forEach=function(a){this.g&&a(this.g,di.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=di.value();return this.g&&xb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var
|
|
1209
|
-
function
|
|
1210
|
-
function
|
|
1211
|
-
function
|
|
1212
|
-
P("shaka.text.LrcTextParser"
|
|
1213
|
-
|
|
1214
|
-
{Rb:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=$g(e,"metadata")[0])?g.children:[];h=$g(e,"style");e=$g(e,"region");k=[];for(var q=u(e),p=q.next();!p.done;p=q.next()){var t=p.value;p=new Ob;var w=t.attributes["xml:id"];if(w){p.id=w;var x=null;n&&(x=
|
|
1215
|
-
100*p.height/x)),p.widthUnits=z||null!=w?gc:0,p.heightUnits=z||null!=x?gc:0)}if(t=
|
|
1216
|
-
2,2001,"<p> can only be inside <div> in TTML");n=u(Xg(d,"div"));for(q=n.next();!q.done;q=n.next())if(Xg(q.value,"span").length)throw new R(2,2,2001,"<span> can only be inside <p> in TTML");if(b=
|
|
1217
|
-
function
|
|
1218
|
-
[];if(!z)for(var v=u(p.children),B=v.next();!B.done;B=v.next())(B=
|
|
1219
|
-
if(!B&&0<h.length)for(n=Infinity,v=0,b=u(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),v=Math.max(v,c.endTime);if("br"==p.tagName)return e=new Nb(n,v,""),e.lineBreak=!0,e;b="";z&&(b=rd(Yg(p)||""),x&&(b=b.replace(/\s+/g," ")));b=new Nb(n,v,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=
|
|
1220
|
-
!p.attributes.style&&(g=
|
|
1221
|
-
function
|
|
1222
|
-
g))a.backgroundColor=h;if(h=
|
|
1223
|
-
"bold"==h&&(a.fontWeight=700);h=
|
|
1224
|
-
d.split(" "),d[0].match(
|
|
1199
|
+
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}vA.prototype.createMediaKeys=function(){var a=new uA(this.g);return Promise.resolve(a)};vA.prototype.getConfiguration=function(){return this.h};function uA(a){this.l=a;this.h=null;this.g=new db;this.i=[];this.j=new Map}
|
|
1200
|
+
function yA(a,b){a.h=b;a.g.ib();var c=rA;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Bb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=zA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Yb()?"licenserequest":"licenserenewal").set("message",d.message),d=new T("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){if(d=zA(a,d.sessionId))AA(d,"usable"),
|
|
1201
|
+
d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=zA(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?AA(e,"output-restricted"):1==f?AA(e,"expired"):AA(e,"internal-error"))}}))}
|
|
1202
|
+
uA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new BA(b,this.l,a);this.i.push(a);return a};uA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};uA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
1203
|
+
function zA(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function BA(a,b,c){bg.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Sf;this.keyStatuses=new CA}na(BA,bg);
|
|
1204
|
+
function DA(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Ab(od("LOAD_SESSION|"+c));else{var e=od("PERSISTENT|");d=Ad(e,b)}else d=Ab(b)}catch(g){return Promise.reject(g)}a.h=new Sf;var f=xA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Mc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).U(.01)}return a.h}
|
|
1205
|
+
function EA(a,b,c){if(a.g)a.g.then(function(){return EA(a,b,c)}).catch(function(){return EA(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=id(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=vd(e.keys[0].k);e=vd(e.keys[0].kid)}else d=Ab(c),e=null;var f=xA("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
1206
|
+
function AA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b)}r=BA.prototype;r.generateRequest=function(a,b){return DA(this,b,null)};r.load=function(a){return"persistent-license"==this.l?DA(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new Sf;EA(this,b,a);return b};
|
|
1207
|
+
r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=xA("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function CA(){this.size=0;this.g=void 0}r=CA.prototype;r.Yb=function(){return this.g};
|
|
1208
|
+
r.forEach=function(a){this.g&&a(this.g,di.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=di.value();return this.g&&xb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var rA="",wA="webkit";gz(qA);function FA(){}function GA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=HA,Object.defineProperty(a,"disablePictureInPicture",{get:IA,set:JA,enumerable:!0,configurable:!0}),document.exitPictureInPicture=KA,document.addEventListener("webkitpresentationmodechanged",LA,!0))}}
|
|
1209
|
+
function LA(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
|
|
1210
|
+
function HA(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function KA(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
1211
|
+
function IA(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function JA(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}fz.PiPWebkit=FA;FA.install=GA;gz(GA);function MA(){}function NA(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=OA))}function OA(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}fz.RandomUUID=MA;MA.install=NA;gz(NA);function PA(){}function QA(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:RA})}function RA(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}fz.Symbol=PA;PA.install=QA;gz(QA);function SA(){}function TA(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}fz.VideoPlayPromise=SA;SA.install=TA;gz(TA);function UA(){}function VA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Wc())&&(a.getVideoPlaybackQuality=WA)}}function WA(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}fz.VideoPlaybackQuality=UA;UA.install=VA;gz(VA);function XA(){}function YA(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=ZA;else if(6==b)a=$A;else{try{var c=!!ZA(1,2,"")}catch(d){c=!1}c&&(a=ZA)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function ZA(a,b,c){return new window.TextTrackCue(a,b,c)}function $A(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}fz.VTTCue=XA;XA.install=YA;gz(YA);function aB(){}aB.prototype.parseInit=function(){};aB.prototype.setSequenceMode=function(){};aB.prototype.setManifestType=function(){};aB.prototype.parseMedia=function(a,b){var c=null,d=[];a=id(a).split(/\r?\n/);a=u(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=bB.exec(e))){var f=cB.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Nb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
|
|
1212
|
+
P("shaka.text.LrcTextParser",aB);aB.prototype.parseMedia=aB.prototype.parseMedia;aB.prototype.setManifestType=aB.prototype.setManifestType;aB.prototype.setSequenceMode=aB.prototype.setSequenceMode;aB.prototype.parseInit=aB.prototype.parseInit;var bB=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,cB=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;fe["application/x-subtitle-lrc"]=function(){return new aB};function dB(){}dB.prototype.parseInit=function(){};dB.prototype.setSequenceMode=function(){};dB.prototype.setManifestType=function(){};
|
|
1213
|
+
dB.prototype.parseMedia=function(a,b,c){var d=id(a);a=[];if(""==d)return a;var e=Rg(d,"tt");if(!e)throw new R(2,2,2005,"Failed to parse TTML.");d=$g(e,"body")[0];if(!d)return[];var f=fh(e,eB,"frameRate"),g=fh(e,eB,"subFrameRate"),h=fh(e,eB,"frameRateMultiplier"),k=fh(e,eB,"tickRate"),l=fh(e,eB,"cellResolution"),m=e.attributes["xml:space"]||"default",n=fh(e,fB,"extent");if("default"!=m&&"preserve"!=m)throw new R(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new gB(f,g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?
|
|
1214
|
+
{Rb:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=$g(e,"metadata")[0])?g.children:[];h=$g(e,"style");e=$g(e,"region");k=[];for(var q=u(e),p=q.next();!p.done;p=q.next()){var t=p.value;p=new Ob;var w=t.attributes["xml:id"];if(w){p.id=w;var x=null;n&&(x=hB.exec(n)||iB.exec(n));w=x?Number(x[1]):null;x=x?Number(x[2]):null;var z,v=jB(t,h,"extent");if(v){var B=(z=hB.exec(v))||iB.exec(v);null!=B&&(p.width=Number(B[1]),p.height=Number(B[2]),z||(null!=w&&(p.width=100*p.width/w),null!=x&&(p.height=
|
|
1215
|
+
100*p.height/x)),p.widthUnits=z||null!=w?gc:0,p.heightUnits=z||null!=x?gc:0)}if(t=jB(t,h,"origin"))if(B=(z=hB.exec(t))||iB.exec(t),null!=B)p.viewportAnchorX=Number(B[1]),p.viewportAnchorY=Number(B[2]),z?v||(p.width=100-p.viewportAnchorX,p.widthUnits=gc,p.height=100-p.viewportAnchorY,p.heightUnits=gc):(null!=x&&(p.viewportAnchorY=100*p.viewportAnchorY/x),null!=w&&(p.viewportAnchorX=100*p.viewportAnchorX/w)),p.viewportAnchorUnits=z||null!=w?gc:0}else p=null;p&&k.push(p)}if(Xg(d,"p").length)throw new R(2,
|
|
1216
|
+
2,2001,"<p> can only be inside <div> in TTML");n=u(Xg(d,"div"));for(q=n.next();!q.done;q=n.next())if(Xg(q.value,"span").length)throw new R(2,2,2001,"<span> can only be inside <p> in TTML");if(b=kB(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
|
|
1217
|
+
function kB(a,b,c,d,e,f,g,h,k,l,m,n){var q=l;if(Vg(a)){if(!m)return null;var p={tagName:"span",children:[Yg(a)],attributes:{},parent:null}}else p=a;for(var t=null,w=u(lB),x=w.next();!x.done&&!(t=mB(p,"backgroundImage",d,"#",x.value)[0]);x=w.next());w=null;var z=fh(p,lB,"backgroundImage");n&&z&&!z.startsWith("#")&&(x=new rc(n),z=new rc(z),(x=x.resolve(z).toString())&&(w=x));if("p"==a.tagName||t||w)m=!0;a=m;x="default"==(p.attributes["xml:space"]||(h?"default":"preserve"));z=p.children.every(Vg);h=
|
|
1218
|
+
[];if(!z)for(var v=u(p.children),B=v.next();!B.done;B=v.next())(B=kB(B.value,b,c,d,e,f,g,x,k,p,m,n))&&h.push(B);d=null!=l;n=Yg(p);n=p.children.length&&n&&/\S/.test(n);B=p.attributes.begin||p.attributes.end||p.attributes.dur;if(!(B||n||"br"==p.tagName||0!=h.length||d&&!x))return null;v=nB(p,c);n=v.start;for(v=v.end;q&&q.tagName&&"tt"!=q.tagName;)v=oB(q,c,n,v),n=v.start,v=v.end,q=q.parent;null==n&&(n=0);n+=b.periodStart;v=null==v?Infinity:v+b.periodStart;n=Math.max(n,b.segmentStart);v=Math.min(v,b.segmentEnd);
|
|
1219
|
+
if(!B&&0<h.length)for(n=Infinity,v=0,b=u(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),v=Math.max(v,c.endTime);if("br"==p.tagName)return e=new Nb(n,v,""),e.lineBreak=!0,e;b="";z&&(b=rd(Yg(p)||""),x&&(b=b.replace(/\s+/g," ")));b=new Nb(n,v,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=mB(p,"region",f,"")[0];if(p.attributes.region&&k&&k.attributes["xml:id"]){var A=k.attributes["xml:id"];b.region=g.filter(function(D){return D.id==A})[0]}g=k;l&&d&&!p.attributes.region&&
|
|
1220
|
+
!p.attributes.style&&(g=mB(l,"region",f,"")[0]);pB(b,p,g,t,w,e,a,0==h.length);return b}
|
|
1221
|
+
function pB(a,b,c,d,e,f,g,h){g=g||h;"rtl"==qB(b,c,f,"direction",g)&&(a.direction="rtl");h=qB(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Rb);(h=qB(b,c,f,"textAlign",!0))?(a.positionAlign=rB[h],a.lineAlign=sB[h],a.textAlign=ac[h.toUpperCase()]):a.textAlign=Qb;if(h=qB(b,c,f,"displayAlign",!0))a.displayAlign=bc[h.toUpperCase()];if(h=qB(b,c,f,"color",g))a.color=h;if(h=qB(b,c,f,"backgroundColor",
|
|
1222
|
+
g))a.backgroundColor=h;if(h=qB(b,c,f,"border",g))a.border=h;if(h=qB(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h}(h=qB(b,c,f,"fontWeight",g))&&
|
|
1223
|
+
"bold"==h&&(a.fontWeight=700);h=qB(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=qB(b,c,f,"lineHeight",g))&&h.match(tB)&&(a.lineHeight=h);(h=qB(b,c,f,"fontSize",g))&&(h.match(tB)||h.match(uB))&&(a.fontSize=h);if(h=qB(b,c,f,"fontStyle",g))a.fontStyle=fc[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=Yg(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=e);if(d=qB(b,c,f,"textOutline",g))d=
|
|
1224
|
+
d.split(" "),d[0].match(tB)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(tB)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=qB(b,c,f,"letterSpacing",g))&&d.match(tB)&&(a.letterSpacing=d);(d=qB(b,c,f,"linePadding",g))&&d.match(tB)&&(a.linePadding=d);if(d=qB(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=jB(c,f,"textDecoration"))&&vB(a,d);(d=wB(b,f,"textDecoration"))&&vB(a,d);if(d=qB(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(qB(b,c,f,"ruby",g)){case "container":a.rubyTag=
|
|
1225
1225
|
"ruby";break;case "text":a.rubyTag="rt"}}
|
|
1226
|
-
function
|
|
1227
|
-
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Kb(a.textDecoration,"overline")}}function
|
|
1228
|
-
function
|
|
1229
|
-
function
|
|
1230
|
-
function
|
|
1231
|
-
function
|
|
1232
|
-
function
|
|
1233
|
-
var
|
|
1234
|
-
end:"end"},
|
|
1235
|
-
|
|
1236
|
-
fe['application/mp4; codecs="stpp.ttml"']=function(){return new
|
|
1237
|
-
|
|
1238
|
-
for(var e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new
|
|
1239
|
-
h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");
|
|
1226
|
+
function vB(a,b){b=u(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&Kb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Kb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
|
|
1227
|
+
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Kb(a.textDecoration,"overline")}}function qB(a,b,c,d,e){e=void 0===e?!0:e;return(a=wB(a,c,d))?a:e?jB(b,c,d):null}function jB(a,b,c){if(!a)return null;var d=fh(a,fB,c);return d?d:xB(a,b,c)}function wB(a,b,c){var d=fh(a,fB,c);return d?d:xB(a,b,c)}
|
|
1228
|
+
function xB(a,b,c){a=mB(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=eh(a[e],"urn:ebu:tt:style",c);f||(f=fh(a[e],fB,c));f||(f=wB(a[e],b,c));f&&(d=f)}return d}function mB(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?eh(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=u(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=u(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f}
|
|
1229
|
+
function oB(a,b,c,d){a=nB(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}function nB(a,b){var c=yB(a.attributes.begin,b),d=yB(a.attributes.end,b);a=yB(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
|
|
1230
|
+
function yB(a,b){var c=null;if(zB.test(a)){a=zB.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(AB.test(a))c=BB(AB,a);else if(CB.test(a))c=BB(CB,a);else if(DB.test(a))a=DB.exec(a),c=Number(a[1])/b.frameRate;else if(EB.test(a))a=EB.exec(a),c=Number(a[1])/b.g;else if(FB.test(a))c=BB(FB,a);else if(a)throw new R(2,2,2001,"Could not parse cue time range in TTML");return c}
|
|
1231
|
+
function BB(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}P("shaka.text.TtmlTextParser",dB);dB.prototype.parseMedia=dB.prototype.parseMedia;dB.prototype.setManifestType=dB.prototype.setManifestType;dB.prototype.setSequenceMode=dB.prototype.setSequenceMode;dB.prototype.parseInit=dB.prototype.parseInit;
|
|
1232
|
+
function gB(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
|
|
1233
|
+
var hB=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,uB=/^(\d{1,2}(?:\.\d+)?|100)%$/,tB=/^(\d+px|\d+em|\d*\.?\d+c)$/,iB=/^(\d+)px (\d+)px$/,zB=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,AB=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,CB=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,DB=/^(\d*(?:\.\d*)?)f$/,EB=/^(\d*(?:\.\d*)?)t$/,FB=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),sB={left:Vb,center:"center",right:"end",start:Vb,
|
|
1234
|
+
end:"end"},rB={left:"line-left",center:"center",right:"line-right"},eB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],fB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],lB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];fe["application/ttml+xml"]=function(){return new dB};function GB(){this.g=new dB}GB.prototype.parseInit=function(a){var b=!1;(new Bg).box("moov",Gg).box("trak",Gg).box("mdia",Gg).box("minf",Gg).box("stbl",Gg).O("stsd",Ig).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new R(2,2,2007);};GB.prototype.setSequenceMode=function(){};GB.prototype.setManifestType=function(){};
|
|
1235
|
+
GB.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Bg).box("mdat",Ng(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new R(2,2,2007);return f};P("shaka.text.Mp4TtmlParser",GB);GB.prototype.parseMedia=GB.prototype.parseMedia;GB.prototype.setManifestType=GB.prototype.setManifestType;GB.prototype.setSequenceMode=GB.prototype.setSequenceMode;GB.prototype.parseInit=GB.prototype.parseInit;fe['application/mp4; codecs="stpp"']=function(){return new GB};
|
|
1236
|
+
fe['application/mp4; codecs="stpp.ttml"']=function(){return new GB};fe['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new GB};fe['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new GB};fe['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new GB};fe['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new GB};fe['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new GB};fe['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new GB};function HB(){this.h=!1;this.g="UNKNOWN"}HB.prototype.parseInit=function(){};HB.prototype.setSequenceMode=function(a){this.h=a};HB.prototype.setManifestType=function(a){this.g=a};
|
|
1237
|
+
HB.prototype.parseMedia=function(a,b){a=id(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new R(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g)if(this.h){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new R(2,2,2E3);a=IB(new Ou(a[1]));if(null==a)throw new R(2,2,2E3);a=b.periodStart+Number(d[1])/9E4-a}else a=b.segmentStart;b=[];d=u(c[0].split("\n"));
|
|
1238
|
+
for(var e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new Ou(e);var f=new Ob;Ru(e);Pu(e);for(var g=Ru(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),
|
|
1239
|
+
h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Pu(e);g=Ru(e)}b.push(f)}d=new Map;JB(d);e=[];c=u(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=u(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=
|
|
1240
1240
|
l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Nb(0,0,""));for(var m=!1,n=0;n<k.length;n++){var q=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(q){var p=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=p;break;case "color":m=!0;l.color=p;break;case "font-family":m=!0;l.fontFamily=p;break;case "font-size":m=!0;l.fontSize=p;break;case "font-weight":if(700<=parseInt(p,10)||"bold"==p)m=!0,l.fontWeight=
|
|
1241
1241
|
700;break;case "font-style":switch(p){case "normal":m=!0;l.fontStyle=Yb;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(p);break;case "text-combine-upright":m=!0;l.textCombineUpright=p;break;case "text-shadow":m=!0;l.textShadow=p;break;case "white-space":m=!0,l.wrapLine="noWrap"!=p}}}m&&d.set(g,l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else if(h=null,
|
|
1242
|
-
f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new
|
|
1243
|
-
function
|
|
1244
|
-
function
|
|
1245
|
-
k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=u(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=
|
|
1246
|
-
m.next())
|
|
1247
|
-
function
|
|
1248
|
-
|
|
1249
|
-
if(!f)break;if(f=
|
|
1250
|
-
function
|
|
1251
|
-
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Pb);else if(d=/^region:(.*)$/.exec(b)){if(b=
|
|
1252
|
-
function
|
|
1253
|
-
fe["text/vtt"]=function(){return new
|
|
1254
|
-
|
|
1255
|
-
q.value;var p=q.yf||l,t=q.ie?c+q.ie:a;a=t+(p||0);var w=0;do{var x=m.M();w+=x;var z=m.M(),v=null;"vttc"==Fg(z)?8<x&&(v=m.sb(x-8)):m.skip(x-8);p&&v&&(x=
|
|
1256
|
-
function
|
|
1257
|
-
function
|
|
1258
|
-
function
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
[];b=null;e={};c=u(c.split(/\r?\n/));for(f=c.next();!f.done;e={se:e.se},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g
|
|
1262
|
-
function
|
|
1242
|
+
f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new Ou(f[0]),k=IB(g),n=Qu(g,/[ \t]+--\x3e[ \t]+/g),l=IB(g),null==k||null==n||null==l)Va("Failed to parse VTT time code. Cue skipped:",h,f),f=null;else{k+=m;l+=m;f=f.slice(1).join("\n").trim();d.has("global")?(m=d.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new Nb(k,l,"");Pu(g);for(k=Ru(g);k;)KB(m,k,b),Pu(g),k=Ru(g);LB(f,m,d);null!=h&&(m.id=h);f=m}f&&e.push(f)}return e};
|
|
1243
|
+
function JB(a){for(var b=u(Object.entries(dc)),c=b.next();!c.done;c=b.next()){var d=u(c.value);c=d.next().value;d=d.next().value;var e=new Nb(0,0,"");e.color=d;a.set("."+c,e)}b=u(Object.entries(ec));for(c=b.next();!c.done;c=b.next())d=u(c.value),c=d.next().value,d=d.next().value,e=new Nb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
1244
|
+
function LB(a,b,c){if(a.includes("<")){0===c.size&&JB(c);var d=a;a=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(MB)&&a.push(e),e=-1);a=u(a);for(f=a.next();!f.done;f=a.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a=d;a:{f=a;e=[];var g=-1;a="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){a=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&(l=e[e.length-1]);if(l){if(l===
|
|
1245
|
+
k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=u(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=NB(a);try{var m=Rg("<span>"+a+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=m.length||m[0].tagName)for(m=u(m),a=m.next();!a.done;a=
|
|
1246
|
+
m.next())OB(a.value,b,c);else b.payload=rd(a);else b.payload=rd(a)}else b.payload=rd(a)}function NB(a){var b={"< ":""," >":" >"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}function PB(a,b){return a&&0<a.length?a:b}
|
|
1247
|
+
function OB(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Ob;d.position=null;d.size=0;if(a.tagName)for(var e=u(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(g=c.get(g))&&(d.backgroundColor=PB(g.backgroundColor,d.backgroundColor),d.color=PB(g.color,d.color),d.fontFamily=PB(g.fontFamily,d.fontFamily),d.fontSize=
|
|
1248
|
+
PB(g.fontSize,d.fontSize),d.textShadow=PB(g.textShadow,d.textShadow),d.fontWeight=g.fontWeight,d.fontStyle=g.fontStyle,d.opacity=g.opacity,d.rubyTag=g.rubyTag,d.textCombineUpright=g.textCombineUpright,d.wrapLine=g.wrapLine);switch(f){case "br":d=Zb(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=700;break;case "i":d.fontStyle="italic";break;case "u":d.textDecoration.push("underline");break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;
|
|
1249
|
+
if(!f)break;if(f=IB(new Ou(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(Vg(a)||1==e.length&&Vg(e[0]))for(c=Yg(a).split("\n"),a=!0,c=u(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Zb(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=rd(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=u(e),a=b.next();!a.done;a=b.next())OB(a.value,d,c)}
|
|
1250
|
+
function KB(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Qb:a.textAlign=ac[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
|
|
1251
|
+
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Pb);else if(d=/^region:(.*)$/.exec(b)){if(b=QB(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=cc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Ub,a.line=Number(c[1]),c[2]&&(a.lineAlign=cc[c[2].toUpperCase()])}
|
|
1252
|
+
function QB(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function IB(a){a=Qu(a,MB);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)}P("shaka.text.VttTextParser",HB);HB.prototype.parseMedia=HB.prototype.parseMedia;HB.prototype.setManifestType=HB.prototype.setManifestType;HB.prototype.setSequenceMode=HB.prototype.setSequenceMode;HB.prototype.parseInit=HB.prototype.parseInit;var MB=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
|
|
1253
|
+
fe["text/vtt"]=function(){return new HB};fe['text/vtt; codecs="vtt"']=function(){return new HB};fe['text/vtt; codecs="wvtt"']=function(){return new HB};function RB(){this.g=null}RB.prototype.parseInit=function(a){var b=this,c=!1;(new Bg).box("moov",Gg).box("trak",Gg).box("mdia",Gg).O("mdhd",function(d){d=Pi(d.reader,d.version);b.g=d.timescale}).box("minf",Gg).box("stbl",Gg).O("stsd",Ig).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new R(2,2,2008);if(!c)throw new R(2,2,2008);};RB.prototype.setSequenceMode=function(){};RB.prototype.setManifestType=function(){};
|
|
1254
|
+
RB.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new R(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Bg).box("moof",Gg).box("traf",Gg).O("tfdt",function(B){g=!0;c=Oi(B.reader,B.version).baseMediaDecodeTime}).O("tfhd",function(B){l=Ni(B.reader,B.flags).Yf}).O("trun",function(B){h=!0;d=Qi(B.reader,B.version,B.flags).xg}).box("mdat",Ng(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new R(2,2,2008);a=c;for(var m=new yg(e,0),n=u(d),q=n.next();!q.done;q=n.next()){q=
|
|
1255
|
+
q.value;var p=q.yf||l,t=q.ie?c+q.ie:a;a=t+(p||0);var w=0;do{var x=m.M();w+=x;var z=m.M(),v=null;"vttc"==Fg(z)?8<x&&(v=m.sb(x-8)):m.skip(x-8);p&&v&&(x=SB(v,b.periodStart+t/this.g,b.periodStart+a/this.g),f.push(x))}while(q.sampleSize&&w<q.sampleSize)}return f.filter(oe)};function SB(a,b,c){var d,e,f;(new Bg).box("payl",Ng(function(g){d=id(g)})).box("iden",Ng(function(g){e=id(g)})).box("sttg",Ng(function(g){f=id(g)})).parse(a);return d?TB(d,e,f,b,c):null}
|
|
1256
|
+
function TB(a,b,c,d,e){d=new Nb(d,e,"");LB(a,d,new Map);b&&(d.id=b);if(c)for(a=new Ou(c),b=Ru(a);b;)KB(d,b,[]),Pu(a),b=Ru(a);return d}P("shaka.text.Mp4VttParser",RB);RB.prototype.parseMedia=RB.prototype.parseMedia;RB.prototype.setManifestType=RB.prototype.setManifestType;RB.prototype.setSequenceMode=RB.prototype.setSequenceMode;RB.prototype.parseInit=RB.prototype.parseInit;fe['application/mp4; codecs="wvtt"']=function(){return new RB};function UB(){}UB.prototype.parseInit=function(){};UB.prototype.setSequenceMode=function(){};UB.prototype.setManifestType=function(){};UB.prototype.parseMedia=function(a){var b=id(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=u(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Ou(c[0]),e=VB(d),f=Qu(d,/,/g);d=VB(d);if(null==e||null==f||null==d)throw new R(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Nb(e,d,c.slice(1).join("\n").trim()))}return a};
|
|
1257
|
+
function VB(a){a=Qu(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)}P("shaka.text.SbvTextParser",UB);UB.prototype.parseMedia=UB.prototype.parseMedia;UB.prototype.setManifestType=UB.prototype.setManifestType;UB.prototype.setSequenceMode=UB.prototype.setSequenceMode;UB.prototype.parseInit=UB.prototype.parseInit;fe["text/x-subviewer"]=function(){return new UB};function WB(){this.g=new HB}WB.prototype.parseInit=function(){};WB.prototype.setSequenceMode=function(){};WB.prototype.setManifestType=function(){};WB.prototype.parseMedia=function(a,b,c){a=id(a);a=XB(a);a=Ab(od(a));return this.g.parseMedia(a,b,c)};
|
|
1258
|
+
function XB(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=u(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").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}P("shaka.text.SrtTextParser",WB);WB.srt2webvtt=XB;WB.prototype.parseMedia=WB.prototype.parseMedia;
|
|
1259
|
+
WB.prototype.setManifestType=WB.prototype.setManifestType;WB.prototype.setSequenceMode=WB.prototype.setSequenceMode;WB.prototype.parseInit=WB.prototype.parseInit;fe["text/srt"]=function(){return new WB};function YB(){}YB.prototype.parseInit=function(){};YB.prototype.setSequenceMode=function(){};YB.prototype.setManifestType=function(){};
|
|
1260
|
+
YB.prototype.parseMedia=function(a){var b="",c="";a=id(a).split(/\r?\n\s*\r?\n/);a=u(a);for(var d=a.next();!d.done;d=a.next()){var e=ZB.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=u(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=$B.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(aC);else if("Style"==e){e=f.split(aC);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
|
|
1261
|
+
[];b=null;e={};c=u(c.split(/\r?\n/));for(f=c.next();!f.done;e={se:e.se},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=$B.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(aC);else if("Dialogue"==f){g=g.split(aC);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=bC(f.Start);var k=bC(f.End);g=new Nb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.se=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.se}}(e)))&&cC(g,f);d.push(g)}return d};
|
|
1262
|
+
function cC(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=dC(c))a.color=c;if(c=b.BackColour)if(c=dC(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Wb;a.textAlign="start";break;case 2:a.displayAlign=Wb;a.textAlign=Qb;break;case 3:a.displayAlign=Wb;a.textAlign="end";
|
|
1263
1263
|
break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Qb;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=Qb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
|
|
1264
|
-
function
|
|
1265
|
-
var
|
|
1266
|
-
function
|
|
1267
|
-
function
|
|
1268
|
-
2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function
|
|
1269
|
-
r.transmux=function(a,b,c,d){for(var e=Ab(a),f=
|
|
1270
|
-
duration:1024,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.Ea,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Qa:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Oa:f},stream:b};a=new
|
|
1271
|
-
|
|
1264
|
+
function dC(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function bC(a){a=eC.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}P("shaka.text.SsaTextParser",YB);YB.prototype.parseMedia=YB.prototype.parseMedia;YB.prototype.setManifestType=YB.prototype.setManifestType;YB.prototype.setSequenceMode=YB.prototype.setSequenceMode;YB.prototype.parseInit=YB.prototype.parseInit;
|
|
1265
|
+
var ZB=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,$B=/^\s*([^:]+):\s*(.*)/,aC=/\s*,\s*/,eC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;fe["text/x-ssa"]=function(){return new YB};function fC(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{Qd:c,V:a}:null}function gC(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,Ea:"mp4a.40."+e}}
|
|
1266
|
+
function hC(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
|
|
1267
|
+
function iC(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
|
|
1268
|
+
2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function jC(a){this.i=a;this.h=0;this.g=new Map}r=jC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?kb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Yd(b)||"mp4a.40.2")+'"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1269
|
+
r.transmux=function(a,b,c,d){for(var e=Ab(a),f=Mi(e),g=f.length;g<e.length&&!hC(e,g);g++);a=1E3*c.endTime;f=Li(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);c=gC(e,g);if(!c)return Promise.reject(new R(2,3,3018));b.audioSamplingRate=c.sampleRate;b.channelsCount=c.channelCount;for(f=[];g<e.length;){var h=fC(e,g);if(!h)return Promise.reject(new R(2,3,3018));var k=h.Qd+h.V;g+k<=e.length&&f.push({data:e.subarray(g+h.Qd,g+k),size:h.V,
|
|
1270
|
+
duration:1024,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.Ea,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Qa:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Oa:f},stream:b};a=new vw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Bw(a),this.g.set(b.id,d));b=Sw(a);this.h++;b=Ad(d,b);return Promise.resolve(b)};P("shaka.transmuxer.AacTransmuxer",jC);
|
|
1271
|
+
jC.prototype.transmux=jC.prototype.transmux;jC.prototype.getOriginalMimeType=jC.prototype.getOriginalMimeType;jC.prototype.convertCodecs=jC.prototype.convertCodecs;jC.prototype.isSupported=jC.prototype.isSupported;jC.prototype.destroy=jC.prototype.destroy;jc("audio/aac",function(){return new jC("audio/aac")},pc);function kC(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
|
|
1272
1272
|
1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,ga:a,V:e}}
|
|
1273
|
-
function
|
|
1274
|
-
r.transmux=function(a,b,c,d){a=Ab(a);for(var e=
|
|
1275
|
-
Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}});f+=k.V}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Qa:[],ga:e,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Oa:h},stream:b};a=new
|
|
1276
|
-
|
|
1277
|
-
r.transmux=function(a,b,c,d){a=Ab(a);for(var e=
|
|
1278
|
-
Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}});f+=k.V}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Qa:[],ga:e,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Oa:h},stream:b};a=new
|
|
1279
|
-
|
|
1280
|
-
(k=U(c),l=U(c),m=U(c),n=U(c));e=d=1;if(W(c)&&W(c)){var q=
|
|
1273
|
+
function lC(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function mC(a){this.i=a;this.h=0;this.g=new Map}r=mC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?kb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1274
|
+
r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Mi(a),f=e.length;f<a.length&&!lC(a,f);f++);var g=1E3*c.endTime;e=Li(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=kC(a,f);if(!k)return Promise.reject(new R(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ga;h.push({data:a.subarray(f,f+k.V),size:k.V,duration:1536,Va:0,flags:{Xa:0,
|
|
1275
|
+
Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}});f+=k.V}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Qa:[],ga:e,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Oa:h},stream:b};a=new vw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Bw(a),this.g.set(b.id,d));b=Sw(a);this.h++;b=Ad(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ac3Transmuxer",mC);mC.prototype.transmux=mC.prototype.transmux;
|
|
1276
|
+
mC.prototype.getOriginalMimeType=mC.prototype.getOriginalMimeType;mC.prototype.convertCodecs=mC.prototype.convertCodecs;mC.prototype.isSupported=mC.prototype.isSupported;mC.prototype.destroy=mC.prototype.destroy;jc("audio/ac3",function(){return new mC("audio/ac3")},pc);function nC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Vi(a.subarray(b+2));Xi(c,2);Xi(c,3);var d=Yi(c,11)+1<<1,e=Yi(c,2);if(3==e){e=Yi(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Yi(c,2);var g=Yi(c,3),h=Yi(c,1);c=Yi(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,ga:a,V:d}};function oC(a){this.i=a;this.h=0;this.g=new Map}r=oC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?kb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1277
|
+
r.transmux=function(a,b,c,d){a=Ab(a);for(var e=Mi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Li(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=nC(a,f);if(!k)return Promise.reject(new R(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ga;h.push({data:a.subarray(f,f+k.V),size:k.V,duration:1536,
|
|
1278
|
+
Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}});f+=k.V}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Qa:[],ga:e,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:a,Oa:h},stream:b};a=new vw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Bw(a),this.g.set(b.id,d));b=Sw(a);this.h++;b=Ad(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Ec3Transmuxer",oC);oC.prototype.transmux=oC.prototype.transmux;
|
|
1279
|
+
oC.prototype.getOriginalMimeType=oC.prototype.getOriginalMimeType;oC.prototype.convertCodecs=oC.prototype.convertCodecs;oC.prototype.isSupported=oC.prototype.isSupported;oC.prototype.destroy=oC.prototype.destroy;jc("audio/ec3",function(){return new oC("audio/ec3")},pc);function pC(a){if(!a.length)return null;var b=a.find(function(w){return 7==w.type});a=a.find(function(w){return 8==w.type});if(!b||!a)return null;var c=new Vi(b.data),d=bj(c);bj(c);bj(c);$i(c);if(qC.includes(d)&&(d=U(c),3===d&&Xi(c,1),$i(c),$i(c),Xi(c,1),W(c))){d=3!==d?8:12;for(var e=0;e<d;e++)W(c)&&(6>e?cj(c,16):cj(c,64))}$i(c);d=U(c);if(0===d)U(c);else if(1===d)for(Xi(c,1),$i(c),$i(c),d=U(c),e=0;e<d;e++)$i(c);$i(c);Xi(c,1);var f=U(c),g=U(c),h=Yi(c,1);0===h&&Xi(c,1);Xi(c,1);var k=0,l=0,m=0,n=0;W(c)&&
|
|
1280
|
+
(k=U(c),l=U(c),m=U(c),n=U(c));e=d=1;if(W(c)&&W(c)){var q=bj(c),p=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],t=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<q&&16>=q?(d=p[q-1],e=t[q-1]):255===q&&(d=Yi(c,16),e=Yi(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,y(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,y(a));a=new Uint8Array([1,k[3],k[4],k[5],255,
|
|
1281
1281
|
225].concat(k,[1],b));return{height:c,width:f,oa:a,xa:d,ya:e}}
|
|
1282
|
-
function
|
|
1283
|
-
{data:Ad.apply(sd,y(c)),jd:b}:null}var
|
|
1284
|
-
oa:b,xa:a.ri,ya:a.pi}}function
|
|
1285
|
-
function
|
|
1286
|
-
U(a);U(a);U(a);U(a);U(a);U(a);U(a);if(W(a)&&W(a))for(H=0;4>H;H++)for(var K=0;K<(3===H?2:6);K++)if(W(a)){var M=Math.min(64,1<<4+(H<<1));1<H
|
|
1287
|
-
1)}H=E=1;K=0;W(a);W(a);if(W(a)){W(a)&&(M=
|
|
1282
|
+
function rC(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=u(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=dj(new Vi(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(h),c.push(f.fullData))}return c.length?
|
|
1283
|
+
{data:Ad.apply(sd,y(c)),jd:b}:null}var qC=[100,110,122,244,44,83,86,118,128,138,139,134];function sC(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=tC(b.fullData);a=uC(c.fullData);var f=vC(d.fullData);b=wC(b.fullData,c.fullData,d.fullData,{jf:e.jf,If:e.If,Re:a.Re,Se:a.Se,Le:a.Le,Qe:a.Qe,Me:a.Me,Ne:a.Ne,Oe:a.Oe,Pe:a.Pe,Fe:a.Fe,Ge:a.Ge,He:a.He,Ie:a.Ie,Je:a.Je,Ke:a.Ke,Ce:a.Ce,be:a.be,Be:a.Be,Ae:a.Ae,ze:a.ze,pf:f.pf});return{height:a.height,width:a.width,
|
|
1284
|
+
oa:b,xa:a.ri,ya:a.pi}}function tC(a){var b=new Vi(a,!0);bj(b);bj(b);Yi(b,4);Yi(b,2);Yi(b,6);a=Yi(b,3);b=W(b);return{jf:a+1,If:b}}
|
|
1285
|
+
function uC(a){a=new Vi(a,!0);bj(a);bj(a);var b=0,c=0,d=0,e=0;Yi(a,4);var f=Yi(a,3);W(a);for(var g=Yi(a,2),h=Yi(a,1),k=Yi(a,5),l=bj(a),m=bj(a),n=bj(a),q=bj(a),p=bj(a),t=bj(a),w=bj(a),x=bj(a),z=bj(a),v=bj(a),B=bj(a),A=[],D=[],G=0;G<f;G++)A.push(W(a)),D.push(W(a));if(0<f)for(G=f;8>G;G++)Yi(a,2);for(G=0;G<f;G++)A[G]&&Yi(a,88),D[G]&&bj(a);U(a);A=U(a);3==A&&Yi(a,1);D=U(a);G=U(a);W(a)&&(b+=U(a),c+=U(a),d+=U(a),e+=U(a));var J=U(a),I=U(a),E=U(a);if(W(a))for(var H=0;H<=f;H++)U(a),U(a),U(a);else U(a),U(a),
|
|
1286
|
+
U(a);U(a);U(a);U(a);U(a);U(a);U(a);if(W(a)&&W(a))for(H=0;4>H;H++)for(var K=0;K<(3===H?2:6);K++)if(W(a)){var M=Math.min(64,1<<4+(H<<1));1<H&&aj(a);for(var N=0;N<M;N++)aj(a)}else U(a);W(a);W(a);W(a)&&(bj(a),U(a),U(a),W(a));H=U(a);for(M=K=0;M<H;M++)if(N=!1,0!==M&&(N=W(a)),N){M===H&&U(a);W(a);U(a);for(var O=N=0;O<=K;O++){var S=W(a),V=!1;S||(V=W(a));(S||V)&&N++}K=N}else{O=U(a);N=U(a);K=O+N;for(S=0;S<O;S++)U(a),W(a);for(O=0;O<N;O++)U(a),W(a)}if(W(a))for(H=U(a),K=0;K<H;K++){for(M=0;M<E+4;M++)Yi(a,1);Yi(a,
|
|
1287
|
+
1)}H=E=1;K=0;W(a);W(a);if(W(a)){W(a)&&(M=bj(a),N=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],O=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<M&&16>=M?(E=N[M-1],H=O[M-1]):255===M&&(E=Yi(a,16),H=Yi(a,16)));W(a)&&W(a);W(a)&&(Yi(a,3),W(a),W(a)&&(bj(a),bj(a),bj(a)));W(a)&&(U(a),U(a));W(a);W(a);W(a);if(M=W(a))U(a),U(a),U(a),U(a);if(W(a)&&(Yi(a,32),Yi(a,32),W(a)&&U(a),W(a))){O=!1;M=W(a);N=W(a);if(M||N){if(O=W(a))bj(a),Yi(a,5),W(a),Yi(a,5);Yi(a,4);Yi(a,4);O&&Yi(a,4);Yi(a,5);Yi(a,5);Yi(a,5)}for(S=0;S<=
|
|
1288
1288
|
f;S++){var Q=!0;V=1;W(a)||(Q=W(a));var wa=!1;Q?U(a):wa=W(a);wa||(V=U(a)+1);if(M){for(Q=0;Q<V;Q++)U(a),U(a),O&&(U(a),U(a));W(a)}if(N){for(Q=0;Q<V;Q++)U(a),U(a),O&&(U(a),U(a));W(a)}}}W(a)&&(W(a),W(a),W(a),K=U(a),U(a),U(a),U(a),U(a))}return{Le:B,Re:g,Se:h,Qe:k,Me:l,Ne:m,Oe:n,Pe:q,Fe:p,Ge:t,He:w,Ie:x,Je:z,Ke:v,be:K,Ce:0,Be:A,Ae:J,ze:I,width:D-(b+c)*(1===A||2===A?2:1),height:G-(d+e)*(1===A?2:1),ri:E,pi:H}}
|
|
1289
|
-
function
|
|
1290
|
-
function
|
|
1291
|
-
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function
|
|
1292
|
-
function
|
|
1293
|
-
var
|
|
1294
|
-
r.transmux=function(a,b,c,d){c=Ab(a);for(var e=
|
|
1295
|
-
ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:c,Oa:a},stream:b};f=new
|
|
1296
|
-
|
|
1297
|
-
r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new
|
|
1298
|
-
|
|
1289
|
+
function vC(a){var b=new Vi(a,!0);bj(b);bj(b);U(b);U(b);W(b);W(b);Yi(b,3);W(b);W(b);U(b);U(b);aj(b);W(b);W(b);W(b)&&U(b);aj(b);aj(b);W(b);W(b);W(b);W(b);a=W(b);b=W(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{pf:c}}
|
|
1290
|
+
function wC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Re&3)<<6|(d.Se?1:0)<<5|d.Qe&31;e[2]=d.Me;e[3]=d.Ne;e[4]=d.Oe;e[5]=d.Pe;e[6]=d.Fe;e[7]=d.Ge;e[8]=d.He;e[9]=d.Ie;e[10]=d.Je;e[11]=d.Ke;e[12]=d.Le;e[13]=240|(d.be&3840)>>8;e[14]=d.be&255;e[15]=252|d.pf&3;e[16]=252|d.Be&3;e[17]=248|d.Ae&7;e[18]=248|d.ze&7;e[19]=0;e[20]=0;e[21]=(d.Ce&3)<<6|(d.jf&7)<<3|(d.If?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
|
|
1291
|
+
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function xC(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*yC[14*(3===c?3-d:3===d?3:4)+e-1];f=zC[3*(3===c?0:2===c?1:2)+f];c=AC[c][d];var h=BC[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,V:k,oi:8*c*h}}return null}
|
|
1292
|
+
function CC(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function DC(a,b){if(b+1<a.length&&CC(a,b)){var c=xC(a,b),d=4;c&&c.V&&(d=c.V);b+=d;return b===a.length||b+1<a.length&&CC(a,b)}return!1}
|
|
1293
|
+
var yC=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],zC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],AC=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BC=[0,1,1,4];function EC(a){this.i=a;this.h=0;this.g=new Map}r=EC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?kb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};r.getOriginalMimeType=function(){return this.i};
|
|
1294
|
+
r.transmux=function(a,b,c,d){c=Ab(a);for(var e=Mi(c).length;e<c.length&&!DC(c,e);e++);var f;for(a=[];e<c.length;){var g=xC(c,e);if(!g)return Promise.reject(new R(2,3,3018));f||(f=g);e+g.V<=c.length&&a.push({data:c.subarray(e,e+g.V),size:g.V,duration:1152,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}});e+=g.V}if(!f)return Promise.reject(new R(2,3,3018));c=9E4*f.oi/f.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:f.sampleRate,duration:d,Qa:[],
|
|
1295
|
+
ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.h,baseMediaDecodeTime:c,Oa:a},stream:b};f=new vw([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Bw(f),this.g.set(b.id,d));b=Sw(f);this.h++;b=Ad(d,b);return Promise.resolve(b)};P("shaka.transmuxer.Mp3Transmuxer",EC);EC.prototype.transmux=EC.prototype.transmux;EC.prototype.getOriginalMimeType=EC.prototype.getOriginalMimeType;EC.prototype.convertCodecs=EC.prototype.convertCodecs;EC.prototype.isSupported=EC.prototype.isSupported;
|
|
1296
|
+
EC.prototype.destroy=EC.prototype.destroy;jc("audio/mpeg",function(){return new EC("audio/mpeg")},pc);function FC(a){this.h=a;this.g=null}r=FC.prototype;r.destroy=function(){};r.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Yd(a).split(","),c=Hd("audio",b);b=Hd("video",b);return!c||b||"mp3"!=Ud(c)?!1:kb(this.convertCodecs("audio",a))};r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};r.getOriginalMimeType=function(){return this.h};
|
|
1297
|
+
r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new ej;a=Ab(a);a=this.g.parse(a);if("mp3"!=a.bd().audio||"audio"!=e)return Promise.reject(new R(2,3,3018));e=new Uint8Array([]);a=u(a.Gb());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=xC(b,c))?(c+d.V<=b.length&&(e=Ad(e,b.subarray(c,c+d.V))),c+=d.V):c++;return Promise.resolve(e)};P("shaka.transmuxer.MpegTsTransmuxer",FC);FC.prototype.transmux=FC.prototype.transmux;FC.prototype.getOriginalMimeType=FC.prototype.getOriginalMimeType;
|
|
1298
|
+
FC.prototype.convertCodecs=FC.prototype.convertCodecs;FC.prototype.isSupported=FC.prototype.isSupported;FC.prototype.destroy=FC.prototype.destroy;jc("video/mp2t",function(){return new FC("video/mp2t")},oc);/*
|
|
1299
1299
|
@license
|
|
1300
1300
|
MSS Transmuxer
|
|
1301
1301
|
Copyright 2015 Dash Industry Forum
|
|
1302
1302
|
SPDX-License-Identifier: BSD-3-Clause
|
|
1303
1303
|
*/
|
|
1304
|
-
function
|
|
1305
|
-
function
|
|
1304
|
+
function GC(a){this.h=a;(this.g=yu.get("ISOBoxer")())&&HC(this)}
|
|
1305
|
+
function HC(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
|
|
1306
1306
|
"uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
|
|
1307
|
-
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==
|
|
1307
|
+
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==IC[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}r=GC.prototype;r.destroy=function(){};
|
|
1308
1308
|
r.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return kb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return kb(b)||kb(a)};r.convertCodecs=function(a,b){return b.replace("mss/","")};r.getOriginalMimeType=function(){return this.h};
|
|
1309
1309
|
r.transmux=function(a,b,c){if(!c)return Promise.resolve(Ab(a));if(!b.mssPrivateData)return Promise.reject(new R(2,3,3020));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),
|
|
1310
1310
|
1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var q=e.fetch("saio");if(null===q){q=this.g.createFullBox("saio",h);q.version=0;q.flags=0;q.entry_count=1;q.offset=[0];var p=this.g.createFullBox("saiz",h);p.version=0;p.flags=0;p.sample_count=n.sample_count;p.default_sample_info_size=0;p.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)p.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else p.default_sample_info_size=8}}f.flags&=16777214;f.flags|=131072;k.flags|=
|
|
1311
|
-
1;var t=e.fetch("moof");k.data_offset=t.getLength()+8;var w=e.fetch("saio");null!==w&&(w.offset[0]=
|
|
1312
|
-
|
|
1313
|
-
r.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Yd(c).split(",");c=Hd("audio",d);d=Hd("video",d);if(c&&(c=Ud(c),!
|
|
1311
|
+
1;var t=e.fetch("moof");k.data_offset=t.getLength()+8;var w=e.fetch("saio");null!==w&&(w.offset[0]=JC(t,"traf")+JC(h,"senc")+16);var x=Ab(e.write());return Promise.resolve(x)}catch(z){return z instanceof R?Promise.reject(z):Promise.reject(new R(2,3,3022))}};function JC(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}P("shaka.transmuxer.MssTransmuxer",GC);GC.prototype.transmux=GC.prototype.transmux;GC.prototype.getOriginalMimeType=GC.prototype.getOriginalMimeType;
|
|
1312
|
+
GC.prototype.convertCodecs=GC.prototype.convertCodecs;GC.prototype.isSupported=GC.prototype.isSupported;GC.prototype.destroy=GC.prototype.destroy;var IC=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);jc("mss/audio/mp4",function(){return new GC("mss/audio/mp4")},pc);jc("mss/video/mp4",function(){return new GC("mss/video/mp4")},pc);function KC(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}r=KC.prototype;r.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
|
|
1313
|
+
r.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Yd(c).split(",");c=Hd("audio",d);d=Hd("video",d);if(c&&(c=Ud(c),!LC.includes(c))||d&&(c=Ud(d),!MC.includes(c)))return!1;if(b)return kb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return kb(b)||kb(a)};
|
|
1314
1314
|
r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Yd(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return Pe(c,"audio/mp4")}).map(Oe).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};r.getOriginalMimeType=function(){return this.l};
|
|
1315
|
-
r.transmux=function(a,b,c,d,e){var f=Ab(a);if("audio"==e&&!
|
|
1316
|
-
3023);for(var x=0;x<w.length;x++){var z=w[x],v=z.nalus;t.push.apply(t,y(v));var B=
|
|
1315
|
+
r.transmux=function(a,b,c,d,e){var f=Ab(a);if("audio"==e&&!rj(f)){for(var g=Mi(f),h=g.length;h<f.length;h++)if(DC(f,h))return Promise.reject(new R(2,3,3018));for(h=g.length;h<f.length;h++)if(hC(f,h))return this.h||(this.h=new jC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new R(2,3,3018))}this.j?this.j.clearData():this.j=new ej;var k=this.j.parse(f),l=[],m=k.bd();try{var n=null;if("video"==e){switch(m.video){case "avc":var q=[],p=null,t=[],w=k.uc();if(!w.length)throw new R(2,3,
|
|
1316
|
+
3023);for(var x=0;x<w.length;x++){var z=w[x],v=z.nalus;t.push.apply(t,y(v));var B=rC(v);if(B){null==p&&(p=z.dts);var A=void 0;A=x+1<w.length?(w[x+1].dts||0)-(z.dts||0):1<w.length?(z.dts||0)-(w[x-1].dts||0):9E4*(c.endTime-c.startTime);q.push({data:B.data,size:B.data.byteLength,duration:A,Va:Math.round((z.pts||0)-(z.dts||0)),flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:B.jd?2:1,Ya:B.jd?0:1}})}}var D=pC(t);if(!D||null==p)throw new R(2,3,3018);b.height=D.height;b.width=D.width;n={id:b.id,type:"video",codecs:"avc1",
|
|
1317
1317
|
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Qa:[],ga:new Uint8Array([]),oa:D.oa,xa:D.xa,ya:D.ya,data:{jb:this.g,baseMediaDecodeTime:p,Oa:q},stream:b};break;case "hvc":var G=[],J=null,I=[],E=k.uc();if(!E.length)throw new R(2,3,3023);for(var H=0;H<E.length;H++){var K=E[H],M=K.nalus;I.push.apply(I,y(M));for(var N=!1,O=[],S=!1,V=u(M),Q=V.next();!Q.done;Q=V.next()){var wa=Q.value;switch(wa.type){case 1:case 0:var Da=S=!0;break;case 19:case 20:case 21:N=Da=S=!0;break;case 32:Da=
|
|
1318
|
-
!0;break;case 33:Da=!0;break;case 34:Da=!0;break;case 35:S=Da=!0;break;case 39:case 40:Da=!0;break;default:Da=!1}if(S&&Da){var
|
|
1319
|
-
size:
|
|
1320
|
-
[],
|
|
1321
|
-
3,3018)
|
|
1322
|
-
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:
|
|
1323
|
-
ef.push({data:
|
|
1324
|
-
|
|
1325
|
-
duration:d,Qa:[],ga:
|
|
1326
|
-
3,3018);var
|
|
1327
|
-
break;case 5:vb=[1,3,2,0,4,1,2,3];break;case 6:vb=[1,4,2,0,4,1,2,3,5];break;case 7:vb=[1,4,2,0,4,1,2,3,5,6];break;case 8:vb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:vb=[1,1,2,0,1];break;case 131:vb=[1,1,3,0,1,2];break;case 132:vb=[1,1,4,0,1,2,3];break;case 133:vb=[1,1,5,0,1,2,3,4];break;case 134:vb=[1,1,6,0,1,2,3,4,5];break;case 135:vb=[1,1,7,0,1,2,3,4,5,6];break;case 136:vb=[1,1,8,0,1,2,3,4,5,6,7]}var
|
|
1328
|
-
8&255,Kc.sampleRate>>>0&255,0,0].concat(y(vb)));for(var
|
|
1329
|
-
3,3018);b.audioSamplingRate=Kc.sampleRate;b.channelsCount=Kc.channelCount;var
|
|
1330
|
-
this.i.get(b.id);else
|
|
1331
|
-
jc("video/mp2t",function(){return new
|
|
1318
|
+
!0;break;case 33:Da=!0;break;case 34:Da=!0;break;case 35:S=Da=!0;break;case 39:case 40:Da=!0;break;default:Da=!1}if(S&&Da){var eb=wa.fullData.byteLength,Ga=new Uint8Array(4);Ga[0]=eb>>24&255;Ga[1]=eb>>16&255;Ga[2]=eb>>8&255;Ga[3]=eb&255;O.push(Ga);O.push(wa.fullData)}}var Wa=O.length?{data:Ad.apply(sd,y(O)),jd:N}:null;if(Wa){null==J&&null!=K.dts&&(J=K.dts);var ua=void 0;ua=H+1<E.length?(E[H+1].dts||0)-(K.dts||0):1<E.length?(K.dts||0)-(E[H-1].dts||0):9E4*(c.endTime-c.startTime);G.push({data:Wa.data,
|
|
1319
|
+
size:Wa.data.byteLength,duration:ua,Va:Math.round((K.pts||0)-(K.dts||0)),flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:Wa.jd?2:1,Ya:Wa.jd?0:1}})}}var mb=sC(I);if(!mb||null==J)throw new R(2,3,3018);b.height=mb.height;b.width=mb.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Qa:[],ga:new Uint8Array([]),oa:mb.oa,xa:mb.xa,ya:mb.ya,data:{jb:this.g,baseMediaDecodeTime:J,Oa:G},stream:b}}n&&(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var zb=
|
|
1320
|
+
[],ib,$a=null,cf=u(k.Gb()),xd=cf.next();!xd.done;xd=cf.next()){var Zd=xd.value,kd=Zd.data;if(kd){var Bc=0;ib=gC(kd,Bc);if(!ib)throw new R(2,3,3018);b.audioSamplingRate=ib.sampleRate;b.channelsCount=ib.channelCount;null==$a&&null!==Zd.pts&&($a=Zd.pts);for(;Bc<kd.length;){var $d=fC(kd,Bc);if($d){var df=$d.Qd+$d.V;Bc+df<=kd.length&&zb.push({data:kd.subarray(Bc+$d.Qd,Bc+df),size:$d.V,duration:1024,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}});Bc+=df}else Bc++}}}if(!ib||null==$a){if(!k.uc().length)throw new R(2,
|
|
1321
|
+
3,3018);$a=9E4*c.startTime;var ae=Hd("audio",b.codecs.split(","));if(!ae||!b.channelsCount||!b.audioSamplingRate)throw new R(2,3,3018);ib={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,Ea:ae};var yd=iC(ae,b.channelsCount);if(!yd)throw new R(2,3,3018);for(var vi=$a+9E4*(c.endTime-c.startTime),vg=$a;vg<vi;)zb.push({data:yd,size:yd.byteLength,duration:1024,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}}),vg+=1024/ib.sampleRate*9E4}var wi=ib.sampleRate,xi=$a/9E4*wi;n={id:b.id,type:"audio",codecs:ib.Ea,
|
|
1322
|
+
encrypted:b.encrypted&&0<b.drmInfos.length,timescale:wi,duration:d,Qa:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:xi,Oa:zb},stream:b};break;case "ac3":for(var ef=[],be=0,ff=new Uint8Array([]),Sb=null,cu=u(k.Gb()),Am=cu.next();!Am.done;Am=cu.next()){var Bm=Am.value,Cm=Bm.data;null==Sb&&null!==Bm.pts&&(Sb=Bm.pts);for(var pf=0;pf<Cm.length;){var Dd=kC(Cm,pf);Dd?(b.audioSamplingRate=Dd.sampleRate,b.channelsCount=Dd.channelCount,be=Dd.sampleRate,ff=Dd.ga,
|
|
1323
|
+
ef.push({data:Cm.subarray(pf,pf+Dd.V),size:Dd.V,duration:1536,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}}),pf+=Dd.V):pf++}}if(0==be||0==ff.byteLength||null==Sb)throw new R(2,3,3018);var aD=Sb/9E4*be;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:be,duration:d,Qa:[],ga:ff,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:aD,Oa:ef},stream:b};break;case "ec3":for(var du=[],fj=0,Dm=new Uint8Array([]),gj=null,eu=u(k.Gb()),Em=eu.next();!Em.done;Em=
|
|
1324
|
+
eu.next()){var Fm=Em.value,Gm=Fm.data;null==gj&&null!==Fm.pts&&(gj=Fm.pts);for(var qf=0;qf<Gm.length;){var Ed=nC(Gm,qf);Ed?(b.audioSamplingRate=Ed.sampleRate,b.channelsCount=Ed.channelCount,fj=Ed.sampleRate,Dm=Ed.ga,du.push({data:Gm.subarray(qf,qf+Ed.V),size:Ed.V,duration:1536,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}}),qf+=Ed.V):qf++}}if(0==fj||0==Dm.byteLength||null==gj)throw new R(2,3,3018);var bD=gj/9E4*fj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:fj,
|
|
1325
|
+
duration:d,Qa:[],ga:Dm,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:bD,Oa:du},stream:b};break;case "mp3":for(var fu=[],hj,ij=null,gu=u(k.Gb()),Hm=gu.next();!Hm.done;Hm=gu.next()){var Im=Hm.value,Jg=Im.data;if(Jg){null==ij&&null!==Im.pts&&(ij=Im.pts);for(var ge=0;ge<Jg.length;){var rf=xC(Jg,ge);rf?(hj||(hj=rf),ge+rf.V<=Jg.length&&fu.push({data:Jg.subarray(ge,ge+rf.V),size:rf.V,duration:1152,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}}),ge+=rf.V):ge++}}}if(!hj||null==ij)throw new R(2,
|
|
1326
|
+
3,3018);var hu=hj.sampleRate,cD=ij/9E4*hu;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:hu,duration:d,Qa:[],ga:new Uint8Array([]),oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:cD,Oa:fu},stream:b};break;case "opus":var iu=[],jj=null,Kc=k.F;if(!Kc)throw new R(2,3,3018);var vb=[];switch(Kc.ah){case 1:case 2:vb=[0];break;case 0:vb=[255,1,1,0,1];break;case 128:vb=[255,2,0,0,1];break;case 3:vb=[1,2,1,0,2,1];break;case 4:vb=[1,2,2,0,1,2,3];
|
|
1327
|
+
break;case 5:vb=[1,3,2,0,4,1,2,3];break;case 6:vb=[1,4,2,0,4,1,2,3,5];break;case 7:vb=[1,4,2,0,4,1,2,3,5,6];break;case 8:vb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:vb=[1,1,2,0,1];break;case 131:vb=[1,1,3,0,1,2];break;case 132:vb=[1,1,4,0,1,2,3];break;case 133:vb=[1,1,5,0,1,2,3,4];break;case 134:vb=[1,1,6,0,1,2,3,4,5];break;case 135:vb=[1,1,7,0,1,2,3,4,5,6];break;case 136:vb=[1,1,8,0,1,2,3,4,5,6,7]}var ju=new Uint8Array([0,Kc.channelCount,0,0,Kc.sampleRate>>>24&255,Kc.sampleRate>>>17&255,Kc.sampleRate>>>
|
|
1328
|
+
8&255,Kc.sampleRate>>>0&255,0,0].concat(y(vb)));for(var ku=Kc.sampleRate,lu=u(k.Gb()),Jm=lu.next();!Jm.done;Jm=lu.next()){var Km=Jm.value,sf=Km.data;null==jj&&null!==Km.pts&&(jj=Km.pts);for(var Kg=0;Kg<sf.length;){for(var dD=0!==(sf[Kg+1]&16),eD=0!==(sf[Kg+1]&8),ld=Kg+2,kj=0;255===sf[ld];)kj+=255,ld+=1;kj+=sf[ld];ld+=1;ld+=dD?2:0;ld+=eD?2:0;var mu=sf.slice(ld,ld+kj);iu.push({data:mu,size:mu.byteLength,duration:960,Va:0,flags:{Xa:0,Ka:0,Ja:0,Ga:0,Ha:2,Ya:0}});Kg=ld+kj}}if(0==ju.byteLength||null==jj)throw new R(2,
|
|
1329
|
+
3,3018);b.audioSamplingRate=Kc.sampleRate;b.channelsCount=Kc.channelCount;var fD=jj/9E4*ku;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ku,duration:d,Qa:[],ga:ju,oa:new Uint8Array([]),xa:0,ya:0,data:{jb:this.g,baseMediaDecodeTime:fD,Oa:iu},stream:b}}n&&(l.push(n),n=null)}}catch(Lm){return Lm&&3023==Lm.code?Promise.resolve(new Uint8Array([])):Promise.reject(Lm)}if(!l.length)return Promise.reject(new R(2,3,3018));var nu=new vw(l);if(this.i.has(b.id))var Mm=
|
|
1330
|
+
this.i.get(b.id);else Mm=Bw(nu),this.i.set(b.id,Mm);var gD=Sw(nu);this.g++;var hD=Ad(Mm,gD);return Promise.resolve(hD)};P("shaka.transmuxer.TsTransmuxer",KC);KC.prototype.transmux=KC.prototype.transmux;KC.prototype.getOriginalMimeType=KC.prototype.getOriginalMimeType;KC.prototype.convertCodecs=KC.prototype.convertCodecs;KC.prototype.isSupported=KC.prototype.isSupported;KC.prototype.destroy=KC.prototype.destroy;var LC=["aac","ac-3","ec-3","mp3","opus"],MC=["avc","hevc"];
|
|
1331
|
+
jc("video/mp2t",function(){return new KC("video/mp2t")},nc);/*
|
|
1332
1332
|
@license
|
|
1333
1333
|
EME Encryption Scheme Polyfill
|
|
1334
1334
|
Copyright 2019 Google LLC
|
|
1335
1335
|
SPDX-License-Identifier: Apache-2.0
|
|
1336
1336
|
*/
|
|
1337
|
-
function
|
|
1338
|
-
function
|
|
1337
|
+
function NC(){}var OC;function PC(){OC?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(OC=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=QC):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
|
|
1338
|
+
function QC(a,b){var c=this,d;return L(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),C(e,OC.call(c,a,b),2);d=e.h;if(RC(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=OC,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=SC;return e.return(SC.call(c,
|
|
1339
1339
|
a,b))})}
|
|
1340
|
-
function
|
|
1341
|
-
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return C(p,
|
|
1342
|
-
function
|
|
1343
|
-
function
|
|
1344
|
-
navigator.mediaCapabilities.decodingInfo
|
|
1345
|
-
function
|
|
1346
|
-
new
|
|
1347
|
-
function
|
|
1348
|
-
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}P("McEncryptionSchemePolyfill",
|
|
1349
|
-
|
|
1350
|
-
function
|
|
1351
|
-
function
|
|
1340
|
+
function SC(a,b){var c=this,d,e,f,g,h,k,l,m,n,q;return L(function(p){if(1==p.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=TC(a);e=[];f=u(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=UC(h.videoCapabilities,d),l=UC(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
|
|
1341
|
+
n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return C(p,OC.call(c,a,e),2)}q=p.h;return p.return(new VC(q,d))})}function UC(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}P("EmeEncryptionSchemePolyfill",NC);NC.install=PC;function WC(){}var XC;
|
|
1342
|
+
function YC(){XC?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(XC=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=ZC):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
|
|
1343
|
+
function ZC(a){var b=this,c,d,e;return L(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),C(f,XC.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&RC(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=XC,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
|
|
1344
|
+
navigator.mediaCapabilities.decodingInfo=$C;if(d){f.u(3);break}e=c;return C(f,iD(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return($C.call(b,a))}})}
|
|
1345
|
+
function $C(a){var b=this,c,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=TC(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):C(m,XC.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
|
|
1346
|
+
new VC(k.keySystemAccess,c);m.u(3);break}if(!a.keySystemConfiguration){m.u(3);break}l=k;return C(m,iD(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
|
|
1347
|
+
function iD(a){var b,c;return L(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return C(d,
|
|
1348
|
+
navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}P("McEncryptionSchemePolyfill",WC);WC.install=YC;function VC(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
|
|
1349
|
+
VC.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=u(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=u(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};VC.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
|
|
1350
|
+
function TC(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function RC(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
|
|
1351
|
+
function jD(){}function qz(){PC();YC()}P("EncryptionSchemePolyfills",jD);jD.install=qz;"undefined"!==typeof module&&module.exports&&(module.exports=jD);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
|
|
1352
1352
|
|
|
1353
1353
|
//# sourceMappingURL=shaka-player.compiled.map
|