shaka-player 4.3.9 → 4.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build-and-test.yaml +11 -18
- package/.github/workflows/compute-incremental-coverage.py +3 -0
- package/.github/workflows/selenium-lab-tests.yaml +45 -10
- package/CHANGELOG.md +10 -0
- package/demo/common/assets.js +59 -25
- package/demo/main.js +5 -0
- package/dist/demo.compiled.debug.js +15 -13
- package/dist/demo.compiled.debug.map +3 -3
- package/dist/demo.compiled.js +15 -13
- package/dist/demo.compiled.map +3 -3
- package/dist/locales.js +32 -32
- package/dist/receiver.compiled.debug.js +13 -11
- package/dist/receiver.compiled.debug.map +3 -3
- package/dist/receiver.compiled.js +13 -11
- package/dist/receiver.compiled.map +3 -3
- package/dist/shaka-player.compiled.debug.js +7 -6
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +68 -68
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.debug.js +15 -13
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +78 -78
- package/dist/shaka-player.ui.map +2 -2
- package/karma.conf.js +2 -0
- package/lib/ads/client_side_ad_manager.js +14 -2
- package/lib/player.js +1 -1
- package/lib/util/platform.js +8 -0
- package/package.json +2 -2
- package/test/player_integration.js +4 -1
- package/test/test/util/ui_utils.js +5 -1
- package/ui/externs/ui.js +2 -2
- package/ui/seek_bar.js +7 -1
|
@@ -37,10 +37,10 @@ while(!k.done)})};return b});function Ja(a,b){return Object.prototype.hasOwnProp
|
|
|
37
37
|
fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ja(k,g)){var l=new c;ca(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
|
|
38
38
|
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(p){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ja(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ja(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ja(k,
|
|
39
39
|
g)&&Ja(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ja(k,g)&&Ja(k[g],this.g)?delete k[g][this.g]:!1};return b});
|
|
40
|
-
fa("Map",function(a){function b(){var h={};return h.Qa=h.next=h.head=h}function c(h,k){var l=h.g;return ha(function(){if(l){for(;l.head!=h.g;)l=l.Qa;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ja(h.h,l))for(h=0;h<m.length;h++){var p=m[h];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:h,
|
|
41
|
-
list:m,index:-1,
|
|
42
|
-
"t"!=m.value[1]||!l.next().done?!1:!0}catch(p){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.
|
|
43
|
-
h.
|
|
40
|
+
fa("Map",function(a){function b(){var h={};return h.Qa=h.next=h.head=h}function c(h,k){var l=h.g;return ha(function(){if(l){for(;l.head!=h.g;)l=l.Qa;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ja(h.h,l))for(h=0;h<m.length;h++){var p=m[h];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:h,ha:p}}return{id:l,
|
|
41
|
+
list:m,index:-1,ha:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
|
|
42
|
+
"t"!=m.value[1]||!l.next().done?!1:!0}catch(p){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.ha?l.ha.value=k:(l.ha={next:this.g,Qa:this.g.Qa,head:this.g,key:h,value:k},l.list.push(l.ha),this.g.Qa.next=l.ha,this.g.Qa=l.ha,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.ha&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ha.Qa.next=h.ha.next,h.ha.next.Qa=h.ha.Qa,
|
|
43
|
+
h.ha.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Qa=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ha};e.prototype.get=function(h){return(h=d(this,h).ha)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
|
|
44
44
|
m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
|
|
45
45
|
fa("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
|
|
46
46
|
f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
|
|
@@ -86,7 +86,7 @@ function $b(a){if(!a.na&&(a.na={},a.Pc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.l
|
|
|
86
86
|
r.set=function(a,b){$b(this);this.g=null;this.na.hasOwnProperty(a)?this.na[a]=[b]:this.add(a,b);return this};r.toString=function(){if(this.g)return this.g;if(!this.na)return"";var a=[],b;for(b in this.na)for(var c=encodeURIComponent(b),d=this.na[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};r.clone=function(){var a=new Rb;a.g=this.g;if(this.na){var b={},c;for(c in this.na)b[c]=this.na[c].concat();a.na=b;a.Pc=this.Pc}return a};function ac(a,b){return a.concat(b)}function bc(){}function cc(a){return null!=a};function dc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Mb(d)});return a.map(function(d){return new Mb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(ac,[]).map(function(d){return d.toString()})}function ec(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
|
|
87
87
|
function fc(a,b){if(1==b.length)return b[0];a=gc(a,b);if(null!=a)return a;throw new O(2,4,4025,b);}function gc(a,b){for(var c=t(hc[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==ic?"":null}
|
|
88
88
|
var ic="text",jc={va:"video",Ic:"audio",X:ic,Xb:"image",Ig:"application"},hc={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function kc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}kc.prototype.resolve=function(){};kc.prototype.reject=function(){};function lc(a){this.h=a;this.g=void 0}lc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function mc(a){this.h=a;this.g=null}mc.prototype.O=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};mc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function P(a){this.h=a;this.g=null}P.prototype.Nb=function(){this.stop();this.h();return this};P.prototype.O=function(a){var b=this;this.stop();this.g=(new mc(function(){b.h()})).O(a);return this};P.prototype.Ca=function(a){var b=this;this.stop();this.g=(new mc(function(){b.g.O(a);b.h()})).O(a);return this};P.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};K("shaka.util.Timer",P);P.prototype.stop=P.prototype.stop;P.prototype.tickEvery=P.prototype.Ca;P.prototype.tickAfter=P.prototype.O;
|
|
89
|
-
P.prototype.tickNow=P.prototype.Nb;function nc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function oc(a){return""!=pc().canPlayType(a)}function qc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function rc(){return sc("Xbox One")}function tc(){return sc("Tizen")}function uc(){return sc("Web0S")&&sc("Chrome/38.0.2125.122 Safari/537.36")}function vc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!tc()&&!sc("PC=EOS")&&!sc("VirginMedia")&&!wc()&&!sc("AFT")}
|
|
89
|
+
P.prototype.tickNow=P.prototype.Nb;function nc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function oc(a){return""!=pc().canPlayType(a)}function qc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function rc(){return sc("Xbox One")}function tc(){return sc("Tizen")}function uc(){return sc("Web0S")&&sc("Chrome/38.0.2125.122 Safari/537.36")}function vc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!tc()&&!sc("PC=EOS")&&!sc("VirginMedia")&&!sc("SOPOpenBrowser")&&!wc()&&!sc("AFT")}
|
|
90
90
|
function wc(){return sc("PlayStation 4")}function xc(){if(!vc())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 sc(a){return(navigator.userAgent||"").includes(a)}function pc(){if(yc)return yc;zc||(zc=new P(function(){yc=null}));(yc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(yc=document.createElement("video"));zc.O(1);return yc}
|
|
91
91
|
var zc=null,yc=null;function Ac(){}
|
|
92
92
|
function Bc(a){if(!a)return"";a=L(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!wc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Wa('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==(a[c+
|
|
@@ -164,8 +164,8 @@ Ke.prototype.Z=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject
|
|
|
164
164
|
function Qe(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}K("shaka.util.AbortableOperation",Ke);Ke.prototype.chain=Ke.prototype.Z;Ke.prototype["finally"]=Ke.prototype.finally;Ke.all=Pe;Ke.prototype.abort=Ke.prototype.abort;Ke.notAbortable=Oe;Ke.completed=Ne;Ke.aborted=Me;Ke.failed=Le;function S(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
|
|
165
165
|
function Re(a){var b=new S(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}S.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};S.prototype.stopImmediatePropagation=function(){this.g=!0};S.prototype.stopPropagation=function(){};K("shaka.util.FakeEvent",S);
|
|
166
166
|
var Se={Kg:"abrstatuschanged",Lg:"adaptation",Mg:"buffering",Ng:"downloadfailed",Og:"downloadheadersreceived",Pg:"drmsessionupdate",Rg:"emsg",bh:"prft",Error:"error",Sg:"expirationupdated",Tg:"gapjumped",Vg:"loaded",Wg:"loading",Yg:"manifestparsed",Zg:"mediaqualitychanged",Metadata:"metadata",$g:"onstatechange",ah:"onstateidle",dh:"ratechange",fh:"segmentappended",gh:"sessiondata",hh:"stalldetected",ih:"streaming",jh:"textchanged",kh:"texttrackvisibility",lh:"timelineregionadded",mh:"timelineregionenter",
|
|
167
|
-
nh:"timelineregionexit",oh:"trackschanged",qh:"unloading",rh:"variantchanged"};function Te(){this.
|
|
168
|
-
Te.prototype.release=function(){this.
|
|
167
|
+
nh:"timelineregionexit",oh:"trackschanged",qh:"unloading",rh:"variantchanged"};function Te(){this.ea=new vd;this.Xc=this}Te.prototype.addEventListener=function(a,b){this.ea&&this.ea.push(a,b)};Te.prototype.removeEventListener=function(a,b){this.ea&&this.ea.remove(a,b)};Te.prototype.dispatchEvent=function(a){if(!this.ea)return!0;var b=this.ea.get(a.type)||[],c=this.ea.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Xc;a.currentTarget=this.Xc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
168
|
+
Te.prototype.release=function(){this.ea=null};function Ue(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Ve(a){var b={},c;for(c in a)b[c]=a[c];return b};function We(){this.g=[]}function Xe(a,b){a.g.push(b.finally(function(){gb(a.g,b)}))}We.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function Ye(a,b,c){Te.call(this);this.i=!1;this.m=new We;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}qa(Ye,Te);r=Ye.prototype;r.le=function(a){this.o=a};function Ze(a,b,c,d){c=c||$e;var e=af[a];if(!e||c>=e.priority)af[a]={priority:c,lg:b,mg:void 0===d?!1:d}}r.ng=function(a){this.g.add(a)};r.Dg=function(a){this.g.delete(a)};r.tf=function(){this.g.clear()};r.og=function(a){this.h.add(a)};r.Eg=function(a){this.h.delete(a)};r.uf=function(){this.h.clear()};
|
|
169
169
|
function bf(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();Te.prototype.release.call(this);return this.m.destroy()};
|
|
170
170
|
r.request=function(a,b){var c=this,d=new cf;if(this.i){var e=Promise.reject(new O(2,7,7001));e.catch(function(){});return new df(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ue(b.retryParameters):Ie();b.uris=Ue(b.uris);e=ef(this,a,b);var f=e.Z(function(){return ff(c,a,b,new He(b.retryParameters,!1),0,null,d)}),g=f.Z(function(p){return gf(c,a,p)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
|
|
171
171
|
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.Z(function(p){var n=Date.now()-l,q=p.response;q.timeMs+=k;q.timeMs+=n;p.Zf||!c.l||q.fromCache||"HEAD"==b.method||a!=hf||c.l(q.timeMs,q.data.byteLength);return q},function(p){p&&(p.severity=2);throw p;});e=new df(m.promise,function(){return m.abort()},d);Xe(this.m,e);return e};
|
|
@@ -175,15 +175,15 @@ if(!p)return x;var D=c.retryParameters.connectionTimeout;D&&(n=new P(function(){
|
|
|
175
175
|
c.uris[e],b));if(x instanceof O){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity)return D=(new Map).set("error",x),D=new S("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,ff(a,b,c,d,e,x,g)}throw x;})}
|
|
176
176
|
function gf(a,b,c){var d=Ne(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={vd:e.vd},f=a.next())e.vd=f.value,d=d.Z(function(g){return function(){var h=c.response;h.data&&(h.data=Hb(h.data));return g.vd(b,h)}}(e));return d.Z(function(){return c},function(g){var h=2;if(g instanceof O){if(7001==g.code)throw g;h=g.severity}throw new O(h,1,1007,g);})}K("shaka.net.NetworkingEngine",Ye);Ye.prototype.request=Ye.prototype.request;Ye.prototype.destroy=Ye.prototype.destroy;Ye.makeRequest=bf;
|
|
177
177
|
Ye.defaultRetryParameters=function(){return Ie()};Ye.prototype.clearAllResponseFilters=Ye.prototype.uf;Ye.prototype.unregisterResponseFilter=Ye.prototype.Eg;Ye.prototype.registerResponseFilter=Ye.prototype.og;Ye.prototype.clearAllRequestFilters=Ye.prototype.tf;Ye.prototype.unregisterRequestFilter=Ye.prototype.Dg;Ye.prototype.registerRequestFilter=Ye.prototype.ng;Ye.unregisterScheme=function(a){delete af[a]};Ye.registerScheme=Ze;Ye.prototype.setForceHTTPS=Ye.prototype.le;function cf(){this.g=0}
|
|
178
|
-
Ye.NumBytesRemainingClass=cf;function df(a,b,c){Ke.call(this,a,b);this.h=c}qa(df,Ke);Ye.PendingRequest=df;var hf=1;Ye.RequestType={MANIFEST:0,SEGMENT:hf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var $e=3;Ye.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:$e};var af={};function jf(a){this.g=!1;this.h=new kc;this.i=a}jf.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function kf(a,b){if(a.g){if(b instanceof O&&7003==b.code)throw b;throw new O(2,7,7003,b);}};function lf(){this.g=new vd}r=lf.prototype;r.release=function(){this.ob();this.g=null};r.C=function(a,b,c,d){this.g&&(a=new mf(a,b,c,d),this.g.push(b,a))};r.
|
|
179
|
-
r.ob=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Ac();this.g.g={}}};K("shaka.util.EventManager",lf);lf.prototype.removeAll=lf.prototype.ob;lf.prototype.unlisten=lf.prototype.Ac;lf.prototype.listenOnce=lf.prototype.
|
|
178
|
+
Ye.NumBytesRemainingClass=cf;function df(a,b,c){Ke.call(this,a,b);this.h=c}qa(df,Ke);Ye.PendingRequest=df;var hf=1;Ye.RequestType={MANIFEST:0,SEGMENT:hf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var $e=3;Ye.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:$e};var af={};function jf(a){this.g=!1;this.h=new kc;this.i=a}jf.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function kf(a,b){if(a.g){if(b instanceof O&&7003==b.code)throw b;throw new O(2,7,7003,b);}};function lf(){this.g=new vd}r=lf.prototype;r.release=function(){this.ob();this.g=null};r.C=function(a,b,c,d){this.g&&(a=new mf(a,b,c,d),this.g.push(b,a))};r.ca=function(a,b,c,d){function e(g){f.Ac(a,b,e);c(g)}var f=this;this.C(a,b,e,d)};r.Ac=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Ac(),this.g.remove(b,e))}};
|
|
179
|
+
r.ob=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Ac();this.g.g={}}};K("shaka.util.EventManager",lf);lf.prototype.removeAll=lf.prototype.ob;lf.prototype.unlisten=lf.prototype.Ac;lf.prototype.listenOnce=lf.prototype.ca;lf.prototype.listen=lf.prototype.C;lf.prototype.release=lf.prototype.release;function mf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=nf(a,d);this.target.addEventListener(b,c,this.g)}
|
|
180
180
|
mf.prototype.Ac=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function nf(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 of(a)?b:b.capture||!1}
|
|
181
|
-
function of(a){var b=pf;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}pf=b}return b||!1}var pf=void 0;function qf(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function rf(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function sf(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function tf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function uf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next()){var d=t(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function vf(a,b){this.S=Jb(a);this.h=b==wf;this.g=0}r=vf.prototype;r.
|
|
181
|
+
function of(a){var b=pf;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}pf=b}return b||!1}var pf=void 0;function qf(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function rf(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function sf(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function tf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function uf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next()){var d=t(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function vf(a,b){this.S=Jb(a);this.h=b==wf;this.g=0}r=vf.prototype;r.ia=function(){return this.g<this.S.byteLength};r.$=function(){return this.g};r.Hf=function(){return this.S.byteLength};r.Ra=function(){try{var a=this.S.getUint8(this.g);this.g+=1;return a}catch(b){throw xf();}};r.be=function(){try{var a=this.S.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw xf();}};r.K=function(){try{var a=this.S.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw xf();}};
|
|
182
182
|
r.Qe=function(){try{var a=this.S.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw xf();}};r.$a=function(){try{if(this.h){var a=this.S.getUint32(this.g,!0);var b=this.S.getUint32(this.g+4,!0)}else b=this.S.getUint32(this.g,!1),a=this.S.getUint32(this.g+4,!1)}catch(c){throw xf();}if(2097151<b)throw new O(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.Za=function(a){if(this.g+a>this.S.byteLength)throw xf();var b=L(this.S,this.g,a);this.g+=a;return b};
|
|
183
|
-
r.skip=function(a){if(this.g+a>this.S.byteLength)throw xf();this.g+=a};r.ug=function(a){if(this.g<a)throw xf();this.g-=a};r.seek=function(a){if(0>a||a>this.S.byteLength)throw xf();this.g=a};r.tc=function(){for(var a=this.g;this.
|
|
184
|
-
vf.prototype.skip=vf.prototype.skip;vf.prototype.readBytes=vf.prototype.Za;vf.prototype.readUint64=vf.prototype.$a;vf.prototype.readInt32=vf.prototype.Qe;vf.prototype.readUint32=vf.prototype.K;vf.prototype.readUint16=vf.prototype.be;vf.prototype.readUint8=vf.prototype.Ra;vf.prototype.getLength=vf.prototype.Hf;vf.prototype.getPosition=vf.prototype.$;vf.prototype.hasMoreData=vf.prototype.
|
|
183
|
+
r.skip=function(a){if(this.g+a>this.S.byteLength)throw xf();this.g+=a};r.ug=function(a){if(this.g<a)throw xf();this.g-=a};r.seek=function(a){if(0>a||a>this.S.byteLength)throw xf();this.g=a};r.tc=function(){for(var a=this.g;this.ia()&&0!=this.S.getUint8(this.g);)this.g+=1;a=L(this.S,a,this.g-a);this.g+=1;return Bc(a)};function xf(){return new O(2,3,3E3)}K("shaka.util.DataViewReader",vf);vf.prototype.readTerminatedString=vf.prototype.tc;vf.prototype.seek=vf.prototype.seek;vf.prototype.rewind=vf.prototype.ug;
|
|
184
|
+
vf.prototype.skip=vf.prototype.skip;vf.prototype.readBytes=vf.prototype.Za;vf.prototype.readUint64=vf.prototype.$a;vf.prototype.readInt32=vf.prototype.Qe;vf.prototype.readUint32=vf.prototype.K;vf.prototype.readUint16=vf.prototype.be;vf.prototype.readUint8=vf.prototype.Ra;vf.prototype.getLength=vf.prototype.Hf;vf.prototype.getPosition=vf.prototype.$;vf.prototype.hasMoreData=vf.prototype.ia;var wf=1;vf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:wf};function yf(){this.i=[];this.h=[];this.g=!1}r=yf.prototype;r.box=function(a,b){a=zf(a);this.i[a]=Af;this.h[a]=b;return this};r.R=function(a,b){a=zf(a);this.i[a]=Bf;this.h[a]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new vf(a,0);for(this.g=!1;a.ia()&&!this.g;)this.rc(0,a,b,c)};
|
|
185
185
|
r.rc=function(a,b,c,d){var e=b.$();if(d&&e+8>b.S.byteLength)this.g=!0;else{var f=b.K(),g=b.K(),h=Cf(g),k=!1;switch(f){case 0:f=b.S.byteLength-e;break;case 1:if(d&&b.$()+8>b.S.byteLength){this.g=!0;return}f=b.$a();k=!0}var l=this.h[g];if(l){var m=null,p=null;if(this.i[g]==Bf){if(d&&b.$()+4>b.S.byteLength){this.g=!0;return}p=b.K();m=p>>>24;p&=16777215}g=e+f;c&&g>b.S.byteLength&&(g=b.S.byteLength);d&&g>b.S.byteLength?this.g=!0:(d=g-b.$(),b=0<d?b.Za(d):new Uint8Array(0),b=new vf(b,0),l({name:h,parser:this,
|
|
186
|
-
partialOkay:c||!1,version:m,flags:p,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.$(),b.S.byteLength-b.$()))}};function Df(a){for(var b=Ef(a);a.reader.
|
|
186
|
+
partialOkay:c||!1,version:m,flags:p,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.$(),b.S.byteLength-b.$()))}};function Df(a){for(var b=Ef(a);a.reader.ia()&&!a.parser.g;)a.parser.rc(a.start+b,a.reader,a.partialOkay)}function Ff(a){for(var b=Ef(a),c=a.reader.K(),d=0;d<c&&(a.parser.rc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Gf(a){var b=Ef(a);for(a.reader.skip(78);a.reader.ia()&&!a.parser.g;)a.parser.rc(a.start+b,a.reader,a.partialOkay)}
|
|
187
187
|
function Hf(a){return function(b){a(b.reader.Za(b.reader.S.byteLength-b.reader.$()))}}function zf(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Cf(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Ef(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}K("shaka.util.Mp4Parser",yf);yf.headerSize=Ef;yf.typeToString=Cf;yf.allData=Hf;yf.visualSampleEntry=Gf;yf.sampleDescription=Ff;yf.children=Df;yf.prototype.parseNext=yf.prototype.rc;
|
|
188
188
|
yf.prototype.parse=yf.prototype.parse;yf.prototype.stop=yf.prototype.stop;yf.prototype.fullBox=yf.prototype.R;yf.prototype.box=yf.prototype.box;var Af=0,Bf=1;function If(a){var b=this;this.g=[];this.h=[];this.data=[];(new yf).box("moov",Df).box("moof",Df).R("pssh",function(c){if(!(1<c.version)){var d=L(c.reader.S,-12,c.size);b.data.push(d);b.g.push(Mc(c.reader.Za(16)));if(0<c.version){d=c.reader.K();for(var e=0;e<d;e++){var f=Mc(c.reader.Za(16));b.h.push(f)}}}}).parse(a)}
|
|
189
189
|
function Jf(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Jb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=Lc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Kf(a,b){a=Lf(a,b);return 1!=a.length?null:a[0]}function Mf(a,b,c){a=Nf(a,b,c);return 1!=a.length?null:a[0]}function Lf(a,b){var c=[];a=t(a.childNodes);for(var d=a.next();!d.done;d=a.next())d=d.value,d instanceof Element&&d.tagName==b&&c.push(d);return c}function Of(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
|
|
@@ -192,19 +192,19 @@ function Sf(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION
|
|
|
192
192
|
function Vf(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}
|
|
193
193
|
function Wf(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 Xf(a){a=Number(a);return 0===a%1?a:null}function Yf(a){a=Number(a);return 0===a%1&&0<a?a:null}function Zf(a){a=Number(a);return 0===a%1&&0<=a?a:null}function $f(a){a=Number(a);return isNaN(a)?null:a}function ag(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
194
194
|
function bg(a,b){var c=new DOMParser,d=cg.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function dg(a,b){try{var c=Bc(a);return bg(c,b)}catch(d){return null}}
|
|
195
|
-
var cg=new lc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function eg(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.G=new Set;this.l=this.u=null;this.
|
|
196
|
-
r.destroy=function(){return this.j.destroy()};function hg(a){return G(function(b){switch(b.g){case 1:return a.s.release(),a.s=null,a.o.reject(),a.
|
|
197
|
-
function jg(a,b,c){a.
|
|
195
|
+
var cg=new lc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function eg(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.G=new Set;this.l=this.u=null;this.fa=this.ba=!1;this.H=0;this.g=null;this.s=new lf;this.i=new Map;this.A=[];this.o=new kc;this.h=null;this.m=function(d){c.o.reject(d);a.onError(d)};this.ka=new Map;this.da=new Map;this.V=new P(function(){return fg(c)});this.M=!1;this.L=[];this.P=!1;this.ea=(new P(function(){gg(c)})).Ca(b);this.o.catch(function(){});this.j=new jf(function(){return hg(c)});this.W=!1;this.J=this.F=null}r=eg.prototype;
|
|
196
|
+
r.destroy=function(){return this.j.destroy()};function hg(a){return G(function(b){switch(b.g){case 1:return a.s.release(),a.s=null,a.o.reject(),a.ea.stop(),a.ea=null,a.V.stop(),a.V=null,u(b,ig(a),2);case 2:if(!a.l){b.B(3);break}C(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:wa(b);case 5:a.l=null;case 3:a.g=null,a.G.clear(),a.u=null,a.A=[],a.h=null,a.m=function(){},a.D=null,a.W=!1,a.F=null,A(b)}})}r.configure=function(a){this.h=a};
|
|
197
|
+
function jg(a,b,c){a.fa=!0;a.A=[];a.M=c;return kg(a,b)}function lg(a,b,c){a.A=c;a.M=0<c.length;return kg(a,b)}
|
|
198
198
|
function mg(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 ng(a,g,[])}
|
|
199
199
|
function kg(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v,y,w,x,D;return G(function(z){if(1==z.g){if(c=og(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(B){return B.video&&B.video.drmInfos.length||B.audio&&B.audio.drmInfos.length?!0:!1});g||(h=sf(a.h.servers),pg(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,p=qg(m),n=t(p),q=n.next();!q.done;q=n.next())v=q.value,k.add(v);y=t(k);for(q=y.next();!q.done;q=
|
|
200
200
|
y.next())w=q.value,rg(w,sf(a.h.servers),sf(a.h.advanced||{}),a.h.keySystemsMapping);return u(z,Qd(b,a.M,a.W),2)}x=g||Object.keys(a.h.servers).length;if(!x)return a.ba=!0,z.return(Promise.resolve());D=ng(a,void 0,b);return z.return(g?D:D.catch(function(){}))})}
|
|
201
201
|
function sg(a){var b;return G(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.F){c.B(2);break}return u(c,a.F,3);case 3:return kf(a.j),c.return();case 2:return C(c,4),a.F=a.l.setMediaKeys(a.u),u(c,a.F,6);case 6:va(c,5);break;case 4:b=wa(c),a.m(new O(2,6,6003,b.message));case 5:kf(a.j),A(c)}})}function tg(a,b){return G(function(c){if(1==c.g)return u(c,sg(a),2);ug(a,b.initDataType,L(b.initData));A(c)})}
|
|
202
|
-
r.Zb=function(a){var b=this;return G(function(c){if(1==c.g){if(!b.u)return b.s.
|
|
202
|
+
r.Zb=function(a){var b=this;return G(function(c){if(1==c.g){if(!b.u)return b.s.ca(a,"encrypted",function(){b.m(new O(2,6,6010))}),c.return();b.l=a;b.s.ca(b.l,"play",function(){for(var d=t(b.L),e=d.next();!e.done;e=d.next())vg(b,e.value);b.P=!0;b.L=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.s.C(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return ig(b)});b.J=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.J||"com.apple.fps"!==b.g.keySystem||
|
|
203
203
|
b.A.length?u(c,sg(b),2):c.B(2)}wg(b);b.J||b.A.length||b.h.parseInbandPsshEnabled||b.s.C(b.l,"encrypted",function(d){return tg(b,d)});A(c)})};
|
|
204
204
|
function xg(a){var b,c,d,e,f;return G(function(g){switch(g.g){case 1:if(!a.u||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=bf([a.g.serverCertificateUri],a.h.retryParameters);C(g,3);c=a.D.lb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=L(d.data);va(g,4);break;case 3:throw e=wa(g),new O(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
|
|
205
205
|
C(g,6);return u(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=wa(g),new O(2,6,6004,f.message);}})}function yg(a,b){var c,d,e;return G(function(f){if(1==f.g)return u(f,zg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Ja=new kc,d.push(e.Ja);d.push(c.remove());return u(f,Promise.all(d),3)}a.i.delete(c);A(f)})}
|
|
206
206
|
function wg(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,ug(a,d.initDataType,d.initData);c=t(a.A);for(d=c.next();!d.done;d=c.next())zg(a,d.value);b.length||a.A.length||a.o.resolve();return a.o}function ug(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Fb(c,e.value.initData)&&!sc("Tizen 2"))return;0<a.i.size&&Ag(a)&&(a.o.resolve(),a.o=new kc,a.o.catch(function(){}));Bg(a,b,c,a.g.sessionType)}}
|
|
207
|
-
function Cg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Dg(a){a=a.i.keys();a=qf(a,function(b){return b.sessionId});return Array.from(a)}r.jc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.Rc=function(){return tf(this.
|
|
207
|
+
function Cg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Dg(a){a=a.i.keys();a=qf(a,function(b){return b.sessionId});return Array.from(a)}r.jc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.Rc=function(){return tf(this.da)};
|
|
208
208
|
function ng(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,v,y;return G(function(w){switch(w.g){case 1:d=new Map;if(c.length){e=Eg(a,c,d);w.B(2);break}return u(w,Fg(a,b),3);case 3:e=w.h;case 2:f=e;if(!f)throw new O(2,6,6001);kf(a.j);C(w,4);a.G.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())p=m.value,a.G.add(p.contentType.toLowerCase());n=t(k);for(m=n.next();!m.done;m=n.next())q=m.value,a.G.add(q.contentType.toLowerCase());if(c.length){var x=
|
|
209
209
|
f.keySystem;var D=d.get(f.keySystem);var z=[],B=[],E=[],F=[],H=new Set;Gg(D,z,E,B,F,H);var I=a.M?"persistent-license":"temporary";x={keySystem:x,licenseServerUri:z[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||I,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:E[0],serverCertificateUri:B[0],initData:F,keyIds:H};D=t(D);for(z=D.next();!z.done;z=
|
|
210
210
|
D.next())z=z.value,z.distinctiveIdentifierRequired&&(x.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(x.persistentStateRequired=z.persistentStateRequired);D=x}else D=f.keySystem,x=b.get(f.keySystem),z=[],B=[],E=[],F=[],H=new Set,Gg(x.drmInfos,z,E,B,F,H),D={keySystem:D,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==x.distinctiveIdentifier,persistentStateRequired:"required"==x.persistentState,sessionType:x.sessionTypes[0]||"temporary",audioRobustness:(x.audioCapabilities?
|
|
@@ -224,11 +224,11 @@ Cg(a.g.keySystem)&&Ig(g),h=Date.now(),C(w,2),l=a.D.lb.request(2,g),u(w,l.promise
|
|
|
224
224
|
a.D.onEvent(v);d&&(d.Ja&&d.Ja.resolve(),y=new P(function(){d.loaded=!0;Ag(a)&&a.o.resolve()}),y.O(Jg));A(w)}})}
|
|
225
225
|
function Ig(a){var b=Cc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=bg(b,"PlayReadyKeyMessage");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Kc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
|
|
226
226
|
function Hg(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Cg(a.g.keySystem)&&16==g.byteLength&&(qc()||wc())){h=Jb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Mc(g).slice(0,32);a.ka.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Ja&&(a.i.delete(b),b.close().catch(function(){}));
|
|
227
|
-
Ag(a)&&(a.o.resolve(),a.V.O(Kg))}function fg(a){var b=a.ka,c=a.
|
|
227
|
+
Ag(a)&&(a.o.resolve(),a.V.O(Kg))}function fg(a){var b=a.ka,c=a.da;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new O(2,6,6014));a.D.dd(tf(c))}
|
|
228
228
|
function Lg(){var a,b,c,d,e,f,g,h;return G(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,p,
|
|
229
229
|
n;return G(function(q){switch(q.g){case 1:C(q,2);if("org.w3.clearkey"===l&&xc())throw Error("Unsupported keySystem");return u(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,n=(p=m.getConfiguration().sessionTypes)?p.includes("persistent-license"):!1,sc("Tizen 3")&&(n=!1),f.set(l,{persistentState:n}),u(q,m.createMediaKeys(),5);case 5:va(q,0);break;case 2:wa(q),f.set(l,null),A(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k.return(tf(f))})}
|
|
230
230
|
function Mg(a){var b;return G(function(c){if(1==c.g)return b=new Promise(function(d,e){(new P(e)).O(Ng)}),C(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);wa(c);A(c)})}
|
|
231
|
-
function ig(a){var b;return G(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return G(function(g){if(1==g.g)return C(g,2),a.
|
|
231
|
+
function ig(a){var b;return G(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return G(function(g){if(1==g.g)return C(g,2),a.fa||a.A.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Mg(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);wa(g);A(g)})})),0)})}
|
|
232
232
|
function Og(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e={},f=t(b),g=f.next();!g.done;e={Da:e.Da},g=f.next())if(g=g.value,d.keySystem==g.keySystem){e.Da=[];e.Da=e.Da.concat(d.initData||[]);e.Da=e.Da.concat(g.initData||[]);e.Da=e.Da.filter(function(h){return function(k,l){return void 0===k.keyId||l===h.Da.findIndex(function(m){return m.keyId===k.keyId})}}(e));f=d.keyIds&&g.keyIds?new Set([].concat(ia(d.keyIds),ia(g.keyIds))):
|
|
233
233
|
d.keyIds||g.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||g.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||g.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||g.persistentStateRequired,videoRobustness:d.videoRobustness||g.videoRobustness,audioRobustness:d.audioRobustness||g.audioRobustness,serverCertificate:d.serverCertificate||g.serverCertificate,serverCertificateUri:d.serverCertificateUri||g.serverCertificateUri,
|
|
234
234
|
initData:e.Da,keyIds:f});break}}return c}function qg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function gg(a){a.i.forEach(function(b,c){var d=b.Xd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Xd=e)})}function Ag(a){a=a.i.values();return rf(a,function(b){return b.loaded})}
|
|
@@ -248,7 +248,7 @@ var ih=0,kh=1,mh=2,oh=3,jh=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[9
|
|
|
248
248
|
[35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),ph=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
|
|
249
249
|
[39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function rh(a,b){this.h=sh;this.o=new dh(a,b);this.i=new dh(a,b);this.l=new dh(a,b);this.g=this.i;this.j=0;this.m=null}function th(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==uh&&a.h!==vh&&(e=fh(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,gh(c,0,15),c=a.l,c.g=0<c.h?c.h:0,gh(c,0,15),d.g=15);a.h=uh;d.h=b;return e}function wh(a){a.h=xh;a.g=a.l;a.g.h=0}function yh(a){Ya("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=vh}
|
|
250
250
|
var sh=0,xh=1,uh=3,vh=4,zh="black green blue cyan red yellow magenta black".split(" "),Ah="white green blue cyan red yellow magenta white_italics".split(" ");function Bh(){this.l=!1;this.A=this.F=0;this.D=Ch;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";Dh(this)}function Dh(a){a.i=[];for(var b=0;16>b;b++)a.i.push(Eh())}function Eh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Fh(a,b){Gh(a)&&(a.i[a.h][a.g]=new ch(b,a.u,a.o,a.m,a.s),a.g++)}function Gh(a){var b=a.g<a.A&&0<=a.g;return a.h<a.F&&0<=a.h&&b}Bh.prototype.isVisible=function(){return this.l};
|
|
251
|
-
function Hh(a,b,c){var d=new jb(a.j,b,"");d.textAlign=a.D===Ih?"left":a.D===Jh?"right":nb;if(c=$g(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Ih=0,Jh=1,Ch=2;function Kh(){this.i=[];this.h=null;this.g=0}function Lh(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Mh(a.h)),a.h=null,a.g=0))}function Mh(a){this.g=0;this.h=a}Mh.prototype.
|
|
251
|
+
function Hh(a,b,c){var d=new jb(a.j,b,"");d.textAlign=a.D===Ih?"left":a.D===Jh?"right":nb;if(c=$g(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Ih=0,Jh=1,Ch=2;function Kh(){this.i=[];this.h=null;this.g=0}function Lh(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Mh(a.h)),a.h=null,a.g=0))}function Mh(a){this.g=0;this.h=a}Mh.prototype.ia=function(){return this.g<this.h.length};Mh.prototype.$=function(){return this.g};function Nh(a){if(!a.ia())throw new O(2,2,3E3);return a.h[a.g++]}Mh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new O(2,2,3E3);this.g+=a};function Oh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
252
252
|
function Ph(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=Nh(b).value;b=null;c=t(Qh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Hh(e,d,a.i)),Dh(e);return b}if(137===c)for(b=Nh(b).value,b=t(Qh(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=Nh(b).value;b=null;c=t(Qh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Hh(e,d,a.i)),e.l=!1;return b}if(139===c){c=Nh(b).value;
|
|
253
253
|
b=null;c=t(Qh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Hh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Nh(b).value,Rh(a,b,d);if(143===c)return d=Rh(a,255,d),Sh(a),d;if(144===c)b.skip(1),d=Nh(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=Nh(b).value,c=Nh(b).value,b.skip(1),a.g&&(b=Th((c&48)>>4,(c&12)>>2,c&3),a.g.s=Th((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=Nh(b).value,b=Nh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
254
254
|
b.skip(1),d=Nh(b).value,b.skip(1),a.g&&(a.g.D=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Bh;f.j=d;a.h[c]=f}d=Nh(b).value;Nh(b);Nh(b);f=Nh(b).value;var g=Nh(b).value;b=Nh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.u=!1,b.o=!1,b.s="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.F=(f&15)+1;b.A=(g&63)+1;a.g=a.h[c]}}}return null}function Qh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
|
|
@@ -259,7 +259,7 @@ function Zh(a,b){var c=b.type;if(16===(b.xa&112)){var d=b.xa>>3&1;0===c?a.m=d:a.
|
|
|
259
259
|
a=1===(a&1);if(c.h!==vh){e=c.g;if(c.h===uh&&b!==e.g){var g=1+b-e.h;qh(e,g,1+e.g-e.h,e.h);gh(e,0,g-1);gh(e,b+1,15-b)}e.g=b;c.g.m=a;c.g.j=f;c.g.l=d;c.g.o="black"}}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",hh(c.g,ih,32),d=!1,b=Ah[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=zh[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))hh(c.g,kh,a);else if(18===
|
|
260
260
|
(d&246)&&32===(a&224))hh(c.g,d&1?oh:mh,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.La){case 32:wh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=th(c,2,a);break;case 38:d=th(c,3,a);break;case 39:d=th(c,4,a);break;case 40:hh(c.g,ih,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=a;break;case 42:eh(c.o);yh(c);break;case 43:yh(c);break;case 44:b=c.i;d=null;c.h!==vh&&(d=fh(b,c.j,a));gh(b,0,15);break;case 45:b=c.g;c.h!==uh?d=null:(d=fh(b,c.j,a),f=b.g-b.h+1,qh(b,f-1,f,b.h),gh(b,0,
|
|
261
261
|
f-1),gh(b,b.g,15-b.g),c.j=a);break;case 46:gh(c.l,0,15);break;case 47:b=null,c.h!==vh&&(b=fh(c.i,c.j,a)),d=c.l,c.l=c.i,c.i=d,wh(c),c.j=a,d=b}a=d;break a}a=null}else d=b.La,hh(c.g,ih,b.xa),hh(c.g,ih,d);return a}
|
|
262
|
-
function $h(a,b){var c=[];try{for(;b.
|
|
262
|
+
function $h(a,b){var c=[];try{for(;b.ia();){var d=Nh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Nh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Oh(e));for(var g=a.j.get(e),h=b.$();b.$()-h<f;){e=b;var k=Nh(e),l=k.value,m=k.pts;if(16===l){var p=Nh(e);l=l<<16|p.value}if(0<=l&&31>=l){var n=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!Gh(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.A-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=Hh(q,n,g.i));if(q.h+1>=q.F){n=q;for(var v=0,y=1;16>y;y++,
|
|
263
263
|
v++)n.i[v]=n.i[y];for(y=0;1>y;y++,v++)n.i[v]=Eh()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=Hh(q,n,g.i));q.i[q.h]=Eh();q.g=0;break;case 12:q.isVisible()&&(e=Hh(q,n,g.i)),Dh(q),n=q,n.h=0,n.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=Ph(g,e,l,m);else{if(4096<=l&&4127>=l)n=l&255,8<=n&&15>=n?e.skip(1):16<=n&&23>=n?e.skip(2):24<=n&&31>=n&&e.skip(3);else if(4224<=l&&4255>=l)n=l&255,128<=n&&135>=n?e.skip(4):136<=n&&143>=n&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Fh(g.g,"\u266a"):Fh(g.g,
|
|
264
264
|
String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Fh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Vh.has(e)){var x=Vh.get(e);Fh(g.g,x)}else Fh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Fh(g.g,"_"):Fh(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(D){if(D instanceof O&&3E3===D.code)Ya("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function ai(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function bi(){}bi.prototype.init=function(){};bi.prototype.parse=function(){return[]};function ci(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(ia(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 di(a,b){var c=null,d=null,e=null,f=a.K();b&1&&(e=a.$a());b&2&&a.skip(4);b&8&&(c=a.K());b&16&&(d=a.K());return{trackId:f,De:c,yf:d,sh:e}}function ei(a,b){return{xe:1==b?a.$a():a.K()}}function fi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.K()}}
|
|
265
265
|
function gi(a,b,c){var d=a.K(),e=[],f=null;c&1&&(f=a.K());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={ge:null,sampleSize:null,fd:null};c&256&&(h.ge=a.K());c&512&&(h.sampleSize=a.K());c&1024&&a.skip(4);c&2048&&(h.fd=0==b?a.K():a.Qe());e.push(h)}return{yh:d,Se:e,xf:f}};function hi(){this.j=new Map;this.i=this.h=0;this.g=ii}
|
|
@@ -267,7 +267,7 @@ hi.prototype.init=function(a){function b(f){f=f.name;f in ji&&(c.g=ji[f])}var c=
|
|
|
267
267
|
b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("encv",Gf).box("sinf",Df).box("frma",function(f){f=f.reader.K();f=Cf(f);f in ji&&(c.g=ji[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new O(2,2,2010);this.g==ii&&Xa("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
268
268
|
hi.prototype.parse=function(a){var b=this;if(this.g==ii)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new yf).box("moof",function(l){f=l.start;g=[];Df(l)}).box("traf",Df).R("trun",function(l){l=gi(l.reader,l.version,l.flags);g.push(l)}).R("tfhd",function(l){l=di(l.reader,l.flags);d=l.De||b.h;e=l.yf||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).R("tfdt",function(l){h=ei(l.reader,l.version).xe}).box("mdat",function(l){if(null===h)throw Xa("Unable to find base media decode time for CEA captions!"),
|
|
269
269
|
new O(2,2,2010);ki(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
|
|
270
|
-
function ki(a,b,c,d,e,f,g,h,k){var l=0,m=f,p=h.map(function(v){return v.Se});p=[].concat.apply([],ia(p));p.length&&(m=p[0].sampleSize||f);for(b.skip(g+h[0].xf);b.
|
|
270
|
+
function ki(a,b,c,d,e,f,g,h,k){var l=0,m=f,p=h.map(function(v){return v.Se});p=[].concat.apply([],ia(p));p.length&&(m=p[0].sampleSize||f);for(b.skip(g+h[0].xf);b.ia();){g=b.K();var n=b.Ra(),q=null;q=!1;h=1;switch(a.g){case li:q=n&31;q=6==q;break;case mi:h=2;b.skip(1);q=n>>1&63;q=39==q||40==q;break;default:return}if(q)for(n=0,l<p.length&&(n=p[l].fd||0),n=(c+n)/d,h=t(ci(b.Za(g-h))),q=h.next();!q.done;q=h.next())k.push({kg:q.value,pts:n});else try{b.skip(g-h)}catch(v){break}m-=g+4;0==m&&(c=l<p.length?
|
|
271
271
|
c+(p[l].ge||e):c+e,l++,l<p.length?m=p[l].sampleSize||f:m=f)}}var ii=0,li=1,mi=2,ji={avc1:li,avc3:li,hev1:mi,hvc1:mi,dvh1:mi,dvhe:mi};function ni(a){this.h=new bi;a.includes("video/mp4")&&(this.h=new hi);this.g=new Wh}ni.prototype.init=function(a){this.h.init(a)};
|
|
272
272
|
function oi(a,b){b=a.h.parse(b);b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=L(d.kg);if(0<e.length&&(c=a.g,d=d.pts,e=new vf(e,0),181===e.Ra()&&49===e.be()&&1195456820===e.K()&&3===e.Ra())){var f=e.Ra();if(0!==(f&64)){f&=31;e.skip(1);for(var g=0;g<f;g++){var h=e.Ra(),k=(h&4)>>2,l=e.Ra(),m=e.Ra();k&&(h&=3,0===h||1===h?c.h.push({pts:d,type:h,xa:l,La:m,order:c.h.length}):(c.g.push({pts:d,type:h,value:l,order:c.g.length}),c.g.push({pts:d,type:2,value:m,order:c.g.length})))}}}}return Yh(a.g)}
|
|
273
273
|
;function pi(a,b,c,d,e){this.ya=a;this.Ba=b;this.ma=c;this.Qd=void 0===d?null:d;this.timescale=e}pi.prototype.mc=function(){return this.Ba};pi.prototype.ic=function(){return this.ma};function qi(a,b){return a&&b?a.mc()==b.mc()&&a.ic()==b.ic()&&ib(a.ya(),b.ya()):a==b}K("shaka.media.InitSegmentReference",pi);pi.prototype.getEndByte=pi.prototype.ic;pi.prototype.getStartByte=pi.prototype.mc;
|
|
@@ -292,7 +292,7 @@ Di.prototype.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,
|
|
|
292
292
|
a.subarray(h,e+188);null==this.m&&(h=Fi(f))&&null!=h.pts&&(this.m=h.pts/9E4);this.A.push(f);break;case this.g:f=a.subarray(h,e+188);null==this.h&&(h=Fi(f))&&null!=h.pts&&(this.h=h.pts/9E4);this.u.push(f);break;case this.j:this.i.push(a.subarray(h,e+188));break;default:d=!0}}return this};
|
|
293
293
|
function Fi(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8Array(0),xh:6+(a[4]<<8|a[5]),pts:null,dts:null},c=a[7];c&192&&(b.pts=536870912*(a[9]&14)+4194304*(a[10]&255)+16384*(a[11]&254)+128*(a[12]&255)+(a[13]&254)/2,b.dts=b.pts,c&64&&(b.dts=536870912*(a[14]&14)+4194304*(a[15]&255)+16384*(a[16]&254)+128*(a[17]&255)+(a[18]&254)/2));b.data=a.subarray(9+a[8]);return b}
|
|
294
294
|
function Gi(a){for(var b=[],c=new Uint8Array(0),d=a.i.length-1;0<=d;d--){c=Nc(a.i[d],c);var e=Fi(c);e&&(b.unshift({cueTime:e.pts?e.pts/9E4:null,data:e.data,frames:Ci(e.data),dts:e.dts,pts:e.pts}),c=new Uint8Array(0))}return b}Di.prototype.getStartTime=function(){return{audio:this.h,video:this.m}};function Ei(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}K("shaka.util.TsParser",Di);function Hi(a,b,c){this.g=null;this.i=-1;this.j=a;this.h=b;this.l=c;"undefined"===typeof libDPIModule&&Xa("Could not Find LCEVC Library dependencies on this page");"undefined"===typeof LcevcDil?Xa("Could not Find LCEVC Library on this page"):LcevcDil.SupportObject.SupportStatus||Xa(LcevcDil.SupportObject.SupportError);"undefined"!==typeof LcevcDil&&"undefined"!==typeof libDPIModule&&this.h instanceof HTMLCanvasElement&&LcevcDil.SupportObject.SupportStatus&&!this.g&&LcevcDil.SupportObject.webGLSupport(this.h)&&
|
|
295
|
-
(this.h.classList.remove("shaka-hidden"),this.g=new LcevcDil.LcevcDil(this.j,this.h,this.l))}Hi.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Ii(a,b){var c=Ji;switch(b.mimeType){case "video/webm":c=Ki;break;case "video/mp4":c=Li}a.g&&(a.i=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(c))}K("shaka.lcevc.Dil",Hi);Hi.prototype.release=Hi.prototype.release;var Ji=0,Ki=1,Li=2;function Mi(a,b,c,d){var e=this;this.l=a;this.G=null;this.m=b;this.h={};this.L={};this.P={};this.g=null;this.H=!1;this.V=c||function(){};this.F=d||null;this.i={};this.u=new lf;this.o={};this.s=null;this.J=new kc;this.M="";this.j=Ni(this,this.J);this.D=new jf(function(){return Oi(e)});this.A=!1;this.W=new kc}function Ni(a,b){var c=new MediaSource;a.u.
|
|
295
|
+
(this.h.classList.remove("shaka-hidden"),this.g=new LcevcDil.LcevcDil(this.j,this.h,this.l))}Hi.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Ii(a,b){var c=Ji;switch(b.mimeType){case "video/webm":c=Ki;break;case "video/mp4":c=Li}a.g&&(a.i=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(c))}K("shaka.lcevc.Dil",Hi);Hi.prototype.release=Hi.prototype.release;var Ji=0,Ki=1,Li=2;function Mi(a,b,c,d){var e=this;this.l=a;this.G=null;this.m=b;this.h={};this.L={};this.P={};this.g=null;this.H=!1;this.V=c||function(){};this.F=d||null;this.i={};this.u=new lf;this.o={};this.s=null;this.J=new kc;this.M="";this.j=Ni(this,this.J);this.D=new jf(function(){return Oi(e)});this.A=!1;this.W=new kc}function Ni(a,b){var c=new MediaSource;a.u.ca(c,"sourceopen",function(){URL.revokeObjectURL(a.M);b.resolve()});a.M=Pi(c);a.l.src=a.M;return c}r=Mi.prototype;r.destroy=function(){return this.D.destroy()};
|
|
296
296
|
function Oi(a){var b,c,d,e,f,g,h,k;return G(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p.catch(bc)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new O(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.o)b.push(a.o[k].destroy());return u(l,Promise.all(b),2)}a.u&&(a.u.release(),a.u=null);a.l&&(a.l.removeAttribute("src"),a.l.load(),a.l=null);a.G=null;a.j=null;a.g=null;a.m=null;a.h={};a.o={};a.s=null;
|
|
297
297
|
a.i={};a.F=null;A(l)})}
|
|
298
298
|
r.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,p;return G(function(n){if(1==n.g)return e=jc,u(n,d.J,2);d.A=c;f={};g=t(a.keys());for(h=g.next();!h.done;f={oa:f.oa},h=g.next())if(f.oa=h.value,k=a.get(f.oa),l=Yc(k.mimeType,k.codecs),f.oa==e.X)Qi(d,l,c,k.external);else{!b&&db(l)||!Sc(l,f.oa)||(d.o[f.oa]=new Rc(l),l=Vc(f.oa,l));m=l+d.G.sourceBufferExtraFeatures;kf(d.D);p=void 0;try{p=d.j.addSourceBuffer(m)}catch(q){throw new O(2,3,3015,q,"The mediaSource_ status was"+d.j.readyState+
|
|
@@ -317,9 +317,9 @@ U.prototype.getSeekRangeEnd=U.prototype.Na;U.prototype.getSeekRangeStart=U.proto
|
|
|
317
317
|
U.prototype.lockStartTime=U.prototype.Od;U.prototype.notifySegments=U.prototype.Jb;U.prototype.getDelay=U.prototype.Ef;U.prototype.setDelay=U.prototype.Xe;U.prototype.setSegmentAvailabilityDuration=U.prototype.oe;U.prototype.setStatic=U.prototype.zc;U.prototype.setClockOffset=U.prototype.We;U.prototype.getPresentationStartTime=U.prototype.Qf;U.prototype.setDuration=U.prototype.Aa;U.prototype.setPresentationStartTime=U.prototype.Ye;U.prototype.getMaxSegmentDuration=U.prototype.Lf;
|
|
318
318
|
U.prototype.getDuration=U.prototype.getDuration;function nj(a,b,c){this.l=c;this.j=a;this.s=oj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}nj.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function pj(a,b){a.i=b}function qj(a){this.g=a}function oj(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(xi(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 rj(a,b,c,d,e){var f=this;this.s=e;this.g=a;this.u=b;this.F=c;this.l=new lf;this.j=!1;this.D=a.readyState;this.A=this.i=0;this.h=d;this.o=!1;this.l.C(a,"waiting",function(){return sj(f)});this.m=(new P(function(){sj(f)})).Ca(.25)}rj.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.u=this.s=null};rj.prototype.Yd=function(){this.o=!0;sj(this)};
|
|
319
319
|
function sj(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.D&&(a.D=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=oj(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.u&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.l(new S("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=yi(c,b,a.F.gapDetectionThreshold),null==
|
|
320
|
-
d||0==d&&!a.o||(e=c.start(d),e>=a.u.Na()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.A++,a.s(new S("gapjumped")))))}}};function tj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=uj.value().get(b),c.
|
|
321
|
-
function xj(a,b){.001>Math.abs(a.g.currentTime-b)?Bj(a):(a.h.
|
|
322
|
-
function Aj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ca(.1)};function Cj(a){this.g=a;this.j=!1;this.h=null;this.i=new lf}r=Cj.prototype;r.Bd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.
|
|
320
|
+
d||0==d&&!a.o||(e=c.start(d),e>=a.u.Na()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.A++,a.s(new S("gapjumped")))))}}};function tj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=uj.value().get(b),c.ca(a,b,d))}var uj=new lc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function vj(a,b,c,d){var e=this;this.g=a;this.l=b;this.o=c;this.j=d;this.m=!1;this.h=new lf;this.i=new wj(a);tj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){xj(e,e.j)})}vj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function yj(a){return a.m?a.g.currentTime:a.j}function zj(a,b){0<a.g.readyState?Aj(a.i,b):tj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){xj(a,a.j)})}
|
|
321
|
+
function xj(a,b){.001>Math.abs(a.g.currentTime-b)?Bj(a):(a.h.ca(a.g,"seeking",function(){Bj(a)}),Aj(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Bj(a){a.m=!0;a.h.C(a.g,"seeking",function(){return a.l()});a.o(a.g.currentTime)}function wj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new P(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}wj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
|
|
322
|
+
function Aj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ca(.1)};function Cj(a){this.g=a;this.j=!1;this.h=null;this.i=new lf}r=Cj.prototype;r.Bd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.ca(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;tj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.Cd=function(a){this.h=this.j?this.h:a};r.Jc=function(){return(this.j?this.g.currentTime:this.h)||0};r.ve=function(){return 0};
|
|
323
323
|
r.ue=function(){return 0};r.Pe=function(){};
|
|
324
324
|
function Dj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.A=b.minBufferTime||0;this.l=c;this.u=e;this.s=null;this.o=Ej(a,c,f);this.j=new rj(a,b.presentationTimeline,c,this.o,f);this.h=new vj(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=yj(g.h);h=Fj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;zj(g.h,h);h=void 0;break a}g.u();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},Gj(this,d));this.m=new P(function(){if(0!=g.i.readyState&&
|
|
325
325
|
!g.i.paused){var h=yj(g.h),k=g.g.Eb(),l=g.g.Na();3>l-k&&(k=l-3);h<k&&(h=Fj(g,h),g.i.currentTime=h)}})}r=Dj.prototype;r.Bd=function(){this.m.Ca(.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.u=function(){}};r.Cd=function(a){zj(this.h,a)};r.Jc=function(){var a=yj(this.h);return 0<this.i.readyState&&!this.i.paused?Hj(this,a):a};r.ve=function(){return this.o?this.o.o:0};
|
|
@@ -417,11 +417,11 @@ minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth
|
|
|
417
417
|
function Gl(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return xl(a,b,c||El(),d,"")}
|
|
418
418
|
function Fl(a,b){var c=a.filter(function(g){return"variant"==g.type}),d=[],e=ud(b,c.map(function(g){return g.language}));e&&(d=c.filter(function(g){return nd(g.language)==e}));0==d.length&&(d=c.filter(function(g){return g.primary}));0==d.length&&(c.map(function(g){return g.language}),d=c);var f=d.filter(function(g){return g.height&&480>=g.height});f.length&&(f.sort(function(g,h){return h.height-g.height}),d=f.filter(function(g){return g.height==f[0].height}));b=[];d.length&&(c=Math.floor(d.length/
|
|
419
419
|
2),d.sort(function(g,h){return g.bandwidth-h.bandwidth}),b.push(d[c]));a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,d.type!=ic&&"image"!=d.type||b.push(d);return b}K("shaka.util.PlayerConfiguration",Dl);Dl.mergeConfigObjects=Gl;Dl.createDefault=El;function Hl(){this.g=null;this.h=[]}function Il(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function Jl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}
|
|
420
|
-
function Kl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Ll(){this.i=this.h=null;this.g=[]}function Ml(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Nl(){this.u=this.A=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.M=this.P=this.H=this.J=this.L=this.l=this.o=NaN;this.g=new Hl;this.h=new Ll};function V(a,b){Te.call(this);var c=this;this.l=Ol;this.Vc=this.g=null;this.
|
|
421
|
-
this.dc=this.h.preferredTextRole;this.ac=this.h.preferForcedSubs;this.$b=[];this.hc=null;b&&b(this);this.D=Ql(this);this.D.le(this.h.streaming.forceHTTPS);this.F=null;Rl&&(this.F=Rl());this.Yc.C(window,"online",function(){c.ee()});this.P={name:"detach"};this.W={name:"attach"};this.
|
|
422
|
-
var d=new Map;d.set(this.W,function(e,f){return Oe(Sl(c,e,f))});d.set(this.P,function(e){e.mediaElement&&(c.Yb.ob(),e.mediaElement=null);c.F&&c.F.release();c.g=null;e=Promise.resolve();return Oe(e)});d.set(this.
|
|
423
|
-
function(e,f){e=Zl(c,e,f);return Oe(e)});d.set(this.zb,function(e,f){return $l(c,e,f)});this.Ga=new Gk(this.P,{Nf:function(e,f,g,h){var k=null;e==c.P&&(k=g==c.P?c.P:c.W);e==c.W&&(k=g==c.P||f.mediaElement!=h.mediaElement?c.P:g==c.W?c.W:g==c.xb||g==c.ba?c.xb:g==c.zb?c.fe:null);e==c.xb&&(k=g==c.ba&&f.mediaElement==h.mediaElement?c.ae:c.
|
|
424
|
-
c.zb:c.
|
|
420
|
+
function Kl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Ll(){this.i=this.h=null;this.g=[]}function Ml(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Nl(){this.u=this.A=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.M=this.P=this.H=this.J=this.L=this.l=this.o=NaN;this.g=new Hl;this.h=new Ll};function V(a,b){Te.call(this);var c=this;this.l=Ol;this.Vc=this.g=null;this.da=!1;this.Yc=new lf;this.Yb=new lf;this.u=new lf;this.Ob=this.i=this.Zc=this.J=this.j=this.ka=this.L=this.df=this.V=this.Fa=this.M=this.Wc=this.H=this.yb=this.A=this.G=this.m=this.D=null;this.ec=!1;this.Pd=this.s=null;this.$d=1E9;this.h=Pl(this);this.fc={width:Infinity,height:Infinity};this.o=null;this.vb=new ze(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.wb=this.h.preferredTextLanguage;
|
|
421
|
+
this.dc=this.h.preferredTextRole;this.ac=this.h.preferForcedSubs;this.$b=[];this.hc=null;b&&b(this);this.D=Ql(this);this.D.le(this.h.streaming.forceHTTPS);this.F=null;Rl&&(this.F=Rl());this.Yc.C(window,"online",function(){c.ee()});this.P={name:"detach"};this.W={name:"attach"};this.fa={name:"unload"};this.ae={name:"manifest-parser"};this.Zd={name:"manifest"};this.xb={name:"media-source"};this.Sd={name:"drm-engine"};this.ba={name:"load"};this.fe={name:"src-equals-drm-engine"};this.zb={name:"src-equals"};
|
|
422
|
+
var d=new Map;d.set(this.W,function(e,f){return Oe(Sl(c,e,f))});d.set(this.P,function(e){e.mediaElement&&(c.Yb.ob(),e.mediaElement=null);c.F&&c.F.release();c.g=null;e=Promise.resolve();return Oe(e)});d.set(this.fa,function(e){return Oe(Tl(c,e))});d.set(this.xb,function(e){e=Ul(c,e);return Oe(e)});d.set(this.ae,function(e,f){e=Vl(c,e,f);return Oe(e)});d.set(this.Zd,function(e){return Wl(c,e)});d.set(this.Sd,function(e){e=Xl(c,e);return Oe(e)});d.set(this.ba,function(e,f){return Oe(Yl(c,e,f))});d.set(this.fe,
|
|
423
|
+
function(e,f){e=Zl(c,e,f);return Oe(e)});d.set(this.zb,function(e,f){return $l(c,e,f)});this.Ga=new Gk(this.P,{Nf:function(e,f,g,h){var k=null;e==c.P&&(k=g==c.P?c.P:c.W);e==c.W&&(k=g==c.P||f.mediaElement!=h.mediaElement?c.P:g==c.W?c.W:g==c.xb||g==c.ba?c.xb:g==c.zb?c.fe:null);e==c.xb&&(k=g==c.ba&&f.mediaElement==h.mediaElement?c.ae:c.fa);e==c.ae&&(k=am(c.ba,c.Zd,c.fa,g,f,h));e==c.Zd&&(k=am(c.ba,c.Sd,c.fa,g,f,h));e==c.Sd&&(k=am(c.ba,c.ba,c.fa,g,f,h));e==c.fe&&(k=g==c.zb&&f.mediaElement==h.mediaElement?
|
|
424
|
+
c.zb:c.fa);if(e==c.ba||e==c.zb)k=c.fa;e==c.fa&&(k=h.mediaElement&&f.mediaElement==h.mediaElement?c.W:c.P);return k},zf:function(e,f,g){c.dispatchEvent(bm("onstatechange",(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return G(function(f){return 1==f.g?u(f,Tl(c,e),2):f.return(e.mediaElement?c.W:c.P)})},gg:function(e){c.dispatchEvent(bm("onstateidle",(new Map).set("state",e.name)))}});this.bf=new P(function(){Kd(c.i.variants,c.h.restrictions,c.fc)&&cm(c)});a&&this.Zb(a,
|
|
425
425
|
!0)}qa(V,Te);function dm(a){null!=a.L&&(a.L.release(),a.L=null)}function em(a,b){if(b.lcevc.enabled){var c=a.Ya();c&&c[0]&&c[0].videoMimeType==fm.ts&&(qc()||navigator.userAgent.match(/Edge\//))&&(b.streaming.forceTransmux||Xa("LCEVC Warning: For MPEG-2 TS decoding the config.streaming.forceTransmux must be enabled."));dm(a);null==a.L&&(a.L=new Hi(a.g,a.df,b.lcevc),a.G&&(a.G.F=a.L))}else dm(a)}function bm(a,b){return new S(a,b)}r=V.prototype;
|
|
426
426
|
r.destroy=function(){var a=this,b;return G(function(c){switch(c.g){case 1:if(a.l==gm)return c.return();dm(a);a.l=gm;b=Lk(a.Ga,function(){return{node:a.P,payload:Hk(),hb:!1}});return u(c,new Promise(function(d){b.Kb=function(){};b.cd=function(){d()};b.nb=function(){d()};b.onError=function(){d()};b.ed=function(){d()}}),2);case 2:return u(c,a.Ga.destroy(),3);case 3:a.Yc&&(a.Yc.release(),a.Yc=null);a.Yb&&(a.Yb.release(),a.Yb=null);a.u&&(a.u.release(),a.u=null);a.Pd=null;a.h=null;a.o=null;a.Vc=null;a.V=
|
|
427
427
|
null;if(!a.D){c.B(4);break}return u(c,a.D.destroy(),5);case 5:a.D=null;case 4:a.s&&(a.s.release(),a.s=null),Te.prototype.release.call(a),A(c)}})};r.Zb=function(a,b){b=void 0===b?!0:b;if(this.l==gm)return Promise.reject(hm());var c=Hk();c.mediaElement=a;nc()||(b=!1);var d=b?this.xb:this.W;a=Lk(this.Ga,function(){return{node:d,payload:c,hb:!1}});a.Kb=function(){};return im(a)};r.mf=function(a){this.df=a};
|
|
@@ -443,14 +443,14 @@ function Yl(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,v,y,w,x,D,z;return G(function(B){sw
|
|
|
443
443
|
h=a.h.abrFactory;a.s&&a.Pd==h||(a.Pd=h,a.s=h(),"function"!=typeof a.s.setMediaElement&&(qe("AbrManager","Please use an AbrManager with setMediaElement function."),a.s.setMediaElement=function(){}),a.s.configure(a.h.abr));a.vb=new ze(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.wb=a.h.preferredTextLanguage;a.dc=a.h.preferredTextRole;a.ac=a.h.preferForcedSubs;Am(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.s.init(function(E,F,H){a.j&&E!=a.j.l&&
|
|
444
444
|
Bm(a,E,!0,void 0===F?!1:F,void 0===H?0:H)});a.s.setMediaElement(d);wd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Cm(a);a.j.configure(a.h.streaming);a.l=Dm;d.textTracks&&a.u.C(d.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":Em(a,E)}});a.dispatchEvent(bm("streaming"));k=null;(l=a.j.l)||(k=cm(a));m=[];p=l||k;n=t([p.video,p.audio]);for(q=n.next();!q.done;q=n.next())(v=q.value)&&!v.segmentIndex&&
|
|
445
445
|
m.push(v.createSegmentIndex());if(!(0<m.length)){B.B(2);break}return u(B,Promise.all(m),2);case 2:Am(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.A=Fm(a,b.startTime);a.yb=Gm(a,b.gd);y=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Hm(a,y);if(l){B.B(4);break}Bm(a,k,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){B.B(4);break}w=a.A.Jc();return u(B,Im(k,w),6);case 6:x=B.h,a.A.Cd(x);case 4:return a.A.Bd(),D=a.Gb().find(function(E){return E.active}),D||((z=ie(a.i.textStreams,
|
|
446
|
-
a.wb,a.dc,a.ac)[0]||null)&&Ml(a.o.h,z,!0),k&&(z?(k.audio&&Jm(a,k.audio,z)&&(a.
|
|
446
|
+
a.wb,a.dc,a.ac)[0]||null)&&Ml(a.o.h,z,!0),k&&(z?(k.audio&&Jm(a,k.audio,z)&&(a.da=!0),a.da&&a.G.m.setTextVisibility(!0),Km(a)):a.da=!1),z&&(a.h.streaming.alwaysStreamText||a.Jd())&&pk(a.j,z)),u(B,a.j.start(),7);case 7:a.h.abr.enabled&&(a.s.enable(),Lm(a)),Nd(a.j?a.j.l:null,a.i),Mm(a.i),Nm(a),Om(a),a.i.variants.some(function(E){return E.primary}),a.ec=!0,a.u.ca(d,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.gd}),A(B)}})}
|
|
447
447
|
function Zl(a,b,c){var d,e,f,g,h,k,l;return G(function(m){return 1==m.g?(d=jc,e=Date.now()/1E3,f=!0,a.m=vm(a,{lb:a.D,onError:function(p){mm(a,p)},dd:function(p){wm(a,p)},onExpirationUpdated:function(p,n){xm(a,p,n)},onEvent:function(p){a.dispatchEvent(p);"drmsessionupdate"==p.type&&f&&(f=!1,a.o.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=Tg(g),k=fm[h],"application/x-mpegurl"==k&&vc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
|
|
448
448
|
primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?bd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.va,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,
|
|
449
449
|
decodingInfos:[]},a.m.W=!0,u(m,lg(a.m,[l],[]),2)):u(m,a.m.Zb(b.mediaElement),0)})}
|
|
450
450
|
function $l(a,b,c){function d(){return ym(a)}b.uri=c.uri;b.startTime=c.startTime;a.Ob=b.uri;var e=b.mediaElement;a.A=new Cj(e);var f=!1;a.$b.push(function(){f=!0});null!=b.startTime&&a.A.Cd(b.startTime);a.H=new Oj({Uc:function(){return e.playbackRate},Qc:function(){return e.defaultPlaybackRate},ne:function(k){e.playbackRate=k},Oe:function(k){e.currentTime+=k}});Hm(a,a.h.streaming.rebufferingGoal);a.u.C(e,"playing",d);a.u.C(e,"pause",d);a.u.C(e,"ended",d);a.u.C(e,"ratechange",function(){return zm(a)});
|
|
451
|
-
"none"!=e.preload&&a.u.
|
|
452
|
-
a.u.C(e.textTracks,"change",function(){return Nm(a)}));var g=Tg(b.uri);e.src=ol(a.V,b.uri,fm[g]);(tc()||sc("Web0S"))&&e.load();a.l=Qm;a.dispatchEvent(bm("streaming"));var h=new kc;tj(e,HTMLMediaElement.HAVE_METADATA,a.u,function(){a.A.Bd();h.resolve()});tj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.u,function(){var k;return G(function(l){if(1==l.g)return Rm(a),k=Sm(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.
|
|
453
|
-
m);(new P(m)).O(1)}),2);if(f)return l.return();Tm(a);A(l)})});e.error?h.reject(lm(a)):"none"==e.preload&&(Xa('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.u.
|
|
451
|
+
"none"!=e.preload&&a.u.ca(e,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.gd});e.audioTracks&&(a.u.C(e.audioTracks,"addtrack",function(){return Nm(a)}),a.u.C(e.audioTracks,"removetrack",function(){return Nm(a)}),a.u.C(e.audioTracks,"change",function(){return Nm(a)}));e.textTracks&&(a.u.C(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Pm(a,k);break;case "chapters":Em(a,k);break;default:Nm(a)}}),a.u.C(e.textTracks,"removetrack",function(){return Nm(a)}),
|
|
452
|
+
a.u.C(e.textTracks,"change",function(){return Nm(a)}));var g=Tg(b.uri);e.src=ol(a.V,b.uri,fm[g]);(tc()||sc("Web0S"))&&e.load();a.l=Qm;a.dispatchEvent(bm("streaming"));var h=new kc;tj(e,HTMLMediaElement.HAVE_METADATA,a.u,function(){a.A.Bd();h.resolve()});tj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.u,function(){var k;return G(function(l){if(1==l.g)return Rm(a),k=Sm(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.da=!0),l.B(2)):u(l,new Promise(function(m){a.u.ca(e.textTracks,"change",
|
|
453
|
+
m);(new P(m)).O(1)}),2);if(f)return l.return();Tm(a);A(l)})});e.error?h.reject(lm(a)):"none"==e.preload&&(Xa('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.u.ca(e,"error",function(){h.reject(lm(a))});return(new Ke(h,function(){h.reject(new O(2,7,7001));return Promise.resolve()})).Z(function(){a.ec=
|
|
454
454
|
!0})}function Rm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.ie(b);var c=a.h.preferredVariantRole;""!=c&&a.ie(b,c)}}function Tm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.je(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.je(b,d,c)}}
|
|
455
455
|
function Pm(a,b){if("metadata"==b.kind){b.mode="hidden";a.u.C(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Um(a,e.startTime,e.endTime,e.type,e.value),a.F)a.F.onCueMetadataChange(e.value)});var c=(new P(function(){var d=Vm(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Nb().O(.5);a.$b.push(function(){c.stop()})}}
|
|
456
456
|
function pm(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())Um(a,f,g,"org.id3",k.value);if(a.F)a.F.onHlsTimedMetadata(e,f)}}function Um(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(bm("metadata",b))}
|
|
@@ -474,17 +474,17 @@ r.Ya=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=t(this.i.va
|
|
|
474
474
|
r.Gb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=$d(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Sm(this).map(function(f){return de(f)}):[]};r.Gf=function(){return this.i?this.i.imageStreams.map(function(a){return ae(a)}):[]};
|
|
475
475
|
r.Uf=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,q,v,y,w,x,D,z,B,E,F;return G(function(H){if(1==H.g)return c.i?(d=c.i.imageStreams.find(function(I){return I.id==a}))?d.segmentIndex?H.B(3):u(H,d.createSegmentIndex(),3):H.return(null):H.B(2);if(2!=H.g){e=d.segmentIndex.find(b);if(null==e)return H.return(null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return H.return(null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);p=parseInt(h[2],10);n=k/m;q=l/p;v=m*p;
|
|
476
476
|
y=f.l-f.startTime;w=f.s||y/v;x=f.startTime;z=D=0;1<v&&(B=Math.floor((b-f.startTime)/w),x=f.startTime+B*w,D=B%m*n,z=Math.floor(B/m)*q);E=!1;if(F=f.o)E=!0,q=F.height,D=F.positionX,z=F.positionY,n=F.width;return H.return({imageHeight:l,imageWidth:k,height:q,positionX:D,positionY:z,startTime:x,duration:w,uris:f.ya(),width:n,sprite:E})}return H.return(null)})};
|
|
477
|
-
r.Te=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(Ml(this.o.h,b,!1),pk(this.j,b),$m(this),this.wb=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Sm(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,be(c)==a.id?c.mode=this.
|
|
477
|
+
r.Te=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(Ml(this.o.h,b,!1),pk(this.j,b),$m(this),this.wb=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Sm(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,be(c)==a.id?c.mode=this.da?"showing":"hidden":c.mode="disabled";$m(this)}};
|
|
478
478
|
r.Ue=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&&Xa("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&&ge(d)&&(Bm(this,d,!1,b,c),this.vb=new ye(d),Om(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
|
|
479
479
|
be(c)==a.id){an(this,c);break}};r.Bf=function(){return bn(this.Ya())};r.Sf=function(){return bn(this.Gb())};r.Af=function(){return Array.from(cn(this.Ya()))};r.Rf=function(){return Array.from(cn(this.Gb()))};
|
|
480
480
|
r.ie=function(a,b,c){c=void 0===c?0:c;if(this.i&&this.A){this.vb=new ze(a,b||"",c,"");b=function(h,k){return h.video||k.video?h.video&&k.video?Math.abs((h.video.height||0)-(k.video.height||0))+Math.abs((h.video.width||0)-(k.video.width||0)):Infinity:0};a=this.j.l;var d=this.vb.create(this.i.variants);c=null;d=t(d.values());for(var e=d.next();!e.done;e=d.next())if(e=e.value,!c||b(c,a)>b(e,a))c=e;c?(b=Zd(c),this.Ue(b,!0)):Zm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);
|
|
481
481
|
a=nd(a);d=c=null;e=t(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=fe(f);nd(g.language)==a&&(c=f,b?g.roles.includes(b)&&(d=f):0==g.roles.length&&(d=f))}d?an(this,d):c&&an(this,c)}};
|
|
482
482
|
r.je=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.A){if(this.wb=a,this.dc=b||"",this.ac=c,(a=ie(this.i.textStreams,this.wb,this.dc,this.ac)[0]||null)&&a!=this.j.o&&(Ml(this.o.h,a,!1),this.h.streaming.alwaysStreamText||this.Jd()))pk(this.j,a),$m(this)}else{var d=nd(a);(a=this.Gb().find(function(e){return nd(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Te(a)}};
|
|
483
483
|
r.vg=function(a){if(this.i&&this.A){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.vb=new ze(b.language,"",0,a),Zm(this))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&an(this,b)}};
|
|
484
|
-
r.Jd=function(){var a=this.
|
|
484
|
+
r.Jd=function(){var a=this.da;return this.G?this.G.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Sm(this).some(function(b){return"showing"==b.mode}):a};r.Ie=function(){return this.g&&this.g.src&&this.g.textTracks?dn(this).map(function(a){return de(a)}):[]};
|
|
485
485
|
r.Df=function(a){var b=nd(a),c=dn(this).filter(function(h){return nd(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
|
|
486
486
|
function Sm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Vm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function dn(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
487
|
-
r.Ag=function(a){a=!!a;if(this.
|
|
487
|
+
r.Ag=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==Dm)this.G.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=ie(this.i.textStreams,this.wb,this.dc,this.ac),0<a.length&&(pk(this.j,a[0]),$m(this))):lk(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Sm(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Km(this)}};
|
|
488
488
|
r.Pf=function(){if(!this.T())return null;var a=this.Ga.l,b=0;if(this.A)b=this.A.Jc();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.i+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
|
|
489
489
|
r.Je=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};r.Ma=function(){if(this.l==Dm)return this.G.Ma();var a={total:[],audio:[],video:[],text:[]};this.l==Qm&&(a.total=xi(this.g.buffered));return a};
|
|
490
490
|
r.getStats=function(){if(this.l!=Dm&&this.l!=Qm)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};ym(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.o;b=
|
|
@@ -497,7 +497,7 @@ emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:n
|
|
|
497
497
|
r.kf=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,q,v,y,w,x,D;return G(function(z){switch(z.g){case 1:if(c.l!=Dm&&c.l!=Qm)throw new O(1,7,7004);if(c.l==Qm)throw new O(1,2,2016);if(b){z.B(2);break}return u(z,en(c,a),3);case 3:b=z.h;case 2:if("text/vtt"!=b)throw new O(1,2,2017,a);d=jc;e=c.i.presentationTimeline.getDuration();if(Infinity==e)throw new O(1,4,4045);return u(z,gn(c,a,c.D,c.h.streaming.retryParameters),4);case 4:f=z.h;g=ed[b];if(!g)throw new O(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,
|
|
498
498
|
segmentEnd:e,vttOffset:0};l=L(f);m=h.parseMedia(l,k);p=[];n={};q=t(m);for(v=q.next();!v.done;n={Sb:n.Sb},v=q.next())y=v.value,n.Sb=dc([a],[y.payload])[0],w=new T(y.startTime,y.endTime,function(B){return function(){return[B.Sb]}}(n),0,null,null,0,0,Infinity),n.Sb.includes("#xywh")&&(x=n.Sb.split("#xywh=")[1].split(","),4===x.length&&w.Ze({height:parseInt(x[3],10),positionX:parseInt(x[0],10),positionY:parseInt(x[1],10),width:parseInt(x[2],10)})),p.push(w);D={id:c.$d++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
499
499
|
segmentIndex:new Jj(p),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Xb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",external:!0};c.i.imageStreams.push(D);Nm(c);return z.return(ae(D))}})};
|
|
500
|
-
r.hf=function(a,b,c){var d=this,e,f,g,h;return G(function(k){switch(k.g){case 1:if(d.l!=Dm&&d.l!=Qm)throw new O(1,7,7004);if(c){k.B(2);break}return u(k,en(d,a),3);case 3:c=k.h;case 2:e=[];if(d.F)try{e=d.F.getServerSideCuePoints()}catch(l){}return u(k,fn(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Ie();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return u(k,new Promise(function(l,m){d.u.
|
|
500
|
+
r.hf=function(a,b,c){var d=this,e,f,g,h;return G(function(k){switch(k.g){case 1:if(d.l!=Dm&&d.l!=Qm)throw new O(1,7,7004);if(c){k.B(2);break}return u(k,en(d,a),3);case 3:c=k.h;case 2:e=[];if(d.F)try{e=d.F.getServerSideCuePoints()}catch(l){}return u(k,fn(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Ie();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return u(k,new Promise(function(l,m){d.u.ca(f,"load",l);d.u.ca(f,"error",function(){m(new O(1,2,2015))})}),6);case 6:return k.return(h);
|
|
501
501
|
case 5:throw new O(1,2,2012);}})};function en(a,b){var c,d;return G(function(e){switch(e.g){case 1:c=Tg(b);if(d=jn[c])return e.return(d);C(e,2);return u(e,Vg(b,a.D,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:wa(e);case 3:if(d)return e.return(d);throw new O(1,2,2011,c);}})}
|
|
502
502
|
function fn(a,b,c,d,e,f,g){var h,k,l,m;return G(function(p){if(1==p.g)return"text/vtt"!=e||g.length?u(p,gn(a,b,a.D,a.h.streaming.retryParameters),3):p.B(2);2!=p.g&&(h=p.h,k=hn(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Pi(l),e="text/vtt");m=document.createElement("track");var n=a.V,q=b;try{if(n.g.enabled){var v=pl(n);v.ot=vl;v.su=!0;var y=rl(v);var w=sl(q,y)}else w=q}catch(x){Ya("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",x),w=q}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
|
|
503
503
|
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p.return(m)})}function gn(a,b,c,d){var e,f,g;return G(function(h){if(1==h.g){e=hf;f=bf([b],d);f.method="GET";var k=a.V;try{k.g.enabled&&nl(k,f,{ot:vl,su:!0})}catch(l){Ya("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
@@ -532,18 +532,18 @@ V.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return G(function(h
|
|
|
532
532
|
nc()?!!Ug[n]:oc(l[n]);c=k;n='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",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(ia(Yi));
|
|
533
533
|
k={};n=t(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=nc()?dd(l)?!0:db(l)||Sc(l):oc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=qn;for(g in f)e[g]=f[g]();return h.return(e)})};
|
|
534
534
|
V.isBrowserSupported=function(){window.Promise||Xa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||sc("Trident/"))return!1;var a=xc();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:nc()?!0:oc("application/x-mpegurl")};V.setAdManagerFactory=function(a){Rl=a};
|
|
535
|
-
V.registerSupportPlugin=function(a,b){qn[a]=b};V.prototype.destroy=V.prototype.destroy;var gm=0,Ol=1,Dm=2,Qm=3;V.LoadMode={DESTROYED:gm,NOT_LOADED:Ol,MEDIA_SOURCE:Dm,SRC_EQUALS:Qm};V.version="v4.3.
|
|
535
|
+
V.registerSupportPlugin=function(a,b){qn[a]=b};V.prototype.destroy=V.prototype.destroy;var gm=0,Ol=1,Dm=2,Qm=3;V.LoadMode={DESTROYED:gm,NOT_LOADED:Ol,MEDIA_SOURCE:Dm,SRC_EQUALS:Qm};V.version="v4.3.10";var rn=["4","3"];re=new function(a){this.g=a;this.i=se;this.h=te}(new pe(Number(rn[0]),Number(rn[1])));
|
|
536
536
|
var pn=["output-restricted","internal-error"],qn={},Rl=null,fm={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},jn={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
537
537
|
ssa:"text/x-ssa",ass:"text/x-ssa"};function sn(){this.h=[];this.j=this.i=this.g=0};function W(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new lf;this.j.C(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.C(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=W.prototype;r.getDuration=function(){return this.h.getDuration()};r.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.g.getRemainingTime()};r.isPaused=function(){return this.i};
|
|
538
538
|
r.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.g.getAdSkippableState()};r.skip=function(){return this.g.skip()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.resume()};r.getVolume=function(){return this.g.getVolume()};r.setVolume=function(a){return this.g.setVolume(a)};r.isMuted=function(){return 0==this.g.getVolume()};
|
|
539
539
|
r.isLinear=function(){return this.h.isLinear()};r.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.g.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};r.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};
|
|
540
540
|
r.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.h.getTitle()};r.getDescription=function(){return this.h.getDescription()};r.release=function(){this.g=this.h=null};K("shaka.ads.ClientSideAd",W);W.prototype.release=W.prototype.release;W.prototype.getDescription=W.prototype.getDescription;W.prototype.getTitle=W.prototype.getTitle;W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;
|
|
541
541
|
W.prototype.getSequenceLength=W.prototype.getSequenceLength;W.prototype.setMuted=W.prototype.setMuted;W.prototype.resize=W.prototype.resize;W.prototype.isLinear=W.prototype.isLinear;W.prototype.isMuted=W.prototype.isMuted;W.prototype.setVolume=W.prototype.setVolume;W.prototype.getVolume=W.prototype.getVolume;W.prototype.play=W.prototype.play;W.prototype.pause=W.prototype.pause;W.prototype.skip=W.prototype.skip;W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;
|
|
542
|
-
W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function tn(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.
|
|
543
|
-
function(f){vn(e,f)});this.h.C(this.i,"ended",function(){e.m.contentComplete()})}tn.prototype.stop=function(){this.g&&this.g.stop();this.o&&Tk(this.o)};tn.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function vn(a,b){b.getError();wn(a,null);a.l(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
544
|
-
function un(a,b){a.l(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.
|
|
545
|
-
function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,yn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,yn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)):a.h.C(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,yn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.h.
|
|
546
|
-
null)}}function yn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
542
|
+
W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function tn(a,b,c,d){var e=this;this.o=a;this.i=b;this.u=!1;this.s=null;this.A=NaN;this.l=d;this.j=null;this.h=new lf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.3.10");this.g=null;this.h.ca(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){un(e,f)});this.h.C(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
543
|
+
function(f){vn(e,f)});this.h.C(this.i,"ended",function(){e.m.contentComplete()});this.h.ca(this.i,"play",function(){e.u=!0})}tn.prototype.stop=function(){this.g&&this.g.stop();this.o&&Tk(this.o)};tn.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function vn(a,b){b.getError();wn(a,null);a.l(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
544
|
+
function un(a,b){a.l(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.A)));a.g=b.getAdsManager(a.i);a.l(new S("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){b=[];c=t(c);for(var d=c.next();!d.done;d=c.next())b.push({start:d.value,end:null});a.l(new S("ad-cue-points-changed",(new Map).set("cuepoints",b)))}xn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,yn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.C(a.i,"loadeddata",
|
|
545
|
+
function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,yn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,yn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)):a.h.C(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,yn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.u?a.g.start():a.h.ca(a.i,"play",
|
|
546
|
+
function(){a.u=!0;a.g.start()})}catch(e){wn(a,null)}}function yn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
547
547
|
function xn(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new S(d,c))}a.h.C(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){vn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){zn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.STARTED,function(c){zn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.C(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
548
548
|
function(c){b(c,"ad-third-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){wn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){wn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.C(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.C(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
549
549
|
a.h.C(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.C(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.C(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.C(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.C(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.C(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
|
|
@@ -560,10 +560,10 @@ var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.C(this
|
|
|
560
560
|
this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new S("ad-complete"));e.i(new S("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new S("ad-skipped"));e.i(new S("ad-stopped"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.D=
|
|
561
561
|
f;e.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}An.prototype.stop=function(){this.A="";this.o=null;this.D=[]};An.prototype.release=function(){this.stop();this.h&&this.h.release()};An.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
|
|
562
562
|
function Bn(a,b){a.i(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.F||a.h.C(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){Te.call(this);this.g=this.i=null;this.h=new sn;this.j=navigator.language}qa(Y,Te);r=Y.prototype;r.setLocale=function(a){this.j=a};r.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new O(2,10,1E4);this.i&&this.i.release();this.i=new tn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
563
|
-
r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Te.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new S("ad-stopped"));this.h=new sn};r.requestClientSideAds=function(a){if(!this.i)throw new O(1,10,10001);var b=this.i;b.
|
|
563
|
+
r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Te.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new S("ad-stopped"));this.h=new sn};r.requestClientSideAds=function(a){if(!this.i)throw new O(1,10,10001);var b=this.i;b.A=Date.now()/1E3;b.m.requestAds(a)};
|
|
564
564
|
r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new O(2,10,10002);this.g&&this.g.release();this.g=new An(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
|
|
565
|
-
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Xa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.3.
|
|
566
|
-
(c.F=!0),c.j=new kc,c.g.requestStream(a),c.A=b||"",c.G=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Xa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.3.
|
|
565
|
+
r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Xa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.3.10";c=this.g;c.j?a=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
566
|
+
(c.F=!0),c.j=new kc,c.g.requestStream(a),c.A=b||"",c.G=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Xa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.3.10";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new O(1,10,10003);return this.g.D};
|
|
567
567
|
r.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};K("shaka.ads.AdManager",Y);
|
|
568
568
|
Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.getStats=Y.prototype.getStats;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;
|
|
569
569
|
Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.setLocale=Y.prototype.setLocale;Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";
|
|
@@ -624,24 +624,24 @@ function Uo(a){var b=a.getAttribute("schemeIdUri"),c=Pf(a,"urn:mpeg:cenc:2013","
|
|
|
624
624
|
var So=1,To=(new Map).set("com.widevine.alpha",function(a){return(a=Mf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Ro).set("com.microsoft.playready.recommendation",Ro).set("com.microsoft.playready.software",Ro).set("com.microsoft.playready.hardware",Ro).set("org.w3.clearkey",function(a){return(a=Mf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function Vo(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
|
|
625
625
|
window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
|
|
626
626
|
function Wo(a,b){var c=Xo(a,b,"timescale"),d=1;c&&(d=Yf(c)||1);var e=Xo(a,b,"duration");c=Yf(e||"");"image"==a.I.contentType&&(c=$f(e||""));c&&(c/=d);var f=Xo(a,b,"startNumber");e=Number(Xo(a,b,"presentationTimeOffset"))||0;var g=Zf(f||"");if(null==f||null==g)g=1;f=Yo(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.U.duration||Infinity;f=Lf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],p=f[l+1],n=Tf(m,"t",Zf),q=Tf(m,"d",Zf);m=Tf(m,"r",Xf);null!=n&&(n-=e);if(!q)break;n=null!=n?n:k;m=m||0;if(0>
|
|
627
|
-
m)if(p){p=Tf(p,"t",Zf);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/q)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/q)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+q,h.push({start:n/b,end:k/b,Fg:n}),n=k}b=h}return{timescale:d,ja:c,Mb:g,Sa:e/d||0,te:e,timeline:b}}function Xo(a,b,c){return[b(a.I),b(a.
|
|
628
|
-
function Yo(a,b,c){return[b(a.I),b(a.
|
|
627
|
+
m)if(p){p=Tf(p,"t",Zf);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/q)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/q)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+q,h.push({start:n/b,end:k/b,Fg:n}),n=k}b=h}return{timescale:d,ja:c,Mb:g,Sa:e/d||0,te:e,timeline:b}}function Xo(a,b,c){return[b(a.I),b(a.ga),b(a.aa)].filter(cc).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
|
|
628
|
+
function Yo(a,b,c){return[b(a.I),b(a.ga),b(a.aa)].filter(cc).map(function(d){return Kf(d,c)}).reduce(function(d,e){return d||e})}
|
|
629
629
|
function Zo(a,b,c,d,e,f){for(var g=Pf(a,"http://www.w3.org/1999/xlink","href"),h=Pf(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Le(new O(2,4,4028));if("onLoad"!=h)return Le(new O(2,4,4027));var m=dc([d],[g]);return e.request(0,bf(m,b)).Z(function(p){p=dg(p.data,a.tagName);if(!p)return Le(new O(2,4,4001,g));
|
|
630
630
|
for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=t(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return $o(a,b,c,m[0],e,f+1)})}
|
|
631
631
|
function $o(a,b,c,d,e,f){f=void 0===f?0:f;if(Pf(a,"http://www.w3.org/1999/xlink","href")){var g=Zo(a,b,c,d,e,f);c&&(g=g.Z(void 0,function(){return $o(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Pf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push($o(k,b,c,d,e,f)));return Pe(g).Z(function(){return a})};function ap(a,b,c,d,e,f,g){var h,k=(new yf).R("sidx",function(l){h=bp(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new O(2,3,3004);}
|
|
632
|
-
function bp(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.K();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.K();var m=g.reader.K()}else l=g.reader.$a(),m=g.reader.$a();g.reader.skip(2);var p=g.reader.be();a=a+g.size+m;for(m=0;m<p;m++){var n=g.reader.K(),q=(n&2147483648)>>>31;n&=2147483647;var v=g.reader.K();g.reader.skip(4);if(1==q)throw new O(2,3,3006);h.push(new T(l/k+c,(l+v)/k+c,function(){return f},a,a+n-1,b,c,d,e));l+=v;a+=n}g.parser.stop();return h};function cp(a){this.h=Jb(a);this.g=new vf(this.h,0)}cp.prototype.
|
|
632
|
+
function bp(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.K();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.K();var m=g.reader.K()}else l=g.reader.$a(),m=g.reader.$a();g.reader.skip(2);var p=g.reader.be();a=a+g.size+m;for(m=0;m<p;m++){var n=g.reader.K(),q=(n&2147483648)>>>31;n&=2147483647;var v=g.reader.K();g.reader.skip(4);if(1==q)throw new O(2,3,3006);h.push(new T(l/k+c,(l+v)/k+c,function(){return f},a,a+n-1,b,c,d,e));l+=v;a+=n}g.parser.stop();return h};function cp(a){this.h=Jb(a);this.g=new vf(this.h,0)}cp.prototype.ia=function(){return this.g.ia()};
|
|
633
633
|
function dp(a){var b=ep(a);if(7<b.length)throw new O(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=ep(a);a:{d=t(fp);for(var e=d.next();!e.done;e=d.next())if(Fb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.$();else{if(8==b.length&&b[1]&224)throw new O(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.$()+b<=a.h.byteLength?b:a.h.byteLength-a.g.$();d=Jb(a.h,a.g.$(),b);a.g.skip(b);return new gp(c,d)}
|
|
634
634
|
function ep(a){var b=a.g.$(),c=a.g.Ra();if(0==c)throw new O(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return L(a.h,b,c)}var fp=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function gp(a,b){this.id=a;this.g=b}
|
|
635
|
-
function hp(a){if(8<a.g.byteLength)throw new O(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new O(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function ip(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new cp(a.g);for(var p=null,n=null;a.
|
|
636
|
-
function jp(a){var b=new cp(a.g);a=dp(b);if(179!=a.id)throw new O(2,3,3013);a=hp(a);b=dp(b);if(183!=b.id)throw new O(2,3,3012);b=new cp(b.g);for(var c=0;b.
|
|
635
|
+
function hp(a){if(8<a.g.byteLength)throw new O(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new O(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function ip(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new cp(a.g);for(var p=null,n=null;a.ia();){var q=dp(a);if(187==q.id){var v=jp(q);v&&(q=c*v.Gg,v=b+v.pg,null!=p&&m.push(new T(p+g,q+g,l,n,v-1,f,g,h,k)),p=q,n=v)}}null!=p&&m.push(new T(p+g,d+g,l,n,null,f,g,h,k));return m}
|
|
636
|
+
function jp(a){var b=new cp(a.g);a=dp(b);if(179!=a.id)throw new O(2,3,3013);a=hp(a);b=dp(b);if(183!=b.id)throw new O(2,3,3012);b=new cp(b.g);for(var c=0;b.ia();){var d=dp(b);if(241==d.id){c=hp(d);break}}return{Gg:a,pg:c}};function kp(a,b){b=Yo(a,b,"Initialization");if(!b)return null;var c=a.I.wa,d=b.getAttribute("sourceURL");d&&(c=dc(a.I.wa,[d]));d=0;var e=null;if(b=Tf(b,"range",Wf))d=b.start,e=b.end;return new pi(function(){return c},d,e,lp(a))}
|
|
637
637
|
function mp(a,b){var c=Number(Xo(a,np,"presentationTimeOffset"))||0,d=Xo(a,np,"timescale"),e=1;d&&(e=Yf(d)||1);var f=c/e||0,g=kp(a,np);op(a,g);var h=Ve(a);return{Cb:function(){var k=Yo(h,np,"RepresentationIndex");var l=h.I.wa;k&&(k=k.getAttribute("sourceURL"))&&(l=dc(h.I.wa,[k]));k=pp(h);return qp(h,b,g,l,k.start,k.end,f)}}}
|
|
638
638
|
function qp(a,b,c,d,e,f,g){var h,k,l,m,p,n,q,v,y,w,x,D,z,B,E;return G(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.Wa||!a.U.Id,l=a.U.start,m=a.U.duration,p=a.I.mimeType.split("/")[1],n=b,q=null,v=[n(d,e,f),"webm"==p?n(c.ya(),c.Ba,c.ma):null],n=null,u(F,Promise.all(v),2);y=F.h;w=y[0];x=y[1]||null;D=null;z=l-g;B=l;E=m?l+m:Infinity;if("mp4"==p)var H=ap(w,e,d,c,z,B,E);else{H=new cp(x);if(440786851!=dp(H).id)throw new O(2,3,3008);var I=dp(H);if(408125543!=I.id)throw new O(2,3,3009);H=I.g.byteOffset;
|
|
639
|
-
I=new cp(I.g);for(var J=null;I.
|
|
639
|
+
I=new cp(I.g);for(var J=null;I.ia();){var N=dp(I);if(357149030==N.id){J=N;break}}if(!J)throw new O(2,3,3010);J=new cp(J.g);N=1E6;for(I=null;J.ia();){var R=dp(J);if(2807729==R.id)N=hp(R);else if(17545==R.id)if(4==R.g.byteLength)I=R.g.getFloat32(0);else if(8==R.g.byteLength)I=R.g.getFloat64(0);else throw new O(2,3,3003);}if(null==I)throw new O(2,3,3011);J=N/1E9;I*=J;N=dp(new cp(w));if(475249515!=N.id)throw new O(2,3,3007);H=ip(N,H,J,I,d,c,z,B,E)}D=H;h.Jb(D);q=new Jj(D);k&&q.Xa(B,E,!0);return F.return(q)})}
|
|
640
640
|
function np(a){return a.xc}function pp(a){var b=Yo(a,np,"RepresentationIndex");a=Xo(a,np,"indexRange");a=Wf(a||"");b&&(a=Tf(b,"range",Wf,a));return a}function op(a,b){rp(a,b);if(!pp(a))throw new O(2,4,4002);}function rp(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=ic&&"mp4"!=c&&"webm"!=c)throw new O(2,4,4006);if("webm"==c&&!b)throw new O(2,4,4005);}
|
|
641
641
|
function lp(a){var b=a.I;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.bd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function sp(a,b){var c=kp(a,tp),d=up(a);if(!d.ja&&!d.timeline&&1<d.Hb.length)throw new O(2,4,4002);if(!d.ja&&!a.U.duration&&!d.timeline&&1==d.Hb.length)throw new O(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new O(2,4,4002);var e=null,f=null;a.aa.id&&a.I.id&&(f=b[a.aa.id+","+a.I.id])&&(e=f.segmentIndex);var g=vp(a.U.start,a.U.duration,a.I.wa,d,c);b=!e;e?e.Ib(g,a.presentationTimeline.Oa()):e=new Jj(g);a.presentationTimeline.Jb(g);a.Wa&&a.U.Id||e.Xa(a.U.start,a.U.duration?a.U.start+a.U.duration:
|
|
642
642
|
Infinity,b);f&&(f.segmentIndex=e);return{Cb:function(){e&&0!=e.g.length||e.qc(g);return Promise.resolve(e)}}}function tp(a){return a.ab}function up(a){var b=wp(a);a=Wo(a,tp);var c=a.Mb;0==c&&(c=1);var d=0;a.ja?d=a.ja*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ja:a.ja,startTime:d,Mb:c,Sa:a.Sa,timeline:a.timeline,Hb:b}}
|
|
643
643
|
function vp(a,b,c,d,e){var f=d.Hb.length;d.timeline&&d.timeline.length!=d.Hb.length&&(f=Math.min(d.timeline.length,d.Hb.length));for(var g=a-d.Sa,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={qd:m.qd},p++){var n=d.Hb[p];m.qd=dc(c,[n.fg]);var q=void 0;q=null!=d.ja?l+d.ja:d.timeline?d.timeline[p].end:l+b;k.push(new T(a+l,a+q,function(v){return function(){return v.qd}}(m),n.start,n.end,e,g,a,h));l=q}return k}
|
|
644
|
-
function wp(a){return[a.I.ab,a.
|
|
644
|
+
function wp(a){return[a.I.ab,a.ga.ab,a.aa.ab].filter(cc).map(function(b){return Lf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Le&&(a.Le=!0);var c=b.getAttribute("media");b=Tf(b,"mediaRange",Wf,{start:0,end:null});return{fg:c,start:b.start,end:b.end}})};function xp(a,b,c,d,e,f){var g=yp(a),h=zp(a);Ap(h);var k=Ve(a);if(h.pc)return rp(a,g),{Cb:function(){var q=Vo(h.pc,k.I.id,null,k.bandwidth||null,null);q=dc(k.I.wa,[q]);return qp(k,b,g,q,0,null,h.Sa)}};if(h.ja)return d||"image"===a.ga.contentType||(a.presentationTimeline.Ud(h.ja),a.presentationTimeline.Vd(a.U.start)),{Cb:function(){return Bp(k,h,e,g,f)}};var l=null;d=d=null;a.aa.id&&a.I.id&&(d=a.aa.id+","+a.I.id,d=c[d])&&(l=d.segmentIndex);var m=Cp(k,h,g);c=a.U.start;var p=a.U.duration?a.U.start+a.U.duration:
|
|
645
645
|
Infinity,n=!(a.Wa&&a.U.Id);l?(n&&(new Jj(m)).Xa(c,p,!0),l.Ib(m,a.presentationTimeline.Oa())):l=new Jj(m);a.presentationTimeline.Jb(m);n&&l.Xa(c,p);d&&a.Wa&&(d.segmentIndex=l);return{Cb:function(){l&&0!=l.g.length||l.qc(m);return Promise.resolve(l)}}}function Dp(a){return a.yc}function zp(a){var b=Wo(a,Dp),c=Xo(a,Dp,"media");a=Xo(a,Dp,"index");return{ja:b.ja,timescale:b.timescale,Mb:b.Mb,Sa:b.Sa,te:b.te,timeline:b.timeline,Rd:c,pc:a}}
|
|
646
646
|
function Ap(a){var b=a.pc?1:0;b+=a.timeline?1:0;b+=a.ja?1:0;if(0==b)throw new O(2,4,4002);1!=b&&(a.pc&&(a.timeline=null),a.ja=null);if(!a.pc&&!a.Rd)throw new O(2,4,4002);}
|
|
647
647
|
function Bp(a,b,c,d,e){function f(J){var N=(J-q)*n,R=N+b.Sa,Q=N+l;N=Q+n;var ba=Math.min(N,h());Q=new T(Q,ba,function(){var M=Vo(y,x,J,w,R*v);return dc(D,[M])},0,null,d,z,l,h());Q.l=N;return Q}function g(){var J=[Math.max(k.Oa(),l),Math.min(k.gb(),h())].map(function(N){return N-l});return[Math.ceil(J[0]/n),Math.ceil(J[1]/n)-1].map(function(N){return N+q})}function h(){var J=null!=m&&e[m]||p;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.U.start,m=a.aa.id,p=a.U.duration,n=b.ja,q=b.Mb,v=b.timescale,
|
|
@@ -681,7 +681,7 @@ function kq(a){var b,c,d,e,f,g,h;return G(function(k){if(1==k.g)return b=bf(a.m,
|
|
|
681
681
|
function mq(a,b,c){var d,e,f,g,h;return G(function(k){if(1==k.g){d=dg(b,"MPD");if(!d)throw new O(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(nq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=$o(d,a.g.retryParameters,f,c,a.h.networkingEngine);Xe(a.o,g);return u(k,g.promise,2)}h=k.h;return k.return(nq(a,h,c))})}
|
|
682
682
|
function nq(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,v,y,w,x,D,z,B,E,F,H,I,J,N,R,Q,ba,M,ka,Fa,xa,Na;return G(function(Ha){switch(Ha.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Lf(b,"Location").map(Rf).filter(cc);0<f.length&&(g=dc(e,f),e=a.m=g);h=Lf(b,"BaseURL");k=h.map(Rf);l=dc(e,k);m=0;h&&h.length&&(m=Tf(h[0],"availabilityTimeOffset",$f)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=Tf(b,"minBufferTime",Vf)||0);a.F=Tf(b,"minimumUpdatePeriod",Vf,-1);q=Tf(b,"availabilityStartTime",Uf);v=Tf(b,
|
|
683
683
|
"timeShiftBufferDepth",Vf);y=a.g.dash.ignoreSuggestedPresentationDelay;w=null;y||(w=Tf(b,"suggestedPresentationDelay",Vf));x=a.g.dash.ignoreMaxSegmentDuration;D=null;x||(D=Tf(b,"maxSegmentDuration",Vf));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,E=t(Object.values(a.l)),F=E.next();!F.done;F=E.next())H=F.value,H.segmentIndex&&H.segmentIndex.eb(B.Oa());else I=a.g.defaultPresentationDelay||1.5*n,J=null!=w?w:I,B=new U(q,J,a.g.dash.autoCorrectDrift);B.zc("static"==z);(N=B.T())&&
|
|
684
|
-
!isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.oe(v);R=b.getAttribute("profiles")||"";Q={Wa:"static"!=z,presentationTimeline:B,aa:null,U:null,
|
|
684
|
+
!isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.oe(v);R=b.getAttribute("profiles")||"";Q={Wa:"static"!=z,presentationTimeline:B,aa:null,U:null,ga:null,I:null,bandwidth:0,Le:!1,Ab:m,profiles:R.split(",")};ba=oq(a,Q,l,b);M=ba.duration;ka=ba.periods;"static"!=z&&ba.Ee||B.Aa(M||Infinity);a.u&&!a.A&&(Fa=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.A=a.h.isLowLatencyMode());a.A?B.Ve(a.u):a.u&&Xa("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.");
|
|
685
685
|
B.Ud(D||1);return u(Ha,Fp(a.j,ka,Q.Wa),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Ha.B(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:a.g.dash.sequenceMode};if(!B.ef()){Ha.B(4);break}xa=Lf(b,"UTCTiming");return u(Ha,pq(a,l,xa),5);case 5:Na=Ha.h;if(!a.h)return Ha.return();B.We(Na);case 4:B.Od();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),
|
|
686
686
|
A(Ha)}})}
|
|
687
687
|
function oq(a,b,c,d){var e=Tf(d,"mediaPresentationDuration",Vf),f=[],g=0;d=Lf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Tf(k,"start",Vf,g),p=k.id,n=Tf(k,"duration",Vf),q=null;if(l){var v=Tf(l,"start",Vf);null!=v&&(q=v-m)}else null!=e&&(q=e-m);null==q&&(q=n);if(!(null!==a.s&&null!==p&&null!==m&&m<a.s)||a.J.includes(p)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=qq(a,b,c,{start:m,duration:q,node:k,Id:null==q||!l});f.push(g);b.aa.id&&q&&(a.L[b.aa.id]=q);if(null==q){g=
|
|
@@ -690,16 +690,16 @@ function qq(a,b,c,d){b.aa=rq(d.node,null,c);b.U=d;b.aa.Ab=b.Ab;b.aa.id||(b.aa.id
|
|
|
690
690
|
}d=c.filter(function(m){return!m.re});c=c.filter(function(m){return m.re});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.re.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={Hc:h.Hc},l=k.next())h.Hc=l.value,h.Hc.trickModeVideo=e.streams.find(function(m){return function(p){return $c(m.Hc.codecs)==$c(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:uq(d,"audio");g=a.g.disableVideo?[]:uq(d,"video");f=a.g.disableText?
|
|
691
691
|
[]:uq(d,ic);c=a.g.disableThumbnails?[]:uq(d,"image");if(!g.length&&!e.length)throw new O(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.aa.id,Lc:d,jd:e,textStreams:g,imageStreams:f}}
|
|
692
692
|
function uq(a,b){return a.filter(function(c){return c.contentType==b})}
|
|
693
|
-
function tq(a,b,c){function d(F){switch(F){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.
|
|
693
|
+
function tq(a,b,c){function d(F){switch(F){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ga=rq(c,b.aa,null);var e=!1,f=Lf(c,"Role"),g=f.map(function(F){return F.getAttribute("value")}).filter(cc),h=void 0,k=b.ga.contentType==ic;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
|
|
694
694
|
l}}var p;m=Lf(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;var q=n.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==q?f=n.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==q?p=d(parseInt(n.getAttribute("value"),10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=q&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=q&&(l=!0)}m=Lf(c,"SupplementalProperty");m=t(m);for(n=m.next();!n.done;n=m.next())n=n.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==
|
|
695
695
|
n.getAttribute("schemeIdUri")&&(p=d(parseInt(n.getAttribute("value"),10)));m=Lf(c,"Accessibility");var v=new Map;m=t(m);for(n=m.next();!n.done;n=m.next())if(q=n.value,n=q.getAttribute("schemeIdUri"),q=q.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==n)if(n=1,null!=q){q=q.split(";");for(var y=t(q),w=y.next();!w.done;w=y.next()){var x=w.value,D=w=void 0;x.includes("=")?(x=x.split("="),w=x[0].startsWith("CC")?x[0]:"CC"+x[0],D=x[1]||"und"):(w="CC"+n,2==q.length?n+=2:n++,D=x);v.set(w,nd(D))}}else v.set("CC1",
|
|
696
696
|
"und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=1,null!=q)for(q=t(q.split(";")),w=q.next();!w.done;w=q.next())w=w.value,x=y=void 0,w.includes("=")?(w=w.split("="),y="svc"+w[0],x=w[1].split(",")[0].split(":").pop()):(y="svc"+n,n++,x=w),v.set(y,nd(x));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=q&&(g.push(q),"captions"==q&&(h="caption"));if(l)return null;l=Lf(c,"ContentProtection");var z=Lo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=nd(c.getAttribute("lang")||"und"),
|
|
697
|
-
E=c.getAttribute("label");(l=Lf(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(E=l.textContent));l=Lf(c,"Representation");c=l.map(function(F){if(F=vq(a,b,z,h,B,E,e,g,v,F))F.hdr=F.hdr||p;return F}).filter(function(F){return!!F});if(0==c.length){f="image"==b.
|
|
698
|
-
b.
|
|
699
|
-
function vq(a,b,c,d,e,f,g,h,k,l){b.I=rq(l,b.
|
|
697
|
+
E=c.getAttribute("label");(l=Lf(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(E=l.textContent));l=Lf(c,"Representation");c=l.map(function(F){if(F=vq(a,b,z,h,B,E,e,g,v,F))F.hdr=F.hdr||p;return F}).filter(function(F){return!!F});if(0==c.length){f="image"==b.ga.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new O(2,4,4003);}if(!b.ga.contentType||"application"==b.ga.contentType)for(b.ga.contentType=wq(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=
|
|
698
|
+
b.ga.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=m.value,n=t(z.drmInfos),q=n.next();!q.done;q=n.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ia(q.keyIds),ia(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(F){return F.getAttribute("id")}).filter(cc);return{id:b.ga.id||"__fake__"+a.G++,contentType:b.ga.contentType,language:B,uh:e,streams:c,drmInfos:z.drmInfos,re:f,sg:k}}
|
|
699
|
+
function vq(a,b,c,d,e,f,g,h,k,l){b.I=rq(l,b.ga,null);a.u=Math.min(a.u,b.I.Ab);if(!xq(b.I))return null;var m=b.U.start;b.bandwidth=Tf(l,"bandwidth",Yf)||0;var p=b.I.contentType,n=p==ic||"application"==p;p="image"==p;try{var q=function(F,H,I){return yq(a,F,H,I)};if(b.I.xc)var v=mp(b,q);else if(b.I.ab)v=sp(b,a.l);else if(b.I.yc)v=xp(b,q,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.L);else{var y=b.I.wa,w=b.U.duration||0;v={Cb:function(){return Promise.resolve(Mj(m,w,y))}}}}catch(F){if((n||p)&&4002==F.code)return null;
|
|
700
700
|
throw F;}q=Lf(l,"ContentProtection");q=Oo(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var x=!1;Lf(l,"SupplementalProperty").some(function(F){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==F.getAttribute("schemeIdUri")&&"JOC"==F.getAttribute("value")})&&(x=!0);var D=!1;n&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(p&&((l=Lf(l,"EssentialProperty").find(function(F){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(F.getAttribute("schemeIdUri"))}))&&
|
|
701
701
|
(z=l.getAttribute("value")),!z))return null;var B;l=b.I.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(B="PQ");l=b.I.id?b.aa.id+","+b.I.id:"";var E=l&&a.l[l]?a.l[l]:{id:a.G++,originalId:b.I.id,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){E.segmentIndex&&(E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.I.mimeType,codecs:b.I.codecs,
|
|
702
|
-
frameRate:b.I.frameRate,pixelAspectRatio:b.I.pixelAspectRatio,bandwidth:b.bandwidth,width:b.I.width,height:b.I.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:q,language:e,label:f,type:b.
|
|
702
|
+
frameRate:b.I.frameRate,pixelAspectRatio:b.I.pixelAspectRatio,bandwidth:b.bandwidth,width:b.I.width,height:b.I.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:q,language:e,label:f,type:b.ga.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.I.bd,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:x,closedCaptions:k,hdr:B,tilesLayout:z,matchedStreams:[],external:!1};E.createSegmentIndex=function(){var F;return G(function(H){if(1==
|
|
703
703
|
H.g){if(E.segmentIndex)return H.B(0);F=E;return u(H,v.Cb(),3)}F.segmentIndex=H.h;A(H)})};l&&b.Wa&&!a.l[l]&&(a.l[l]=E);return E}function jq(a){var b,c;G(function(d){switch(d.g){case 1:return b=0,C(d,2),u(d,kq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=wa(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d.return();lq(a,b);A(d)}})}function lq(a,b){0>a.F||a.D.O(Math.max(3,a.F-b,Sa(a.H)))}
|
|
704
704
|
function rq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,bd:null,audioSamplingRate:null,Ab:0};c=c||b.wa;var d=Lf(a,"BaseURL"),e=d.map(Rf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Tf(a,"frameRate",ag)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Lf(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=t(m);for(var n=m.next();!n.done;n=
|
|
705
705
|
m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Lf(a,"AudioChannelConfiguration");m=zq(m)||b.bd;n=Tf(a,"audioSamplingRate",Zf)||b.audioSamplingRate;f||(f=wq(g,h));var q=Kf(a,"SegmentBase"),v=Kf(a,"SegmentTemplate"),y=q?Tf(q,"availabilityTimeOffset",$f)||0:0,w=v?Tf(v,"availabilityTimeOffset",$f)||0:0;d=d&&d.length?Tf(d[0],"availabilityTimeOffset",$f)||0:0;d=b.Ab+d+y+w;return{wa:dc(c,e),xc:q||b.xc,ab:Kf(a,"SegmentList")||b.ab,yc:v||b.yc,width:Tf(a,"width",Zf)||b.width,height:Tf(a,
|
|
@@ -717,7 +717,7 @@ function Qq(a,b,c){b=Bc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d
|
|
|
717
717
|
var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Rq(a,m),Sq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?null!=Z(m,"BYTERANGE-START")?null!=Z(m,"BYTERANGE-LENGTH")&&k.push(m):k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Kq(d,m.trim()),h&&g.push(h),e.push(new Eq(m,g,k)),g=[],k=[]);k.length&&
|
|
718
718
|
(h&&g.push(h),e.push(new Eq("",g,k)));return new Bq(c,b,f,e)}f.push(h);"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Fq("URI",k)),e=!0)}}return new Bq(c,b,f)}function Rq(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new O(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Lq(d);var f;(f=Nq(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Nq(d,g);)c.push(new Fq(f[1],f[2]||f[3])),Mq(d)}return new Cq(a,b,c,e)}
|
|
719
719
|
var Sq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),Tq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Uq(){}function Vq(a){try{var b=Wq(a);return Ne({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Le(c)}}
|
|
720
|
-
function Wq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new O(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new O(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Kc(a):e=Fc(a);return{data:e,contentType:c}}K("shaka.net.DataUriPlugin",Uq);Uq.parse=Vq;Ze("data",Vq);function Xq(){var a=this;this.g=this.i=null;this.Fa=1;this.o=new Map;this.u=new Map;this.F=new Map;this.F.set("video",new Map);this.F.set("audio",new Map);this.F.set(ic,new Map);this.F.set("image",new Map);this.ka=new Set;this.h=new Map;this.j=null;this.M="";this.W=new Pq;this.P=0;this.A=-1;this.H=Infinity;this.Ga=!1;this.m=new P(function(){Yq(a)});this.
|
|
720
|
+
function Wq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new O(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new O(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Kc(a):e=Fc(a);return{data:e,contentType:c}}K("shaka.net.DataUriPlugin",Uq);Uq.parse=Vq;Ze("data",Vq);function Xq(){var a=this;this.g=this.i=null;this.Fa=1;this.o=new Map;this.u=new Map;this.F=new Map;this.F.set("video",new Map);this.F.set("audio",new Map);this.F.set(ic,new Map);this.F.set("image",new Map);this.ka=new Set;this.h=new Map;this.j=null;this.M="";this.W=new Pq;this.P=0;this.A=-1;this.H=Infinity;this.Ga=!1;this.m=new P(function(){Yq(a)});this.fa=Zq;this.D=null;this.da=0;this.J=Infinity;this.V=this.ea=0;this.G=new We;this.L=new Map;this.s=new Map;this.ba=new Map;this.l=!1}r=Xq.prototype;
|
|
721
721
|
r.configure=function(a){this.g=a};r.start=function(a,b){var c=this,d;return G(function(e){return 1==e.g?(c.i=b,c.l=b.isLowLatencyMode(),u(e,$q(c,a),2)):3!=e.g?(d=e.h,c.M=d.uri,u(e,ar(c,d.data,a),3)):e.return(c.D)})};r.stop=function(){this.m&&(this.m.stop(),this.m=null);var a=[];this.G&&(a.push(this.G.destroy()),this.G=null);this.g=this.i=null;this.ka.clear();this.D=null;this.h.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
|
|
722
722
|
r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return G(function(m){if(1==m.g){if(!br(a))return m.return();b=[];c=Array.from(a.h.values());d=c.filter(function(p){return p.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(cr(a,g));return u(m,Promise.all(b),2)}dr(a,d.map(function(p){return p.stream}));h=d.some(function(p){return 0==p.nc});d.length&&!h&&(k=er,fr(a,k.gf),l=d.map(function(p){return p.Pa}),a.j.Aa(Math.min.apply(Math,ia(l))),a.i.updateDuration());h&&gr(a);
|
|
723
723
|
A(m)})};function hr(a,b){return br(a)?a.F.get(b.type):b.ad}
|
|
@@ -731,7 +731,7 @@ N=a.g.hls.defaultAudioCodec,F=J+'; codecs="'+N+'"'):qr[I]&&(J=qr[I],R=a.g.hls.de
|
|
|
731
731
|
gc(ic,Zb);a.s.set(pb,Un);gb(Zb,Un)}Ua&&(pb=gc("audio",Zb),pb||(pb=a.g.hls.defaultAudioCodec),a.s.set(Ua,pb));Ka&&(Ua=gc("video",Zb),Ua||(Ua=a.g.hls.defaultVideoCodec),a.s.set(Ka,Ua))}n=Gq(d.g,"EXT-X-SESSION-DATA");q=t(n);for(v=q.next();!v.done;v=q.next())if(y=v.value,w=Z(y,"DATA-ID"),x=Z(y,"URI"),D=Z(y,"LANGUAGE"),z=Z(y,"VALUE"),B=(new Map).set("id",w),x&&B.set("uri",Kq(a.M,x)),D&&B.set("language",D),z&&B.set("value",z),E=new S("sessiondata",B),a.i)a.i.onEvent(E);tr(a,k);Lb=Hq(k,"CLOSED-CAPTIONS");
|
|
732
732
|
Lb=t(Lb);for(Ka=Lb.next();!Ka.done;Ka=Lb.next())pb=Ka.value,Ka=ur(pb),Ua=Dq(pb,"GROUP-ID"),pb=Dq(pb,"INSTREAM-ID"),a.L.get(Ua)||a.L.set(Ua,new Map),a.L.get(Ua).set(pb,Ka);f=vr(a,l,p);g=wr(a,k);return u(Ha,xr(a,m),4);case 4:h=Ha.h;Ha.B(3);break;case 5:Fa=Ha.h,a.h.set(c,Fa),f.push({id:0,language:"und",disabledUntilTime:0,primary:!0,audio:"audio"==ba?Fa.stream:null,video:"video"==ba?Fa.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new O(2,
|
|
733
733
|
7,7001);a.j=new U(null,0);a.j.zc(!0);1==d.type&&(br(a)&&(yr(a),xa=a.P,a.m.O(xa)),Na=Array.from(a.h.values()),zr(a,Na),gr(a));a.D={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.D);A(Ha)}})}
|
|
734
|
-
function gr(a){if(br(a)){if(a.P=a.J,a.
|
|
734
|
+
function gr(a){if(br(a)){if(a.P=a.J,a.fa==Ar){for(var b,c=b=Infinity,d=t(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Pa),c=Math.min(c,e.kb));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.j.m);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.j.oe(b)}}else a.j.Aa(Br(a));a.j.Od()}
|
|
735
735
|
function ir(a,b){var c=new Map;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.o.get(e))&&c.set(e,d)}return c}
|
|
736
736
|
function wr(a,b){var c=Hq(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Cr(a,g).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=Dq(d.value,"GROUP-ID");if(d=a.s.get(e))if(e=a.u.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Dr(ic,d)||Er(ic)}}return b.filter(function(g){return g})}
|
|
737
737
|
function xr(a,b){var c,d;return G(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return G(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l.return(null);C(l,2);return u(l,Fr(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=wa(l);if(a.g.hls.ignoreImageStreamFailures)return l.return(null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e.return(d.filter(function(f){return f}))})}
|
|
@@ -758,10 +758,10 @@ height:void 0,bandwidth:void 0,roles:n,forced:l,channelsCount:g,audioSamplingRat
|
|
|
758
758
|
function jr(a,b){var c=[];if(a.segments){a=t(a.segments);for(var d=a.next();!d.done;d=a.next())d=Gq(d.value.g,"EXT-X-KEY"),c.push.apply(c,ia(d))}d=a=!1;var e=[],f=new Set;c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=Dq(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=Z(g,"KEYFORMAT")||"identity",g=(h=Gr[h])?h(g,b):null){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,lf:d}}
|
|
759
759
|
function Pr(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Xa("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new O(2,4,4042);var d=0,e=Z(b,"IV","");if(e){var f=Lc(e.substr(2));if(16!=f.byteLength)throw new O(2,4,4043);}else d=Jq(c.g,"EXT-X-MEDIA-SEQUENCE");b=Kq(c.h,Dq(b,"URI"));var g=bf([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l,m;return G(function(p){if(1==p.g)return u(p,
|
|
760
760
|
Qr(a,g,6),2);if(3!=p.g){k=p.h;if(!k.data||16!=k.data.byteLength)throw new O(2,4,4044);l={name:"AES-CBC"};m=h;return u(p,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=p.h;h.fetchKey=void 0;A(p)})}};return h}
|
|
761
|
-
function Nr(a,b){var c=Iq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Iq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)fr(a,Zq);else{c?fr(a,Ar):fr(a,Rr);d=Iq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new O(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Iq(b.g,"EXT-X-PART-INF");a.l&&c?(a.
|
|
762
|
-
function yr(a){var b=a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.V?a.V:a.
|
|
761
|
+
function Nr(a,b){var c=Iq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Iq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)fr(a,Zq);else{c?fr(a,Ar):fr(a,Rr);d=Iq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new O(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Iq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ea=Number(Dq(c,"PART-TARGET")),a.J=Math.min(a.ea,a.J),b=Iq(b.g,"EXT-X-SERVER-CONTROL"),a.V=b?Number(Dq(b,"PART-HOLD-BACK")):0):a.J=Math.min(d,a.J);a.da=Math.max(d,a.da)}}
|
|
762
|
+
function yr(a){var b=a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.V?a.V:a.da*a.g.hls.liveSegmentsDelay;a.j.Ye(0);a.j.Xe(b);a.j.zc(!1)}function Sr(a,b,c,d){c=Iq(c,"EXT-X-MAP");if(!c)return null;var e=Dq(c,"URI");d=Jr(Kq(b,e),d);b=[d,Z(c,"BYTERANGE","")].join("-");a.ba.has(b)||(c=Tr(d,c),a.ba.set(b,c));return a.ba.get(b)}function Tr(a,b){var c=0,d=null;if(b=Z(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new pi(function(){return[a]},c,d)}
|
|
763
763
|
function Ur(a,b,c,d,e,f,g,h,k,l){var m=d.g,p=Jr(d.i,f),n=Iq(m,"EXTINF"),q=0;f=0;var v=null;d.h.length&&!a.l&&Xa("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 y=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Iq(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(y=Uf(w.value))}w=ri;Iq(m,"EXT-X-GAP")&&(w=2);if(!n){if(0==d.h.length)throw new O(2,4,
|
|
764
|
-
4024,"EXTINF");if(!a.l)return null}var x=[];if(a.l){q={};for(var D=0;D<d.h.length;q={rd:q.rd},D++){var z=d.h[D],B=0==D?c:x[x.length-1],E=0==D?e:B.endTime,F=Number(Z(z,"DURATION"))||a.
|
|
764
|
+
4024,"EXTINF");if(!a.l)return null}var x=[];if(a.l){q={};for(var D=0;D<d.h.length;q={rd:q.rd},D++){var z=d.h[D],B=0==D?c:x[x.length-1],E=0==D?e:B.endTime,F=Number(Z(z,"DURATION"))||a.ea;if(F){F=E+F;var H=0,I=null;"EXT-X-PRELOAD-HINT"==z.name?H=(H=Z(z,"BYTERANGE-START"))?Number(H):0:(H=Z(z,"BYTERANGE"),I=t(Vr(B,H)),H=I.next().value,I=I.next().value);if(B=Z(z,"URI"))q.rd=Kq(g,B),B=ri,"YES"==Z(z,"GAP")&&(B=2),E=new T(E,F,function(J){return function(){return[J.rd]}}(q),H,I,b,0,0,Infinity,[],"",null,null,
|
|
765
765
|
B),"EXT-X-PRELOAD-HINT"==z.name&&E.Ne(),x.push(E)}}}if(n){a=Number(n.value.split(",")[0]);if(0==a)return null;q=e+a}else q=x[x.length-1].endTime;(a=Iq(m,"EXT-X-BYTERANGE"))?(v=t(Vr(c,a.value)),f=v.next().value,v=v.next().value):x.length&&(f=x[0].Ba,v=x[x.length-1].ma);c="";a=null;"image"==h&&(c="1x1",h=Iq(m,"EXT-X-TILES"))&&(c=Dq(h,"LAYOUT"),(h=Z(h,"DURATION"))&&(a=Number(h)));return new T(e,q,function(){return p.length?[p]:[]},f,v,b,k,0,Infinity,x,c,a,y,w,l)}
|
|
766
766
|
function Vr(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.ma+1,d=c+b-1);return[c,d]}
|
|
767
767
|
function kr(a,b,c,d,e){var f=b.segments,g=void 0,h=Jq(b.g,"EXT-X-DISCONTINUITY-SEQUENCE"),k=Jq(b.g,"EXT-X-MEDIA-SEQUENCE"),l=Iq(b.g,"EXT-X-SKIP");l=l?Number(Z(l,"SKIPPED-SEGMENTS")):0;var m=k+l,p=0;br(a)&&d.has(m)&&(p=d.get(m));for(var n=[],q=null,v=p,y=0;y<f.length;y++){var w=f[y],x=0==y?p:q.endTime;m=k+l+y;Iq(w.g,"EXT-X-DISCONTINUITY")&&(h++,v=x);var D=t(w.g);for(var z=D.next();!z.done;z=D.next())z=z.value,"EXT-X-KEY"==z.name&&("AES-128"==Dq(z,"METHOD")?g=Pr(a,z,b):g=void 0);d.set(m,x);D=Sr(a,b.h,
|
|
@@ -769,7 +769,7 @@ w.g,e);!a.l&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.l=a.i.isL
|
|
|
769
769
|
0,c.Cc=d,f=function(B){return function(){var E=n[B.Cc];if(E){E!=B.Ta&&(B.Pb+=E.endTime-E.startTime);if(null!=E.g)return E.g+B.Pb;--B.Cc}return null}}(c);null==c.Ta.g;)c.Ta.g=f(),null==c.Ta.g&&(c.Ta.g=e());if(b)for(c=t(n),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.g,e=t(e.i),f=e.next();!f.done;f=e.next())f=f.value,f.g=d,d+=f.endTime-f.startTime;a=a.H;if(b&&Infinity!=a)for(b=t(n),d=b.next();!d.done;d=b.next())d.value.pe(a);return n}
|
|
770
770
|
function Jr(a,b){if(!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new O(2,4,4039,e);}}return a}function Dr(a,b){if(a==ic){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":null:"image/jpeg"}
|
|
771
771
|
function Er(a){return a==ic?"text/vtt":Wr[a].mp4}function Or(a,b,c,d,e){var f,g,h,k,l,m,p,n,q,v;return G(function(y){if(1==y.g){f=hf;g=Math.trunc((d.segments.length-1)/2);h=Jr(d.segments[g].i,e);k=new Mb(h);l=k.ra.split(".").pop();m=Wr[b];if((p=m[l])||(p=or[l])||(p=Dr(b,c)))return y.return(p);n=bf([h],a.g.retryParameters);n.method="HEAD";return u(y,Qr(a,n,f),2)}q=y.h;return(v=q.headers["content-type"])?y.return(v.split(";")[0]):y.return(Er(b))})}
|
|
772
|
-
function $q(a,b){b=bf([b],a.g.retryParameters);a.i.modifyManifestRequest(b,{format:"h"});return Qr(a,b,0)}function Yq(a){var b,c;G(function(d){if(1==d.g){if(!a.i)return d.return();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return br(a)&&(b=a.P,a.m.O(b)),va(d,0);c=wa(d);if(!a.i)return d.return();c.severity=1;a.i.onError(c);a.m.O(.1);A(d)})}function br(a){return a.
|
|
772
|
+
function $q(a,b){b=bf([b],a.g.retryParameters);a.i.modifyManifestRequest(b,{format:"h"});return Qr(a,b,0)}function Yq(a){var b,c;G(function(d){if(1==d.g){if(!a.i)return d.return();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return br(a)&&(b=a.P,a.m.O(b)),va(d,0);c=wa(d);if(!a.i)return d.return();c.severity=1;a.i.onError(c);a.m.O(.1);A(d)})}function br(a){return a.fa!=Zq}function fr(a,b){a.fa=b;a.j&&a.j.zc(!br(a));br(a)||a.m.stop()}
|
|
773
773
|
function Qr(a,b,c){if(!a.G)throw new O(2,7,7001);b=a.i.networkingEngine.request(c,b);Xe(a.G,b);return b.promise}K("shaka.hls.HlsParser",Xq);
|
|
774
774
|
var or={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},pr={mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},qr={mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},Wr={audio:pr,video:qr,text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
775
775
|
vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Gr={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new O(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new O(2,4,4041);return ec("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Dq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
|