shaka-player 4.8.14 → 4.8.16
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 +49 -39
- package/dist/shaka-player.compiled.debug.js +9 -8
- package/dist/shaka-player.compiled.debug.map +2 -2
- package/dist/shaka-player.compiled.js +77 -77
- package/dist/shaka-player.compiled.map +1 -1
- package/dist/shaka-player.ui.debug.js +20 -18
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +96 -96
- package/dist/shaka-player.ui.map +1 -1
- package/lib/media/playhead.js +16 -9
- package/lib/net/http_fetch_plugin.js +2 -1
- package/lib/player.js +1 -1
- package/lib/text/mp4_ttml_parser.js +13 -0
- package/lib/text/ttml_text_parser.js +2 -2
- 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}
|
|
@@ -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=
|
|
@@ -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,[])}
|
|
@@ -344,9 +344,9 @@ function pj(a){var b={height:null,width:null,Ea:null};a=a.Od();if(!a.length)retu
|
|
|
344
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
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&&
|
|
348
|
-
a=!1):(this.h.SupportObject.SupportStatus||
|
|
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
|
|
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
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
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
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()};
|
|
@@ -384,12 +384,12 @@ r.Hb=function(){return this.R()||this.ac()?Math.min(Math.max(0,(Date.now()+this.
|
|
|
384
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
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
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
|
|
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
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
|
|
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
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.
|
|
392
|
-
r.Of=function(){return 0};r.rg=function(){};
|
|
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.h=a;this.j=!1;this.g=null;this.i=new db}r=zk.prototype;r.we=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.na(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;qk(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};r.xe=function(a){this.g=this.j?this.g:a};
|
|
392
|
+
r.Dd=function(){return(this.j?this.h.currentTime:this.g)||0};r.Pf=function(){return 0};r.Of=function(){return 0};r.rg=function(){};
|
|
393
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
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
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}
|
|
@@ -456,7 +456,7 @@ function tl(a,b,c){var d=b.type;if(d!=Jd||a.i.has(d))b.ub=(new Lc(function(){var
|
|
|
456
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
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
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&&
|
|
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
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
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
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)};
|
|
@@ -487,7 +487,7 @@ function rm(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:tm(a,"drm-e
|
|
|
487
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
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
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
|
|
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
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
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():"")}})}
|
|
@@ -499,7 +499,7 @@ r.append=function(a){var b=Rm(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];v
|
|
|
499
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
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
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
|
|
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
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
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
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!=
|
|
@@ -525,7 +525,7 @@ function on(a){function b(n){return 100*c(n/100)}function c(n){return Math.round
|
|
|
525
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
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
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
|
|
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
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
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
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;
|
|
@@ -567,7 +567,7 @@ g.codecs)),b.startsWith("audio/")?(g.type=c.S,f.audio=g):f.video=g,a.A.ba=!0,C(h
|
|
|
567
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
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
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&&(
|
|
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
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
572
|
function Ko(a){var b=a.h.preferredTextLanguage;""!=b&&a.Af(b,a.h.preferredTextRole,a.h.preferForcedSubs)}
|
|
573
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()})}}
|
|
@@ -597,7 +597,7 @@ r.cg=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(
|
|
|
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?
|
|
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
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
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)})};
|
|
@@ -606,7 +606,7 @@ function Po(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Rb:parseInt(a[1],10),rows:par
|
|
|
606
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
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&&
|
|
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
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
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)};
|
|
@@ -622,7 +622,7 @@ this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.s.L=th
|
|
|
622
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!=uo&&h.l!=Ho)throw new R(1,7,7004);"subtitles"!=c&&"captions"!=c&&
|
|
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
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
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
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,
|
|
@@ -634,7 +634,7 @@ r.Sg=function(a,b,c){var d=this,e,f,g,h;return L(function(k){switch(k.g){case 1:
|
|
|
634
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
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
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(){
|
|
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
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
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)}}
|
|
@@ -648,7 +648,7 @@ function Fo(a){if(a.g){var b=!1,c=a.g.currentTime/a.g.duration;isNaN(c)||(c=Math
|
|
|
648
648
|
function wo(a,b){b=void 0===b?!1:b;return lo(a)?a.o.chooseVariant(b):null}
|
|
649
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
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);
|
|
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
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
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
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)}})}
|
|
@@ -663,15 +663,15 @@ X.prototype.isAudioOnly=X.prototype.Lh;X.prototype.isInProgress=X.prototype.ac;X
|
|
|
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
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||
|
|
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.
|
|
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.16";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
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
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
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
|
|
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.16");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
|
|
675
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
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
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",
|
|
@@ -683,14 +683,14 @@ function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLET
|
|
|
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 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))):
|
|
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
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
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
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
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
|
|
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
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
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)})}
|
|
@@ -713,7 +713,7 @@ r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.ge
|
|
|
713
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
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
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
|
|
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
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=
|
|
@@ -722,8 +722,8 @@ function zp(a,b){a.i(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
|
|
|
722
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
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
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)&&
|
|
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)&&
|
|
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.16";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.16";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
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;
|
|
@@ -744,12 +744,12 @@ r.cast=function(){var a=this;return L(function(b){if(!a.m)throw new R(1,8,8E3);i
|
|
|
744
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
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
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(){}
|
|
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
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
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
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
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
|
|
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
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
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
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)}
|
|
@@ -758,9 +758,9 @@ function gq(a){for(var b=u(Lp),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[
|
|
|
758
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
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
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(){
|
|
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
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
|
|
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
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,
|
|
@@ -802,8 +802,8 @@ function Qr(a,b){var c=[];try{for(;b.ka();){var d=Er(b).value,e=(d&224)>>5,f=d&3
|
|
|
802
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
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
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&&
|
|
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
|
|
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
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
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
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};
|
|
@@ -815,10 +815,10 @@ function gs(a){var b=bh(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=Yg(b))
|
|
|
815
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
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
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
|
|
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
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))&&
|
|
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
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
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}
|
|
@@ -893,13 +893,13 @@ r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.
|
|
|
893
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
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
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,
|
|
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
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);
|
|
899
|
-
|
|
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"!=
|
|
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
|
|
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()
|
|
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
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
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}}
|
|
@@ -928,8 +928,8 @@ function vu(a){a=u(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=
|
|
|
928
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
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
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":
|
|
932
|
-
3);break;case 5:va(n);case 3:g=f.next();n.u(2);break;case 4:return
|
|
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
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
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
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):[]}
|
|
@@ -959,10 +959,10 @@ function vv(a,b){for(var c=-1==a.I,d=u(b),e=d.next();!e.done;e=d.next()){e=e.val
|
|
|
959
959
|
c,d)}
|
|
960
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
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,
|
|
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
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
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];
|
|
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
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
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;
|
|
@@ -979,9 +979,9 @@ function Wv(a){a.fullMimeTypes=new Set([Nd(a.mimeType,a.codecs)])}
|
|
|
979
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
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
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,
|
|
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(
|
|
984
|
-
|
|
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
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
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
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}
|
|
@@ -995,28 +995,28 @@ m=n.next().value;n=n.next().value;(m=c.get(m))&&ct(a.j,l,m,n)}}c=Z(h,"LANGUAGE")
|
|
|
995
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
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,
|
|
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
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,
|
|
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
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
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
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,
|
|
1005
|
-
|
|
1006
|
-
0);Ga=tv(
|
|
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
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
1009
|
Wv(a);return a}
|
|
1010
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
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
|
|
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
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
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
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
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
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&&
|
|
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
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
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}
|
|
@@ -1065,10 +1065,10 @@ v[4],v[7],v[6]].concat(y(v.slice(8))));v=zd(v);break a}v=null}else v=null;B=vd(Y
|
|
|
1065
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 Yw(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return
|
|
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=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
|
|
1071
|
-
e),null;c=ax(c,g,e,x);x.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return
|
|
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
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
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
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;
|
|
@@ -1077,7 +1077,7 @@ function dx(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandw
|
|
|
1077
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
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
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||!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;
|
|
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
1081
|
nx()&&(fg("http",gx,2,!0),fg("https",gx,2,!0),fg("blob",gx,2,!0));function ox(){}
|
|
1082
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()})}
|
|
@@ -1159,7 +1159,7 @@ function Zy(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){if(!d.drmInfo)ret
|
|
|
1159
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
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
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){
|
|
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
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
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
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)}}
|
|
@@ -1184,8 +1184,8 @@ Pz.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(vo
|
|
|
1184
1184
|
Wz;window.shakaMediaKeysPolyfill=bA}};
|
|
1185
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
|
-
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
|
|
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
|
|
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
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
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
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)}
|
|
@@ -1196,7 +1196,7 @@ function qA(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAcce
|
|
|
1196
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
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;}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
|
|
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
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
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
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")};
|
|
@@ -1230,16 +1230,16 @@ function oB(a,b,c,d){a=nB(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);nul
|
|
|
1230
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
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
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
|
|
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
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
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.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};
|
|
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
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
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
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 Ou(f[0]),k=IB(g),n=Qu(g,/[ \t]+--\x3e[ \t]+/g),l=IB(g),null==k||null==n||null==l)
|
|
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
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
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
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=
|
|
@@ -1315,10 +1315,10 @@ r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?
|
|
|
1315
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
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)
|
|
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
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
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
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,
|