shaka-player 4.2.13 → 4.2.14
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 +11 -0
- package/demo/common/assets.js +12 -12
- package/demo/main.js +5 -0
- package/dist/demo.compiled.debug.js +13 -13
- package/dist/demo.compiled.debug.map +2 -2
- package/dist/demo.compiled.js +13 -13
- package/dist/demo.compiled.map +2 -2
- package/dist/locales.js +33 -33
- package/dist/receiver.compiled.debug.js +8 -8
- package/dist/receiver.compiled.debug.map +1 -1
- package/dist/receiver.compiled.js +8 -8
- package/dist/receiver.compiled.map +1 -1
- package/dist/shaka-player.compiled.d.ts +2 -2
- package/dist/shaka-player.compiled.debug.d.ts +2 -2
- package/dist/shaka-player.compiled.debug.js +29 -26
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +76 -76
- package/dist/shaka-player.compiled.map +2 -2
- package/dist/shaka-player.ui.d.ts +2 -2
- package/dist/shaka-player.ui.debug.d.ts +2 -2
- package/dist/shaka-player.ui.debug.js +36 -33
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +65 -65
- package/dist/shaka-player.ui.map +2 -2
- package/externs/shaka/manifest.js +5 -1
- package/externs/shaka/offline.js +5 -1
- package/karma.conf.js +2 -0
- package/lib/ads/client_side_ad_manager.js +14 -2
- package/lib/dash/dash_parser.js +1 -0
- package/lib/hls/hls_parser.js +1 -0
- package/lib/media/media_source_engine.js +6 -5
- package/lib/media/streaming_engine.js +2 -2
- package/lib/offline/indexeddb/v1_storage_cell.js +1 -0
- package/lib/offline/indexeddb/v2_storage_cell.js +1 -0
- package/lib/offline/manifest_converter.js +1 -0
- package/lib/offline/storage.js +1 -0
- package/lib/player.js +4 -1
- package/lib/util/periods.js +2 -0
- package/lib/util/platform.js +8 -0
- package/package.json +2 -2
- package/test/media/adaptation_set_unit.js +1 -0
- package/test/media/media_source_engine_unit.js +1 -1
- package/test/offline/manifest_convert_unit.js +5 -0
- package/test/player_integration.js +4 -1
- package/test/test/util/manifest_generator.js +2 -0
- package/test/test/util/offline_utils.js +1 -0
- package/test/test/util/streaming_engine_util.js +3 -0
- package/test/test/util/ui_utils.js +5 -1
- package/ui/externs/ui.js +2 -2
- package/ui/seek_bar.js +7 -1
|
@@ -31,10 +31,10 @@ while(!k.done)})};return b});function Ja(a,b){return Object.prototype.hasOwnProp
|
|
|
31
31
|
ea("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=r(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;ba(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({}),
|
|
32
32
|
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,
|
|
33
33
|
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});
|
|
34
|
-
ea("Map",function(a){function b(){var h={};return h.Ra=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.Ra;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,
|
|
35
|
-
list:m,index:-1,
|
|
36
|
-
"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.
|
|
37
|
-
h.
|
|
34
|
+
ea("Map",function(a){function b(){var h={};return h.Ra=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.Ra;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,ia:p}}return{id:l,
|
|
35
|
+
list:m,index:-1,ia:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=r(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(r([[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||
|
|
36
|
+
"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.ia?l.ia.value=k:(l.ia={next:this.g,Ra:this.g.Ra,head:this.g,key:h,value:k},l.list.push(l.ia),this.g.Ra.next=l.ia,this.g.Ra=l.ia,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.ia&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ia.Ra.next=h.ia.next,h.ia.next.Ra=h.ia.Ra,
|
|
37
|
+
h.ia.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Ra=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ia};e.prototype.get=function(h){return(h=d(this,h).ia)&&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(),
|
|
38
38
|
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});
|
|
39
39
|
ea("Set",function(a){function b(c){this.g=new Map;if(c){c=r(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(r([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||
|
|
40
40
|
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 Zb(a){if(!a.pa&&(a.pa={},a.Jc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.l
|
|
|
86
86
|
q.set=function(a,b){Zb(this);this.g=null;this.pa.hasOwnProperty(a)?this.pa[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.pa)return"";var a=[],b;for(b in this.pa)for(var c=encodeURIComponent(b),d=this.pa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new Qb;a.g=this.g;if(this.pa){var b={},c;for(c in this.pa)b[c]=this.pa[c].concat();a.pa=b;a.Jc=this.Jc}return a};function $b(a,b){return a.concat(b)}function ac(){}function bc(a){return null!=a};function cc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Lb(d)});return a.map(function(d){return new Lb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce($b,[]).map(function(d){return d.toString()})}function dc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
|
|
87
87
|
function ec(a,b){if(1==b.length)return b[0];a=fc(a,b);if(null!=a)return a;throw new M(2,4,4025,b);}function fc(a,b){for(var c=r(gc[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==hc?"":null}
|
|
88
88
|
var hc="text",jc={ua:"video",eb:"audio",X:hc,Wb:"image",xg:"application"},gc={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.R=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 O(a){this.h=a;this.g=null}O.prototype.Nb=function(){this.stop();this.h();return this};O.prototype.R=function(a){var b=this;this.stop();this.g=(new mc(function(){b.h()})).R(a);return this};O.prototype.Fa=function(a){var b=this;this.stop();this.g=(new mc(function(){b.g.R(a);b.h()})).R(a);return this};O.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};L("shaka.util.Timer",O);O.prototype.stop=O.prototype.stop;O.prototype.tickEvery=O.prototype.Fa;O.prototype.tickAfter=O.prototype.R;
|
|
89
|
-
O.prototype.tickNow=O.prototype.Nb;function nc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function oc(a){return""!=pc().canPlayType(a)}function qc(){return rc("Xbox One")}function sc(){return rc("Tizen")}function tc(){return rc("Web0S")&&rc("Chrome/38.0.2125.122 Safari/537.36")}function uc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!sc()&&!rc("PC=EOS")&&!rc("VirginMedia")&&!vc()&&!rc("AFT")}function vc(){return rc("PlayStation 4")}
|
|
89
|
+
O.prototype.tickNow=O.prototype.Nb;function nc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function oc(a){return""!=pc().canPlayType(a)}function qc(){return rc("Xbox One")}function sc(){return rc("Tizen")}function tc(){return rc("Web0S")&&rc("Chrome/38.0.2125.122 Safari/537.36")}function uc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!sc()&&!rc("PC=EOS")&&!rc("VirginMedia")&&!rc("SOPOpenBrowser")&&!vc()&&!rc("AFT")}function vc(){return rc("PlayStation 4")}
|
|
90
90
|
function wc(){if(!uc())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function rc(a){return(navigator.userAgent||"").includes(a)}function pc(){if(xc)return xc;yc||(yc=new O(function(){xc=null}));(xc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(xc=document.createElement("video"));yc.R(1);return xc}var yc=null,xc=null;function zc(){}
|
|
91
91
|
function Ac(a){if(!a)return"";a=Db(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!vc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ua('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
|
|
92
92
|
(a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
|
|
@@ -163,8 +163,8 @@ Me.prototype.aa=function(a,b){function c(h){return function(k){if(e.g&&h)f.rejec
|
|
|
163
163
|
function Se(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()}}}L("shaka.util.AbortableOperation",Me);Me.prototype.chain=Me.prototype.aa;Me.prototype["finally"]=Me.prototype.finally;Me.all=Re;Me.prototype.abort=Me.prototype.abort;Me.notAbortable=Qe;Me.completed=Pe;Me.aborted=Oe;Me.failed=Ne;function Q(a,b){if(b)if(b instanceof Map)for(var c=r(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}
|
|
164
164
|
function Te(a){var b=new Q(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}Q.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};Q.prototype.stopImmediatePropagation=function(){this.g=!0};Q.prototype.stopPropagation=function(){};L("shaka.util.FakeEvent",Q);
|
|
165
165
|
var Ue={zg:"abrstatuschanged",Ag:"adaptation",Bg:"buffering",Cg:"downloadfailed",Dg:"downloadheadersreceived",Eg:"drmsessionupdate",Gg:"emsg",Error:"error",Hg:"expirationupdated",Ig:"gapjumped",Jg:"loaded",Kg:"loading",Mg:"manifestparsed",Ng:"mediaqualitychanged",Metadata:"metadata",Og:"onstatechange",Pg:"onstateidle",Qg:"ratechange",Sg:"sessiondata",Tg:"stalldetected",Ug:"streaming",Vg:"textchanged",Wg:"texttrackvisibility",Xg:"timelineregionadded",Yg:"timelineregionenter",Zg:"timelineregionexit",
|
|
166
|
-
$g:"trackschanged",bh:"unloading",dh:"variantchanged"};function Ve(){this.
|
|
167
|
-
Ve.prototype.release=function(){this.
|
|
166
|
+
$g:"trackschanged",bh:"unloading",dh:"variantchanged"};function Ve(){this.fa=new wd;this.Rc=this}Ve.prototype.addEventListener=function(a,b){this.fa&&this.fa.push(a,b)};Ve.prototype.removeEventListener=function(a,b){this.fa&&this.fa.remove(a,b)};Ve.prototype.dispatchEvent=function(a){if(!this.fa)return!0;var b=this.fa.get(a.type)||[],c=this.fa.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Rc;a.currentTarget=this.Rc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
167
|
+
Ve.prototype.release=function(){this.fa=null};function We(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 Xe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ye(){this.g=[]}function Ze(a,b){a.g.push(b.finally(function(){cb(a.g,b)}))}Ye.prototype.destroy=function(){for(var a=[],b=r(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 $e(a,b,c){Ve.call(this);this.i=!1;this.m=new Ye;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}pa($e,Ve);q=$e.prototype;q.de=function(a){this.o=a};function af(a,b,c,d){c=c||bf;var e=cf[a];if(!e||c>=e.priority)cf[a]={priority:c,$f:b,ag:void 0===d?!1:d}}q.bg=function(a){this.g.add(a)};q.sg=function(a){this.g.delete(a)};q.gf=function(){this.g.clear()};q.cg=function(a){this.h.add(a)};q.tg=function(a){this.h.delete(a)};q.hf=function(){this.h.clear()};
|
|
168
168
|
function df(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}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();Ve.prototype.release.call(this);return this.m.destroy()};
|
|
169
169
|
q.request=function(a,b){var c=this,d=new ef;if(this.i){var e=Promise.reject(new M(2,7,7001));e.catch(function(){});return new ff(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?We(b.retryParameters):Ke();b.uris=We(b.uris);e=gf(this,a,b);var f=e.aa(function(){return hf(c,a,b,new Je(b.retryParameters,!1),0,null,d)}),g=f.aa(function(p){return jf(c,a,p)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
|
|
170
170
|
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.aa(function(p){var n=Date.now()-l,t=p.response;t.timeMs+=k;t.timeMs+=n;p.Of||!c.l||t.fromCache||"HEAD"==b.method||a!=kf||c.l(t.timeMs,t.data.byteLength);return t},function(p){p&&(p.severity=2);throw p;});e=new ff(m.promise,function(){return m.abort()},d);Ze(this.m,e);return e};
|
|
@@ -174,8 +174,8 @@ if(!p)return w;var D=c.retryParameters.connectionTimeout;D&&(n=new O(function(){
|
|
|
174
174
|
c.uris[e],b));if(w instanceof M){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity)return D=(new Map).set("error",w),D=new Q("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,hf(a,b,c,d,e,w,g)}throw w;})}
|
|
175
175
|
function jf(a,b,c){var d=Pe(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={rd:e.rd},f=a.next())e.rd=f.value,d=d.aa(function(g){return function(){var h=c.response;h.data&&(h.data=Eb(h.data));return g.rd(b,h)}}(e));return d.aa(function(){return c},function(g){var h=2;if(g instanceof M){if(7001==g.code)throw g;h=g.severity}throw new M(h,1,1007,g);})}L("shaka.net.NetworkingEngine",$e);$e.prototype.request=$e.prototype.request;$e.prototype.destroy=$e.prototype.destroy;$e.makeRequest=df;
|
|
176
176
|
$e.defaultRetryParameters=function(){return Ke()};$e.prototype.clearAllResponseFilters=$e.prototype.hf;$e.prototype.unregisterResponseFilter=$e.prototype.tg;$e.prototype.registerResponseFilter=$e.prototype.cg;$e.prototype.clearAllRequestFilters=$e.prototype.gf;$e.prototype.unregisterRequestFilter=$e.prototype.sg;$e.prototype.registerRequestFilter=$e.prototype.bg;$e.unregisterScheme=function(a){delete cf[a]};$e.registerScheme=af;$e.prototype.setForceHTTPS=$e.prototype.de;function ef(){this.g=0}
|
|
177
|
-
$e.NumBytesRemainingClass=ef;function ff(a,b,c){Me.call(this,a,b);this.h=c}pa(ff,Me);$e.PendingRequest=ff;var kf=1;$e.RequestType={MANIFEST:0,SEGMENT:kf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var bf=3;$e.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:bf};var cf={};function lf(a){this.g=!1;this.h=new kc;this.i=a}lf.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 mf(a,b){if(a.g){if(b instanceof M&&7003==b.code)throw b;throw new M(2,7,7003,b);}};function nf(){this.g=new wd}q=nf.prototype;q.release=function(){this.ob();this.g=null};q.C=function(a,b,c,d){this.g&&(a=new of(a,b,c,d),this.g.push(b,a))};q.
|
|
178
|
-
q.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=r(b);for(b=a.next();!b.done;b=a.next())b.value.yc();this.g.g={}}};L("shaka.util.EventManager",nf);nf.prototype.removeAll=nf.prototype.ob;nf.prototype.unlisten=nf.prototype.yc;nf.prototype.listenOnce=nf.prototype.
|
|
177
|
+
$e.NumBytesRemainingClass=ef;function ff(a,b,c){Me.call(this,a,b);this.h=c}pa(ff,Me);$e.PendingRequest=ff;var kf=1;$e.RequestType={MANIFEST:0,SEGMENT:kf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var bf=3;$e.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:bf};var cf={};function lf(a){this.g=!1;this.h=new kc;this.i=a}lf.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 mf(a,b){if(a.g){if(b instanceof M&&7003==b.code)throw b;throw new M(2,7,7003,b);}};function nf(){this.g=new wd}q=nf.prototype;q.release=function(){this.ob();this.g=null};q.C=function(a,b,c,d){this.g&&(a=new of(a,b,c,d),this.g.push(b,a))};q.da=function(a,b,c,d){function e(g){f.yc(a,b,e);c(g)}var f=this;this.C(a,b,e,d)};q.yc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.yc(),this.g.remove(b,e))}};
|
|
178
|
+
q.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=r(b);for(b=a.next();!b.done;b=a.next())b.value.yc();this.g.g={}}};L("shaka.util.EventManager",nf);nf.prototype.removeAll=nf.prototype.ob;nf.prototype.unlisten=nf.prototype.yc;nf.prototype.listenOnce=nf.prototype.da;nf.prototype.listen=nf.prototype.C;nf.prototype.release=nf.prototype.release;function of(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=pf(a,d);this.target.addEventListener(b,c,this.g)}
|
|
179
179
|
of.prototype.yc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function pf(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 qf(a)?b:b.capture||!1}
|
|
180
180
|
function qf(a){var b=rf;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}rf=b}return b||!1}var rf=void 0;function sf(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function tf(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function uf(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function vf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function wf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next()){var d=r(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 xf(a,b){this.S=Gb(a);this.h=b==yf;this.g=0}q=xf.prototype;q.oa=function(){return this.g<this.S.byteLength};q.ba=function(){return this.g};q.xf=function(){return this.S.byteLength};q.Sa=function(){try{var a=this.S.getUint8(this.g);this.g+=1;return a}catch(b){throw zf();}};q.Vd=function(){try{var a=this.S.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw zf();}};q.N=function(){try{var a=this.S.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw zf();}};
|
|
181
181
|
q.Le=function(){try{var a=this.S.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw zf();}};q.Lb=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 zf();}if(2097151<b)throw new M(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.$a=function(a){if(this.g+a>this.S.byteLength)throw zf();var b=Db(this.S,this.g,a);this.g+=a;return b};
|
|
@@ -191,23 +191,23 @@ function Vf(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION
|
|
|
191
191
|
function Yf(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}
|
|
192
192
|
function Zf(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 $f(a){a=Number(a);return 0===a%1?a:null}function ag(a){a=Number(a);return 0===a%1&&0<a?a:null}function bg(a){a=Number(a);return 0===a%1&&0<=a?a:null}function cg(a){a=Number(a);return isNaN(a)?null:a}function dg(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
|
|
193
193
|
function eg(a,b){var c=new DOMParser,d=fg.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 gg(a,b){try{var c=Ac(a);return eg(c,b)}catch(d){return null}}
|
|
194
|
-
var fg=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 hg(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.G=new Set;this.l=this.u=null;this.ka=this.
|
|
195
|
-
q.destroy=function(){return this.j.destroy()};function kg(a){return J(function(b){switch(b.g){case 1:return a.s.release(),a.s=null,a.o.reject(),a.
|
|
194
|
+
var fg=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 hg(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.G=new Set;this.l=this.u=null;this.ka=this.ea=!1;this.J=0;this.g=null;this.s=new nf;this.i=new Map;this.B=[];this.o=new kc;this.h=null;this.m=function(d){c.o.reject(d);a.onError(d)};this.la=new Map;this.fa=new Map;this.Z=new O(function(){return ig(c)});this.O=!1;this.M=[];this.T=!1;this.ga=(new O(function(){jg(c)})).Fa(b);this.o.catch(function(){});this.j=new lf(function(){return kg(c)});this.$=!1;this.L=this.F=null}q=hg.prototype;
|
|
195
|
+
q.destroy=function(){return this.j.destroy()};function kg(a){return J(function(b){switch(b.g){case 1:return a.s.release(),a.s=null,a.o.reject(),a.ga.stop(),a.ga=null,a.Z.stop(),a.Z=null,u(b,lg(a),2);case 2:if(!a.l){b.A(3);break}C(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:ua(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.G.clear(),a.u=null,a.B=[],a.h=null,a.m=function(){},a.D=null,a.$=!1,a.F=null,A(b)}})}q.configure=function(a){this.h=a};
|
|
196
196
|
function mg(a,b,c){a.ka=!0;a.B=[];a.O=c;return ng(a,b)}function og(a,b,c){a.B=c;a.O=0<c.length;return ng(a,b)}
|
|
197
197
|
function pg(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 qg(a,g,[])}
|
|
198
198
|
function ng(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D;return J(function(z){if(1==z.g){if(c=rg(a))for(d=r(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(B){return B.video&&B.video.drmInfos.length||B.audio&&B.audio.drmInfos.length?!0:!1});g||(h=uf(a.h.servers),sg(b,h));k=new Set;l=r(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,p=tg(m),n=r(p),t=n.next();!t.done;t=n.next())y=t.value,k.add(y);x=r(k);for(t=x.next();!t.done;t=
|
|
199
|
-
x.next())v=t.value,ug(v,uf(a.h.servers),uf(a.h.advanced||{}),a.h.keySystemsMapping);return u(z,Sd(b,a.O,a.$),2)}w=g||Object.keys(a.h.servers).length;if(!w)return a.
|
|
199
|
+
x.next())v=t.value,ug(v,uf(a.h.servers),uf(a.h.advanced||{}),a.h.keySystemsMapping);return u(z,Sd(b,a.O,a.$),2)}w=g||Object.keys(a.h.servers).length;if(!w)return a.ea=!0,z.return(Promise.resolve());D=qg(a,void 0,b);return z.return(g?D:D.catch(function(){}))})}
|
|
200
200
|
function vg(a){var b;return J(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.F){c.A(2);break}return u(c,a.F,3);case 3:return mf(a.j),c.return();case 2:return C(c,4),a.F=a.l.setMediaKeys(a.u),u(c,a.F,6);case 6:ua(c,5);break;case 4:b=F(c),a.m(new M(2,6,6003,b.message));case 5:mf(a.j),A(c)}})}function wg(a,b){return J(function(c){if(1==c.g)return u(c,vg(a),2);xg(a,b.initDataType,Db(b.initData));A(c)})}
|
|
201
|
-
q.Zb=function(a){var b=this;return J(function(c){if(1==c.g){if(!b.u)return b.s.
|
|
201
|
+
q.Zb=function(a){var b=this;return J(function(c){if(1==c.g){if(!b.u)return b.s.da(a,"encrypted",function(){b.m(new M(2,6,6010))}),c.return();b.l=a;b.s.da(b.l,"play",function(){for(var d=r(b.M),e=d.next();!e.done;e=d.next())yg(b,e.value);b.T=!0;b.M=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.s.C(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return lg(b)});b.L=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.L||"com.apple.fps"!==b.g.keySystem||
|
|
202
202
|
b.B.length?u(c,vg(b),2):c.A(2)}zg(b);b.L||b.B.length||b.h.parseInbandPsshEnabled||b.s.C(b.l,"encrypted",function(d){return wg(b,d)});A(c)})};
|
|
203
203
|
function Ag(a){var b,c,d,e,f;return J(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.A(2);break}b=df([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=Db(d.data);ua(g,4);break;case 3:throw e=F(g),new M(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();
|
|
204
204
|
C(g,6);return u(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:ua(g,0);break;case 6:throw f=F(g),new M(2,6,6004,f.message);}})}function Bg(a,b){var c,d,e;return J(function(f){if(1==f.g)return u(f,Cg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Ka=new kc,d.push(e.Ka);d.push(c.remove());return u(f,Promise.all(d),3)}a.i.delete(c);A(f)})}
|
|
205
205
|
function zg(a){for(var b=(a.g?a.g.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,xg(a,d.initDataType,d.initData);c=r(a.B);for(d=c.next();!d.done;d=c.next())Cg(a,d.value);b.length||a.B.length||a.o.resolve();return a.o}function xg(a,b,c){if(c.length){var d=a.i.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Bb(c,e.value.initData)&&!rc("Tizen 2"))return;0<a.i.size&&Dg(a)&&(a.o.resolve(),a.o=new kc,a.o.catch(function(){}));Eg(a,b,c,a.g.sessionType)}}
|
|
206
|
-
function Fg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Gg(a){a=a.i.keys();a=sf(a,function(b){return b.sessionId});return Array.from(a)}q.hc=function(){var a=Infinity,b=this.i.keys();b=r(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};q.Nc=function(){return vf(this.
|
|
206
|
+
function Fg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Gg(a){a=a.i.keys();a=sf(a,function(b){return b.sessionId});return Array.from(a)}q.hc=function(){var a=Infinity,b=this.i.keys();b=r(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};q.Nc=function(){return vf(this.fa)};
|
|
207
207
|
function qg(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x;return J(function(v){switch(v.g){case 1:d=new Map;if(c.length){e=Hg(a,c,d);v.A(2);break}return u(v,Ig(a,b),3);case 3:e=v.h;case 2:f=e;if(!f)throw new M(2,6,6001);mf(a.j);C(v,4);a.G.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())p=m.value,a.G.add(p.contentType.toLowerCase());n=r(k);for(m=n.next();!m.done;m=n.next())t=m.value,a.G.add(t.contentType.toLowerCase());if(c.length){var w=
|
|
208
208
|
f.keySystem;var D=d.get(f.keySystem);var z=[],B=[],G=[],E=[],H=new Set;Jg(D,z,G,B,E,H);var I=a.O?"persistent-license":"temporary";w={keySystem:w,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:G[0],serverCertificateUri:B[0],initData:E,keyIds:H};D=r(D);for(z=D.next();!z.done;z=
|
|
209
209
|
D.next())z=z.value,z.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(w.persistentStateRequired=z.persistentStateRequired);D=w}else D=f.keySystem,w=b.get(f.keySystem),z=[],B=[],G=[],E=[],H=new Set,Jg(w.drmInfos,z,G,B,E,H),D={keySystem:D,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
|
|
210
|
-
w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:G[0],serverCertificateUri:B[0],initData:E,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new M(2,6,6012,a.g.keySystem);return u(v,f.createMediaKeys(),6);case 6:return y=v.h,mf(a.j),a.u=y,a.
|
|
210
|
+
w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:G[0],serverCertificateUri:B[0],initData:E,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new M(2,6,6012,a.g.keySystem);return u(v,f.createMediaKeys(),6);case 6:return y=v.h,mf(a.j),a.u=y,a.ea=!0,u(v,Ag(a),7);case 7:mf(a.j);ua(v,0);break;case 4:x=F(v);mf(a.j,x);a.g=null;a.G.clear();if(x instanceof M)throw x;throw new M(2,6,6002,x.message);}})}
|
|
211
211
|
function Hg(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(tg(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new M(2,6,6E3);d={};a=r(a.h.preferredKeySystems);for(e=a.next();!e.done;d={od:d.od},e=a.next())for(d.od=e.value,f=r(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
|
|
212
212
|
l.od}}(d)))return e.keySystemAccess;a=r([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=r(b),e=f.next();!e.done;e=f.next()){var g=r(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=r(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
|
|
213
213
|
function Ig(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x,v;return J(function(w){switch(w.g){case 1:if(1==b.size&&b.has(""))throw new M(2,6,6E3);d=r(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=r(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){w.A(4);break}k=h.value;if(!b.has(k)){w.A(3);break}l=b.get(k);C(w,6);return u(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
|
|
@@ -223,7 +223,7 @@ Fg(a.g.keySystem)&&Lg(g),h=Date.now(),C(v,2),l=a.D.lb.request(2,g),u(v,l.promise
|
|
|
223
223
|
d&&(d.Ka&&d.Ka.resolve(),x=new O(function(){d.loaded=!0;Dg(a)&&a.o.resolve()}),x.R(Mg));A(v)}})}
|
|
224
224
|
function Lg(a){var b=Bc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=eg(b,"PlayReadyKeyMessage");for(var c=r(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=Lc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
|
|
225
225
|
function Kg(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(Fg(a.g.keySystem)&&16==g.byteLength&&(navigator.userAgent.match(/Edge?\//)||vc())){h=Gb(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=Nc(g).slice(0,32);a.la.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Ka&&(a.i.delete(b),
|
|
226
|
-
b.close().catch(function(){}));Dg(a)&&(a.o.resolve(),a.Z.R(Ng))}function ig(a){var b=a.la,c=a.
|
|
226
|
+
b.close().catch(function(){}));Dg(a)&&(a.o.resolve(),a.Z.R(Ng))}function ig(a){var b=a.la,c=a.fa;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 M(2,6,6014));a.D.Xc(vf(c))}
|
|
227
227
|
function Og(){var a,b,c,d,e,f,g,h;return J(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,
|
|
228
228
|
n;return J(function(t){switch(t.g){case 1:C(t,2);if("org.w3.clearkey"===l&&wc())throw Error("Unsupported keySystem");return u(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,n=(p=m.getConfiguration().sessionTypes)?p.includes("persistent-license"):!1,rc("Tizen 3")&&(n=!1),f.set(l,{persistentState:n}),u(t,m.createMediaKeys(),5);case 5:ua(t,0);break;case 2:F(t),f.set(l,null),A(t)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k.return(vf(f))})}
|
|
229
229
|
function Pg(a){var b;return J(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).R(Qg)}),C(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ua(c,0);F(c);A(c)})}
|
|
@@ -273,14 +273,14 @@ q.kc=function(){return this.Ea};q.fc=function(){return this.na};q.Lf=function(){
|
|
|
273
273
|
q.he=function(a){null==this.g?Ua("Sync attempted without sync time!"):(a=this.g-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};L("shaka.media.SegmentReference",R);R.prototype.syncAgainst=R.prototype.he;R.prototype.offset=R.prototype.offset;R.prototype.isPreload=R.prototype.Rf;R.prototype.markAsPreload=R.prototype.Ge;R.prototype.markAsUnavailable=R.prototype.Tf;R.prototype.getStatus=R.prototype.Eb;R.prototype.getTileDuration=R.prototype.Kf;R.prototype.getTilesLayout=R.prototype.Lf;
|
|
274
274
|
R.prototype.getEndByte=R.prototype.fc;R.prototype.getStartByte=R.prototype.kc;R.prototype.getEndTime=R.prototype.vf;R.prototype.getStartTime=R.prototype.getStartTime;R.prototype.getUris=R.prototype.Ba;var pi=0,qi=1;R.Status={yg:pi,ah:qi,Lg:2};function ri(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null}function si(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function ti(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}
|
|
275
275
|
function ui(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=r(vi(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}function wi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=vi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}
|
|
276
|
-
function vi(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function xi(a,b,c,d){var e=this;this.j=a;this.m=c;this.h={};this.M={};this.L={};this.g=null;this.F=!1;this.T=d||function(){};this.i={};this.s=new nf;this.o={};this.B=b;this.G=new kc;this.J="";this.l=yi(this,this.G);this.D=new lf(function(){return zi(e)});this.u=!1;this.O=new kc}function yi(a,b){var c=new MediaSource;a.s.
|
|
276
|
+
function vi(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function xi(a,b,c,d){var e=this;this.j=a;this.m=c;this.h={};this.M={};this.L={};this.g=null;this.F=!1;this.T=d||function(){};this.i={};this.s=new nf;this.o={};this.B=b;this.G=new kc;this.J="";this.l=yi(this,this.G);this.D=new lf(function(){return zi(e)});this.u=!1;this.O=new kc}function yi(a,b){var c=new MediaSource;a.s.da(c,"sourceopen",function(){URL.revokeObjectURL(a.J);b.resolve()});a.J=Ai(c);a.j.src=a.J;return c}q=xi.prototype;q.destroy=function(){return this.D.destroy()};
|
|
277
277
|
function zi(a){var b,c,d,e,f,g,h,k;return J(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(ac)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new M(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.s&&(a.s.release(),a.s=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.l=null;a.g=null;a.m=null;a.h={};a.o={};a.B=null;a.i={};
|
|
278
278
|
A(l)})}
|
|
279
|
-
q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return J(function(p){if(1==p.g)return e=jc,u(p,d.G,2);d.u=c;f={};g=r(a.keys());for(h=g.next();!h.done;f={qa:f.qa},h=g.next())f.qa=h.value,k=a.get(f.qa),l=Vc(k.mimeType,k.codecs),f.qa==e.X?Bi(d,l,c):(!b&&MediaSource.isTypeSupported(l)||!Qc(l,f.qa)||(d.o[f.qa]=new Pc,l=Sc(f.qa,l)),m=d.l.addSourceBuffer(l),d.s.C(m,"error",function(n){return function(){d.i[n.qa][0].p.reject(new M(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.s.C(m,
|
|
280
|
-
function(n){return function(){return Ci(d,n.qa)}}(f)),d.h[f.qa]=m,d.M[f.qa]=l,d.i[f.qa]=[],d.L[f.qa]=!!k.drmInfos.length);A(p)})};function Bi(a,b,c){a.g||(a.g=new $c(a.m));var
|
|
279
|
+
q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return J(function(p){if(1==p.g)return e=jc,u(p,d.G,2);d.u=c;f={};g=r(a.keys());for(h=g.next();!h.done;f={qa:f.qa},h=g.next())f.qa=h.value,k=a.get(f.qa),l=Vc(k.mimeType,k.codecs),f.qa==e.X?Bi(d,l,c,k.external):(!b&&MediaSource.isTypeSupported(l)||!Qc(l,f.qa)||(d.o[f.qa]=new Pc,l=Sc(f.qa,l)),m=d.l.addSourceBuffer(l),d.s.C(m,"error",function(n){return function(){d.i[n.qa][0].p.reject(new M(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.s.C(m,
|
|
280
|
+
"updateend",function(n){return function(){return Ci(d,n.qa)}}(f)),d.h[f.qa]=m,d.M[f.qa]=l,d.i[f.qa]=[],d.L[f.qa]=!!k.drmInfos.length);A(p)})};function Bi(a,b,c,d){a.g||(a.g=new $c(a.m));var e=a.g;a=d||a.F;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,bd[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):Va('Text parsers should have a "setSequenceMode" method!'),e.u=a)}function Di(a){return a.l?"ended"==a.l.readyState:!0}function Ei(a,b){return b==hc?a.g.g:ri(Fi(a,b))}
|
|
281
281
|
function Gi(a,b){return b==hc?a.g.h:si(Fi(a,b))}function Hi(a,b,c){if(b==hc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Fi(a,b);return ui(a,c)}q.Oa=function(){var a={total:vi(this.j.buffered),audio:vi(Fi(this,"audio")),video:vi(Fi(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Fi(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
282
|
-
function Ii(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,p,n,t,y,x,v,w,D,z,B,G,E,H;return J(function(I){switch(I.g){case 1:h=jc;if(b!=h.X){I.A(2);break}if(!a.u){I.A(3);break}return u(I,a.O,4);case 4:k=I.h,a.g.s=k;case 3:return u(I,cd(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return I.return();case 2:if(!a.o[b]){e&&(a.g||Bi(a,"application/cea-608",a.u),d?(l=mi(a.B,c),l.length&&(m=a.h[h.ua].timestampOffset,hd(a.g,l,d.startTime,d.endTime,m))):a.B.init(c));I.A(6);break}f&&
|
|
283
|
-
a.o[b].g.resetCaptions();return u(I,Tc(a.o[b],c),7);case 7:p=I.h,a.g||Bi(a,"application/cea-608",a.u),p.metadata&&(n=a.h[b].timestampOffset,a.T(p.metadata,n,d?d.endTime:null)),p.captions&&p.captions.length&&(t=a.h[h.ua].timestampOffset,y=fd(p.captions),hd(a.g,y,d?d.startTime:null,d?d.endTime:null,t)),c=p.data;case 6:c=Ji(a,c,d?d.startTime:null,b);x=a.h[b];v=Ki;if(!a.u||x.mode==v||!d){I.A(8);break}w=a.l.duration;D=b==h.ua||!(h.ua in a.h);if(!D){I.A(9);break}z=[x.appendWindowStart,x.appendWindowEnd];
|
|
282
|
+
function Ii(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,p,n,t,y,x,v,w,D,z,B,G,E,H;return J(function(I){switch(I.g){case 1:h=jc;if(b!=h.X){I.A(2);break}if(!a.u){I.A(3);break}return u(I,a.O,4);case 4:k=I.h,a.g.s=k;case 3:return u(I,cd(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return I.return();case 2:if(!a.o[b]){e&&(a.g||Bi(a,"application/cea-608",a.u,!1),d?(l=mi(a.B,c),l.length&&(m=a.h[h.ua].timestampOffset,hd(a.g,l,d.startTime,d.endTime,m))):a.B.init(c));I.A(6);break}f&&
|
|
283
|
+
a.o[b].g.resetCaptions();return u(I,Tc(a.o[b],c),7);case 7:p=I.h,a.g||Bi(a,"application/cea-608",a.u,!1),p.metadata&&(n=a.h[b].timestampOffset,a.T(p.metadata,n,d?d.endTime:null)),p.captions&&p.captions.length&&(t=a.h[h.ua].timestampOffset,y=fd(p.captions),hd(a.g,y,d?d.startTime:null,d?d.endTime:null,t)),c=p.data;case 6:c=Ji(a,c,d?d.startTime:null,b);x=a.h[b];v=Ki;if(!a.u||x.mode==v||!d){I.A(8);break}w=a.l.duration;D=b==h.ua||!(h.ua in a.h);if(!D){I.A(9);break}z=[x.appendWindowStart,x.appendWindowEnd];
|
|
284
284
|
x.appendWindowStart=0;x.appendWindowEnd=Infinity;B=x.timestampOffset;x.timestampOffset=0;return u(I,Li(a,b,function(){a.h[b].appendBuffer(c)}),10);case 10:return u(I,Li(a,b,function(){return Mi(a,b)}),11);case 11:return x.timestampOffset=B,x.appendWindowStart=z[0],x.appendWindowEnd=z[1],G=ri(Fi(a,b)),E=(d.startTime||0)-(G||0),a.O.resolve(E),u(I,Li(a,b,function(){return Ni(a,b,0,w)}),12);case 12:if(b!=h.ua){I.A(9);break}return u(I,Li(a,b,function(){a.j.currentTime-=.001;Ci(a,b)}),9);case 9:return x.mode=
|
|
285
285
|
v,u(I,a.Da(w),8);case 8:return d&&a.u&&b!=h.X&&(f||g)&&(H=d.startTime,Li(a,b,function(){return Mi(a,b)}),Li(a,b,function(){return Oi(a,b,H)})),u(I,Li(a,b,function(){a.h[b].appendBuffer(c)}),16);case 16:A(I)}})}function Pi(a,b){var c=Gi(a,"video")||0;ed(a.g,b,c)}function Qi(a){a.g&&ed(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return J(function(f){e=jc;return a==e.X?u(f,d.g.remove(b,c),0):u(f,Li(d,a,function(){return Ni(d,a,b,c)}),0)})};
|
|
286
286
|
function Ri(a,b){var c;return J(function(d){c=jc;return b==c.X?a.g?u(d,a.g.remove(0,Infinity),0):d.return():u(d,Li(a,b,function(){return Ni(a,b,0,a.l.duration)}),0)})}q.flush=function(a){var b=this,c;return J(function(d){c=jc;return a==c.X?d.return():u(d,Li(b,a,function(){b.j.currentTime-=.001;Ci(b,a)}),0)})};
|
|
@@ -295,9 +295,9 @@ q.Pa=function(){return Math.max(0,this.hb()-(this.V()||this.kb()?this.$c:0))};q.
|
|
|
295
295
|
T.prototype.setUserSeekStart=T.prototype.Se;T.prototype.getSegmentAvailabilityStart=T.prototype.Qa;T.prototype.isInProgress=T.prototype.kb;T.prototype.isLive=T.prototype.V;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.Pd;T.prototype.notifyMinSegmentStartTime=T.prototype.Qd;T.prototype.lockStartTime=T.prototype.Jd;T.prototype.notifySegments=T.prototype.Ib;T.prototype.getDelay=T.prototype.uf;T.prototype.setDelay=T.prototype.og;
|
|
296
296
|
T.prototype.setSegmentAvailabilityDuration=T.prototype.ge;T.prototype.setStatic=T.prototype.xc;T.prototype.setClockOffset=T.prototype.Re;T.prototype.getPresentationStartTime=T.prototype.Gf;T.prototype.setDuration=T.prototype.Da;T.prototype.getMaxSegmentDuration=T.prototype.Bf;T.prototype.getDuration=T.prototype.getDuration;function Yi(a,b,c){this.l=c;this.j=a;this.s=Zi(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}Yi.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function $i(a,b){a.i=b}function aj(a){this.g=a}function Zi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(vi(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 bj(a,b,c,d,e){var f=this;this.s=e;this.g=a;this.u=b;this.F=c;this.l=new nf;this.j=!1;this.D=a.readyState;this.B=this.i=0;this.h=d;this.o=!1;this.l.C(a,"waiting",function(){return cj(f)});this.m=(new O(function(){cj(f)})).Fa(.25)}bj.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};bj.prototype.Td=function(){this.o=!0;cj(this)};
|
|
297
297
|
function cj(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=Zi(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 Q("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=wi(c,b,a.F.gapDetectionThreshold),null==
|
|
298
|
-
d||0==d&&!a.o||(e=c.start(d),e>=a.u.Pa()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.B++,a.s(new Q("gapjumped")))))}}};function dj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=ej.value().get(b),c.
|
|
299
|
-
function hj(a,b){.001>Math.abs(a.g.currentTime-b)?lj(a):(a.h.
|
|
300
|
-
function kj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Fa(.1)};function mj(a){this.g=a;this.j=!1;this.h=null;this.i=new nf}q=mj.prototype;q.wd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.
|
|
298
|
+
d||0==d&&!a.o||(e=c.start(d),e>=a.u.Pa()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.B++,a.s(new Q("gapjumped")))))}}};function dj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=ej.value().get(b),c.da(a,b,d))}var ej=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 fj(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 nf;this.i=new gj(a);dj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){hj(e,e.j)})}fj.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 ij(a){return a.m?a.g.currentTime:a.j}function jj(a,b){0<a.g.readyState?kj(a.i,b):dj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){hj(a,a.j)})}
|
|
299
|
+
function hj(a,b){.001>Math.abs(a.g.currentTime-b)?lj(a):(a.h.da(a.g,"seeking",function(){lj(a)}),kj(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function lj(a){a.m=!0;a.h.C(a.g,"seeking",function(){return a.l()});a.o(a.g.currentTime)}function gj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}gj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
|
|
300
|
+
function kj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Fa(.1)};function mj(a){this.g=a;this.j=!1;this.h=null;this.i=new nf}q=mj.prototype;q.wd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.da(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;dj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.xd=function(a){this.h=this.j?this.h:a};q.Fc=function(){return(this.j?this.g.currentTime:this.h)||0};q.ne=function(){return 0};
|
|
301
301
|
q.me=function(){return 0};q.Ie=function(){};
|
|
302
302
|
function nj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.u=e;this.s=null;this.o=oj(a,c,f);this.j=new bj(a,b.presentationTimeline,c,this.o,f);this.h=new fj(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=ij(g.h);h=pj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;jj(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)},qj(this,d));this.m=new O(function(){if(0!=g.i.readyState&&
|
|
303
303
|
!g.i.paused){var h=ij(g.h),k=g.g.Db(),l=g.g.Pa();3>l-k&&(k=l-3);h<k&&(h=pj(g,h),g.i.currentTime=h)}})}q=nj.prototype;q.wd=function(){this.m.Fa(.25)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.u=function(){}};q.xd=function(a){jj(this.h,a)};q.Fc=function(){var a=ij(this.h);return 0<this.i.readyState&&!this.i.paused?rj(this,a):a};q.ne=function(){return this.o?this.o.o:0};
|
|
@@ -318,9 +318,9 @@ if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].
|
|
|
318
318
|
"regionremove",function(d){c.g.delete(d.region)})}pa(Gj,Ve);Gj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Ve.prototype.release.call(this)};Gj.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=r(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Jj:a>d.endTime?Kj:Hj;this.g.set(d,f);for(var g=r(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.sb==e&&h.rb==f&&h.jb(d,b)}}};
|
|
319
319
|
function Ij(a,b,c,d){b=new Q(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Jj=1,Hj=2,Kj=3;function Lj(a,b,c,d,e){a=df(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Mj(a,b){var c=this;this.g=b;this.m=a;this.j=null;this.u=1;this.o=this.l=null;this.D=0;this.i=new Map;this.B=!1;this.F=null;this.s=!1;this.h=new lf(function(){return Nj(c)})}q=Mj.prototype;q.destroy=function(){return this.h.destroy()};function Nj(a){var b,c,d,e;return J(function(f){if(1==f.g){b=[];c=r(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Oj(e),b.push(Pj(e));return u(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.j=null;A(f)})}
|
|
320
320
|
q.configure=function(a){this.j=a;this.F=new Je({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};q.start=function(){var a=this;return J(function(b){if(1==b.g)return u(b,Qj(a),2);mf(a.h);a.B=!0;A(b)})};
|
|
321
|
-
function Rj(a,b){var c,d,e,f,g,h,k;J(function(l){switch(l.g){case 1:return c=jc,a.D++,d=a.D,C(l,2),u(l,Ri(a.g.P,c.X),4);case 4:ua(l,3);break;case 2:if(e=F(l),a.g)a.g.onError(e);case 3:f=Vc(b.mimeType,b.codecs),Bi(a.g.P,f,a.m.sequenceMode),g=a.g.P.m,(h=g.isTextVisible()||a.j.alwaysStreamText)&&a.D==d&&(k=Sj(b),a.i.set(c.X,k),Tj(a,k,0)),A(l)}})}function Uj(a){var b=a.i.get(hc);b&&(Oj(b),Pj(b).catch(function(){}),a.i.delete(hc));a.o=null}
|
|
321
|
+
function Rj(a,b){var c,d,e,f,g,h,k;J(function(l){switch(l.g){case 1:return c=jc,a.D++,d=a.D,C(l,2),u(l,Ri(a.g.P,c.X),4);case 4:ua(l,3);break;case 2:if(e=F(l),a.g)a.g.onError(e);case 3:f=Vc(b.mimeType,b.codecs),Bi(a.g.P,f,a.m.sequenceMode,b.external),g=a.g.P.m,(h=g.isTextVisible()||a.j.alwaysStreamText)&&a.D==d&&(k=Sj(b),a.i.set(c.X,k),Tj(a,k,0)),A(l)}})}function Uj(a){var b=a.i.get(hc);b&&(Oj(b),Pj(b).catch(function(){}),a.i.delete(hc));a.o=null}
|
|
322
322
|
function Vj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.pb&&(Wj(a,b,!1,0,!1),c.pb=d);else if(d=c.pb)c.pb=null,Wj(a,d,!0,0,!1)}}function Xj(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.l=b;a.B&&(b.video&&Wj(a,b.video,c,d,e,f),b.audio&&Wj(a,b.audio,c,d,e,f))}function Yj(a,b){a.o=b;a.B&&Wj(a,b,!0,0,!1)}
|
|
323
|
-
function Wj(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=hc?g&&(g.pb&&(b.trickModeVideo?(g.pb=b,b=b.trickModeVideo):g.pb=null),g.stream!=b||e)&&(b.type==hc&&Bi(a.g.P,Vc(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.Y=null,g.oe=!!f,c&&(g.bc?g.fd=!0:g.ta?(g.bb=!0,g.Ic=d,g.fd=!0):(Oj(g),Zj(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),ak(a,g).catch(function(h){if(a.g)a.g.onError(h)})):Rj(a,b)}
|
|
323
|
+
function Wj(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=hc?g&&(g.pb&&(b.trickModeVideo?(g.pb=b,b=b.trickModeVideo):g.pb=null),g.stream!=b||e)&&(b.type==hc&&Bi(a.g.P,Vc(b.mimeType,b.codecs),a.m.sequenceMode,b.external),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.Y=null,g.oe=!!f,c&&(g.bc?g.fd=!0:g.ta?(g.bb=!0,g.Ic=d,g.fd=!0):(Oj(g),Zj(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),ak(a,g).catch(function(h){if(a.g)a.g.onError(h)})):Rj(a,b)}
|
|
324
324
|
function ak(a,b){var c,d;return J(function(e){if(1==e.g){if(!b.wa)return e.return();c=b.stream;d=b.wa;return c.segmentIndex?e.A(2):u(e,c.createSegmentIndex(),2)}if(b.wa!=d||b.stream!=c)return e.return();var f=a.g.Pc();var g=Gi(a.g.P,b.type),h=b.stream.segmentIndex.find(b.sa?b.sa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.na?k.na-k.Ea:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.i)&&(h+=(k.na?k.na-k.Ea:null)||0),k=a.g.getBandwidthEstimate(),
|
|
325
325
|
f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal)||b.wa.h.g>h?!0:!1):f=!1;f&&b.wa.abort();A(e)})}
|
|
326
326
|
q.uc=function(){if(this.g)for(var a=this.g.Pc(),b=r(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.Y&&(e=c.Y.current());if(!e||e.startTime>a||e.endTime<a)c.Y=null;e=this.g.P;d==hc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Fi(e,d),e=ti(e,a));if(!e){(null!=Gi(this.g.P,d)||c.ta)&&bk(this,c);c.wa&&(c.wa.abort(),c.wa=null);if(d===hc)for(d=this.g.P.B.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,$h(d),d=r(d.j.values()),e=d.next();!e.done;e=d.next())Vh(e.value);
|
|
@@ -391,10 +391,10 @@ preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",prefe
|
|
|
391
391
|
sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return J(function(h){return h.return(ol(g,f.preferredAudioLanguage))})};return f}function pl(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 gl(a,b,c||nl(),d,"")}
|
|
392
392
|
function ol(a,b){var c=a.filter(function(g){return"variant"==g.type}),d=[],e=vd(b,c.map(function(g){return g.language}));e&&(d=c.filter(function(g){return kd(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/
|
|
393
393
|
2),d.sort(function(g,h){return g.bandwidth-h.bandwidth}),b.push(d[c]));a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,d.type!=hc&&"image"!=d.type||b.push(d);return b}L("shaka.util.PlayerConfiguration",ml);ml.mergeConfigObjects=pl;ml.createDefault=nl;function ql(){this.g=null;this.h=[]}function rl(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 sl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=r(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}
|
|
394
|
-
function tl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function ul(){this.i=this.h=null;this.g=[]}function vl(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 wl(){this.u=this.B=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.O=this.T=this.J=this.L=this.M=this.l=this.o=NaN;this.g=new ql;this.h=new ul};function U(a,b){Ve.call(this);var c=this;this.l=xl;this.Kc=this.g=null;this.
|
|
395
|
-
this.$b=this.h.preferForcedSubs;this.Yb=[];this.ec=null;b&&b(this);this.F=zl(this);this.F.de(this.h.streaming.forceHTTPS);this.D=null;Al&&(this.D=Al());this.Sc.C(window,"online",function(){c.Yd()});this.O={name:"detach"};this.Z={name:"attach"};this.
|
|
396
|
-
f){return Qe(Bl(c,e,f))});d.set(this.O,function(e){e.K&&(c.Ob.ob(),e.K=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Qe(e)});d.set(this.
|
|
397
|
-
function(e,f){return Jl(c,e,f)});this.ya=new pk(this.O,{Df:function(e,f,g,h){var k=null;e==c.O&&(k=g==c.O?c.O:c.Z);e==c.Z&&(k=g==c.O||f.K!=h.K?c.O:g==c.Z?c.Z:g==c.wb||g==c.$?c.wb:g==c.yb?c.Ud:null);e==c.wb&&(k=g==c.$&&f.K==h.K?c.Rd:c.
|
|
394
|
+
function tl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function ul(){this.i=this.h=null;this.g=[]}function vl(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 wl(){this.u=this.B=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.O=this.T=this.J=this.L=this.M=this.l=this.o=NaN;this.g=new ql;this.h=new ul};function U(a,b){Ve.call(this);var c=this;this.l=xl;this.Kc=this.g=null;this.ea=!1;this.Sc=new nf;this.Ob=new nf;this.u=new nf;this.Ed=this.s=this.Xb=this.i=this.Tc=this.J=this.j=this.ka=this.T=this.la=this.M=this.Lc=this.G=this.xb=this.B=this.L=this.m=this.F=null;this.Ke=1E9;this.h=yl(this);this.dc={width:Infinity,height:Infinity};this.o=null;this.Ma=new Be(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.vb=this.h.preferredTextLanguage;this.ac=this.h.preferredTextRole;
|
|
395
|
+
this.$b=this.h.preferForcedSubs;this.Yb=[];this.ec=null;b&&b(this);this.F=zl(this);this.F.de(this.h.streaming.forceHTTPS);this.D=null;Al&&(this.D=Al());this.Sc.C(window,"online",function(){c.Yd()});this.O={name:"detach"};this.Z={name:"attach"};this.ga={name:"unload"};this.Rd={name:"manifest-parser"};this.Nd={name:"manifest"};this.wb={name:"media-source"};this.Fd={name:"drm-engine"};this.$={name:"load"};this.Ud={name:"src-equals-drm-engine"};this.yb={name:"src-equals"};var d=new Map;d.set(this.Z,function(e,
|
|
396
|
+
f){return Qe(Bl(c,e,f))});d.set(this.O,function(e){e.K&&(c.Ob.ob(),e.K=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Qe(e)});d.set(this.ga,function(e){return Qe(Cl(c,e))});d.set(this.wb,function(e){e=Dl(c,e);return Qe(e)});d.set(this.Rd,function(e,f){e=El(c,e,f);return Qe(e)});d.set(this.Nd,function(e){return Fl(c,e)});d.set(this.Fd,function(e){e=Gl(c,e);return Qe(e)});d.set(this.$,function(e,f){return Qe(Hl(c,e,f))});d.set(this.Ud,function(e,f){e=Il(c,e,f);return Qe(e)});d.set(this.yb,
|
|
397
|
+
function(e,f){return Jl(c,e,f)});this.ya=new pk(this.O,{Df:function(e,f,g,h){var k=null;e==c.O&&(k=g==c.O?c.O:c.Z);e==c.Z&&(k=g==c.O||f.K!=h.K?c.O:g==c.Z?c.Z:g==c.wb||g==c.$?c.wb:g==c.yb?c.Ud:null);e==c.wb&&(k=g==c.$&&f.K==h.K?c.Rd:c.ga);e==c.Rd&&(k=Kl(c.$,c.Nd,c.ga,g,f,h));e==c.Nd&&(k=Kl(c.$,c.Fd,c.ga,g,f,h));e==c.Fd&&(k=Kl(c.$,c.$,c.ga,g,f,h));e==c.Ud&&(k=g==c.yb&&f.K==h.K?c.yb:c.ga);if(e==c.$||e==c.yb)k=c.ga;e==c.ga&&(k=h.K&&f.K==h.K?c.Z:c.O);return k},nf:function(e,f,g){c.dispatchEvent(Ll("onstatechange",
|
|
398
398
|
(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return J(function(f){return 1==f.g?u(f,Cl(c,e),2):f.return(e.K?c.Z:c.O)})},Wf:function(e){c.dispatchEvent(Ll("onstateidle",(new Map).set("state",e.name)))}});this.Je=new O(function(){Md(c.i.variants,c.h.restrictions,c.dc)&&Ml(c)});a&&this.Zb(a,!0)}pa(U,Ve);function Ll(a,b){return new Q(a,b)}q=U.prototype;
|
|
399
399
|
q.destroy=function(){var a=this,b;return J(function(c){switch(c.g){case 1:if(a.l==Nl)return c.return();a.l=Nl;b=uk(a.ya,function(){return{node:a.O,payload:qk(),ib:!1}});return u(c,new Promise(function(d){b.Jb=function(){};b.Wc=function(){d()};b.nb=function(){d()};b.onError=function(){d()};b.Yc=function(){d()}}),2);case 2:return u(c,a.ya.destroy(),3);case 3:a.Sc&&(a.Sc.release(),a.Sc=null);a.Ob&&(a.Ob.release(),a.Ob=null);a.u&&(a.u.release(),a.u=null);a.Ed=null;a.h=null;a.o=null;a.Kc=null;a.T=null;
|
|
400
400
|
if(!a.F){c.A(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:a.s&&(a.s.release(),a.s=null),Ve.prototype.release.call(a),A(c)}})};q.Zb=function(a,b){b=void 0===b?!0:b;if(this.l==Nl)return Promise.reject(Ol());var c=qk();c.K=a;nc()||(b=!1);var d=b?this.wb:this.Z;a=uk(this.ya,function(){return{node:d,payload:c,ib:!1}});a.Jb=function(){};return Pl(a)};
|
|
@@ -415,15 +415,15 @@ function Gl(a,b){var c,d;return J(function(e){return 1==e.g?(c=Date.now()/1E3,d=
|
|
|
415
415
|
function Hl(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y;return J(function(x){switch(x.g){case 1:b.startTime=c.startTime;null!=a.ec&&(b.startTime=a.ec,a.ec=null);d=b.K;e=b.uri;a.Xb=e;a.G=new xj({Qc:function(){return d.playbackRate},Mc:function(){return d.defaultPlaybackRate},fe:function(v){d.playbackRate=v},He:function(v){d.currentTime+=v}});f=function(){return em(a)};g=function(){return fm(a)};a.u.C(d,"playing",f);a.u.C(d,"pause",f);a.u.C(d,"ended",f);a.u.C(d,"ratechange",g);h=a.h.abrFactory;a.s&&a.Ed==h||
|
|
416
416
|
(a.Ed=h,a.s=h(),"function"!=typeof a.s.setMediaElement&&(se(),a.s.setMediaElement=function(){}),a.s.configure(a.h.abr));a.Ma=new Be(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.vb=a.h.preferredTextLanguage;a.ac=a.h.preferredTextRole;a.$b=a.h.preferForcedSubs;gm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.s.init(function(v,w,D){a.j&&v!=a.j.l&&hm(a,v,!0,void 0===w?!1:w,void 0===D?0:D)});a.s.setMediaElement(d);a.B=im(a,b.startTime);a.xb=jm(a,
|
|
417
417
|
b.bd);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);km(a,k);yd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=lm(a);a.j.configure(a.h.streaming);a.l=mm;d.textTracks&&a.u.C(d.textTracks,"addtrack",function(v){if(v.track)switch(v=v.track,v.kind){case "chapters":nm(a,v)}});a.dispatchEvent(Ll("streaming"));l=null;if(m=a.Za().find(function(v){return v.active})){x.A(2);break}l=Ml(a);hm(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){x.A(2);
|
|
418
|
-
break}p=a.B.Fc();return u(x,om(l,p),4);case 4:n=x.h,a.B.xd(n);case 2:return a.B.wd(),t=a.Fb().find(function(v){return v.active}),t||((y=ke(a.i.textStreams,a.vb,a.ac,a.$b)[0]||null)&&vl(a.o.h,y,!0),l&&(y?(l.audio&&pm(a,l.audio,y)&&(a.
|
|
419
|
-
a.u.
|
|
418
|
+
break}p=a.B.Fc();return u(x,om(l,p),4);case 4:n=x.h,a.B.xd(n);case 2:return a.B.wd(),t=a.Fb().find(function(v){return v.active}),t||((y=ke(a.i.textStreams,a.vb,a.ac,a.$b)[0]||null)&&vl(a.o.h,y,!0),l&&(y?(l.audio&&pm(a,l.audio,y)&&(a.ea=!0),a.ea&&a.L.m.setTextVisibility(!0),qm(a)):a.ea=!1),y&&(a.h.streaming.alwaysStreamText||a.Dd())&&Yj(a.j,y)),u(x,a.j.start(),5);case 5:a.h.abr.enabled&&(a.s.enable(),rm(a)),Pd(a.j?a.j.l:null,a.i),sm(a.i),tm(a),um(a),a.i.variants.some(function(v){return v.primary}),
|
|
419
|
+
a.u.da(d,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.bd}),A(x)}})}
|
|
420
420
|
function Il(a,b,c){var d,e,f,g,h,k,l;return J(function(m){return 1==m.g?(d=jc,e=Date.now()/1E3,f=!0,a.m=bm(a,{lb:a.F,onError:function(p){Ul(a,p)},Xc:function(p){cm(a,p)},onExpirationUpdated:function(p,n){dm(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=Wg(g),k=Sl[h],"application/x-mpegurl"==k&&uc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
|
|
421
|
-
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?Zc(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.ua,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,
|
|
422
|
-
a.m.$=!0,u(m,og(a.m,[l],[]),2)):u(m,a.m.Zb(b.K),0)})}
|
|
421
|
+
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?Zc(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.ua,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,
|
|
422
|
+
decodingInfos:[]},a.m.$=!0,u(m,og(a.m,[l],[]),2)):u(m,a.m.Zb(b.K),0)})}
|
|
423
423
|
function Jl(a,b,c){function d(){return em(a)}b.uri=c.uri;b.startTime=c.startTime;a.Xb=b.uri;var e=b.K;a.B=new mj(e);var f=!1;a.Yb.push(function(){f=!0});null!=b.startTime&&a.B.xd(b.startTime);a.G=new xj({Qc:function(){return e.playbackRate},Mc:function(){return e.defaultPlaybackRate},fe:function(k){e.playbackRate=k},He:function(k){e.currentTime+=k}});km(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 fm(a)});"none"!=
|
|
424
|
-
e.preload&&a.u.
|
|
425
|
-
"change",function(){return tm(a)}));var g=Wg(b.uri);e.src=Yk(a.T,b.uri,Sl[g]);(sc()||rc("Web0S"))&&e.load();a.l=wm;a.dispatchEvent(Ll("streaming"));var h=new kc;dj(e,HTMLMediaElement.HAVE_METADATA,a.u,function(){a.B.wd();h.resolve()});dj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.u,function(){var k;return J(function(l){if(1==l.g)return xm(a),k=ym(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.
|
|
426
|
-
2);if(f)return l.return();zm(a);A(l)})});e.error?h.reject(Tl(a)):"none"==e.preload&&(Va('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.u.
|
|
424
|
+
e.preload&&a.u.da(e,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.bd});e.audioTracks&&(a.u.C(e.audioTracks,"addtrack",function(){return tm(a)}),a.u.C(e.audioTracks,"removetrack",function(){return tm(a)}),a.u.C(e.audioTracks,"change",function(){return tm(a)}));e.textTracks&&(a.u.C(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":vm(a,k);break;case "chapters":nm(a,k);break;default:tm(a)}}),a.u.C(e.textTracks,"removetrack",function(){return tm(a)}),a.u.C(e.textTracks,
|
|
425
|
+
"change",function(){return tm(a)}));var g=Wg(b.uri);e.src=Yk(a.T,b.uri,Sl[g]);(sc()||rc("Web0S"))&&e.load();a.l=wm;a.dispatchEvent(Ll("streaming"));var h=new kc;dj(e,HTMLMediaElement.HAVE_METADATA,a.u,function(){a.B.wd();h.resolve()});dj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.u,function(){var k;return J(function(l){if(1==l.g)return xm(a),k=ym(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.ea=!0),l.A(2)):u(l,new Promise(function(m){a.u.da(e.textTracks,"change",m);(new O(m)).R(1)}),
|
|
426
|
+
2);if(f)return l.return();zm(a);A(l)})});e.error?h.reject(Tl(a)):"none"==e.preload&&(Va('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.u.da(e,"error",function(){h.reject(Tl(a))});return new Me(h,function(){h.reject(new M(2,7,7001));return Promise.resolve()})}
|
|
427
427
|
function xm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.ae(b);var c=a.h.preferredVariantRole;""!=c&&a.ae(b,c)}}function zm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.be(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.be(b,d,c)}}
|
|
428
428
|
function vm(a,b){if("metadata"==b.kind){b.mode="hidden";a.u.C(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Xl(a,e.startTime,e.endTime,e.type,e.value),a.D)a.D.onCueMetadataChange(e.value)});var c=(new O(function(){var d=Am(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Nb().R(.5);a.Yb.push(function(){c.stop()})}}
|
|
429
429
|
function Xl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Ll("metadata",b))}function nm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).Nb().R(.5);a.Yb.push(function(){c.stop()})}}function am(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}function bm(a,b){return new hg(b,a.h.drm.updateExpirationTime)}
|
|
@@ -445,17 +445,17 @@ q.Za=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.va
|
|
|
445
445
|
q.Fb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=be(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?ym(this).map(function(f){return fe(f)}):[]};q.wf=function(){return this.i?this.i.imageStreams.map(function(a){return ce(a)}):[]};
|
|
446
446
|
q.Jf=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,B;return J(function(G){if(1==G.g)return c.i?(d=c.i.imageStreams.find(function(E){return E.id==a}))?d.segmentIndex?G.A(3):u(G,d.createSegmentIndex(),3):G.return(null):G.A(2);if(2!=G.g){e=d.segmentIndex.find(b);if(null==e)return G.return(null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return G.return(null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);p=parseInt(h[2],10);n=k/m;t=l/p;y=m*p;x=f.j-
|
|
447
447
|
f.startTime;v=f.o||x/y;w=f.startTime;z=D=0;1<y&&(B=Math.floor((b-f.startTime)/v),w=f.startTime+B*v,D=B%m*n,z=Math.floor(B/m)*t);return G.return({imageHeight:l,imageWidth:k,height:t,positionX:D,positionY:z,startTime:w,duration:v,uris:f.Ba(),width:n})}return G.return(null)})};
|
|
448
|
-
q.Oe=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&&(vl(this.o.h,b,!1),Yj(this.j,b),Fm(this),this.vb=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=ym(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,de(c)==a.id?c.mode=this.
|
|
448
|
+
q.Oe=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&&(vl(this.o.h,b,!1),Yj(this.j,b),Fm(this),this.vb=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=ym(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,de(c)==a.id?c.mode=this.ea?"showing":"hidden":c.mode="disabled";Fm(this)}};
|
|
449
449
|
q.Pe=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Va("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&ie(d)&&(hm(this,d,!1,b,c),this.Ma=new Ae(d),um(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
|
|
450
450
|
de(c)==a.id){Gm(this,c);break}};q.qf=function(){return Hm(this.Za())};q.If=function(){return Hm(this.Fb())};q.pf=function(){return Array.from(Im(this.Za()))};q.Hf=function(){return Array.from(Im(this.Fb()))};
|
|
451
451
|
q.ae=function(a,b){if(this.i&&this.B){this.Ma=new Be(a,b||"",0,"");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 c=this.Ma.create(this.i.variants),d=null;c=r(c.values());for(var e=c.next();!e.done;e=c.next())if(e=e.value,!d||b(d,a)>b(e,a))d=e;d?(b=ae(d),this.Pe(b,!0)):Em(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);a=kd(a);c=d=null;e=
|
|
452
452
|
r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=he(f);kd(g.language)==a&&(d=f,b?g.roles.includes(b)&&(c=f):0==g.roles.length&&(c=f))}c?Gm(this,c):d&&Gm(this,d)}};
|
|
453
453
|
q.be=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.B){if(this.vb=a,this.ac=b||"",this.$b=c,(a=ke(this.i.textStreams,this.vb,this.ac,this.$b)[0]||null)&&a!=this.j.o&&(vl(this.o.h,a,!1),this.h.streaming.alwaysStreamText||this.Dd()))Yj(this.j,a),Fm(this)}else{var d=kd(a);(a=this.Fb().find(function(e){return kd(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Oe(a)}};
|
|
454
454
|
q.jg=function(a){if(this.i&&this.B){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Ma=new Be(b.language,"",0,a),Em(this))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&Gm(this,b)}};
|
|
455
|
-
q.Dd=function(){var a=this.
|
|
455
|
+
q.Dd=function(){var a=this.ea;return this.L?this.L.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?ym(this).some(function(b){return"showing"==b.mode}):a};q.Ae=function(){return this.g&&this.g.src&&this.g.textTracks?Jm(this).map(function(a){return fe(a)}):[]};
|
|
456
456
|
q.tf=function(a){var b=kd(a),c=Jm(this).filter(function(h){return kd(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=r(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=r(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
|
|
457
457
|
function ym(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Am(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Jm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
458
|
-
q.pg=function(a){a=!!a;if(this.
|
|
458
|
+
q.pg=function(a){a=!!a;if(this.ea!=a){this.ea=a;if(this.l==mm)this.L.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=ke(this.i.textStreams,this.vb,this.ac,this.$b),0<a.length&&(Yj(this.j,a[0]),Fm(this))):Uj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=ym(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}qm(this)}};
|
|
459
459
|
q.Ff=function(){if(!this.V())return null;var a=this.ya.l,b=0;if(this.B)b=this.B.Fc();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
|
|
460
460
|
q.Be=function(){if(!this.V())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.Oa=function(){if(this.l==mm)return this.L.Oa();var a={total:[],audio:[],video:[],text:[]};this.l==wm&&(a.total=vi(this.g.buffered));return a};
|
|
461
461
|
q.getStats=function(){if(this.l!=mm&&this.l!=wm)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:[]};em(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.o;b=
|
|
@@ -464,8 +464,8 @@ Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.B&&(this.o.O=this.B.me()
|
|
|
464
464
|
id:E.id,type:E.type,fromAdaptation:E.fromAdaptation,bandwidth:E.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:p,manifestTimeSeconds:n,drmTimeSeconds:t,playTime:y,pauseTime:x,bufferingTime:v,licenseTime:w,liveLatency:D,maxSegmentDuration:z,stateHistory:B,switchHistory:G}};
|
|
465
465
|
q.af=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,t,y,x,v,w,D;return J(function(z){switch(z.g){case 1:if(h.l!=mm&&h.l!=wm)throw new M(1,7,7004);if(d){z.A(2);break}return u(z,Km(h,a),3);case 3:d=z.h;case 2:k=[];if(h.D)try{k=h.D.getServerSideCuePoints()}catch(B){}if(h.l!=wm){z.A(4);break}g&&(c="forced");return u(z,Lm(h,a,b,c,d,f||"",k),5);case 5:l=h.Fb();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return tm(h),z.return(m);throw new M(1,2,2012);case 4:p=
|
|
466
466
|
jc;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new M(1,4,4033);if(!k.length){z.A(6);break}return u(z,Mm(h,a,h.F,h.h.streaming.retryParameters),7);case 7:t=z.h,y=Nm(h,t,d,k),x=new Blob([y],{type:"text/vtt"}),a=Ai(x),d="text/vtt";case 6:v={id:h.Ke++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:vj(0,n,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.X,primary:!1,trickModeVideo:null,
|
|
467
|
-
emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=Vc(v.mimeType,v.codecs);D=ad(w);if(!D)throw new M(2,2,2014,d);h.i.textStreams.push(v);tm(h);return z.return(be(v))}})};
|
|
468
|
-
q.$e=function(a,b,c){var d=this,e,f,g,h;return J(function(k){switch(k.g){case 1:if(d.l!=mm&&d.l!=wm)throw new M(1,7,7004);if(c){k.A(2);break}return u(k,Km(d,a),3);case 3:c=k.h;case 2:e=[];if(d.D)try{e=d.D.getServerSideCuePoints()}catch(l){}return u(k,Lm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Ae();h=g.find(function(l){return l.language==b});if(!h){k.A(5);break}return u(k,new Promise(function(l,m){d.u.
|
|
467
|
+
emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!0};w=Vc(v.mimeType,v.codecs);D=ad(w);if(!D)throw new M(2,2,2014,d);h.i.textStreams.push(v);tm(h);return z.return(be(v))}})};
|
|
468
|
+
q.$e=function(a,b,c){var d=this,e,f,g,h;return J(function(k){switch(k.g){case 1:if(d.l!=mm&&d.l!=wm)throw new M(1,7,7004);if(c){k.A(2);break}return u(k,Km(d,a),3);case 3:c=k.h;case 2:e=[];if(d.D)try{e=d.D.getServerSideCuePoints()}catch(l){}return u(k,Lm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Ae();h=g.find(function(l){return l.language==b});if(!h){k.A(5);break}return u(k,new Promise(function(l,m){d.u.da(f,"load",l);d.u.da(f,"error",function(){m(new M(1,2,2015))})}),6);case 6:return k.return(h);
|
|
469
469
|
case 5:throw new M(1,2,2012);}})};function Km(a,b){var c,d;return J(function(e){switch(e.g){case 1:c=Wg(b);if(d=Om[c])return e.return(d);C(e,2);return u(e,Yg(b,a.F,a.h.streaming.retryParameters),4);case 4:d=e.h;ua(e,3);break;case 2:F(e);case 3:if(d)return e.return(d);throw new M(1,2,2011,c);}})}
|
|
470
470
|
function Lm(a,b,c,d,e,f,g){var h,k,l,m;return J(function(p){if(1==p.g)return"text/vtt"!=e||g.length?u(p,Mm(a,b,a.F,a.h.streaming.retryParameters),3):p.A(2);2!=p.g&&(h=p.h,k=Nm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Ai(l),e="text/vtt");m=document.createElement("track");var n=a.T,t=b;try{if(n.g.enabled){var y=Zk(n);y.ot=el;y.su=!0;var x=al(y);var v=bl(t,x)}else v=t}catch(w){Wa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",w),v=t}m.src=v;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
|
|
471
471
|
a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p.return(m)})}function Mm(a,b,c,d){var e,f,g;return J(function(h){if(1==h.g){e=kf;f=df([b],d);f.method="GET";var k=a.T;try{k.g.enabled&&Xk(k,f,{ot:el,su:!0})}catch(l){Wa("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)})}
|
|
@@ -473,7 +473,7 @@ function Nm(a,b,c,d){var e=bd[c];if(e)return c=e(),a={periodStart:0,segmentStart
|
|
|
473
473
|
q.zf=function(){Va("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};q.Af=function(){return this.Tc};
|
|
474
474
|
function yl(a){var b=nl();b.streaming.failureCallback=function(c){if(a.V()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Yd(d))}};b.textDisplayFactory=function(){return a.Kc?new Dk(a.g,a.Kc):new yk(a.g)};return b}q.Te=function(a){this.Kc=a};
|
|
475
475
|
function $l(a,b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new wj;h={id:a.Ke++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
|
|
476
|
-
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:hc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function Zl(a,b){return J(function(c){if(1==c.g)return u(c,Pm(a,b),2);Dm(a,b);A(c)})}
|
|
476
|
+
segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:hc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1};b.textStreams.push(h);c.add(g)}}function Zl(a,b){return J(function(c){if(1==c.g)return u(c,Pm(a,b),2);Dm(a,b);A(c)})}
|
|
477
477
|
function Pm(a,b){var c;return J(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Nd(c,b),2);sm(b);A(d)})}
|
|
478
478
|
function Dm(a,b){if(a.l!=Nl){Md(b.variants,a.h.restrictions,a.dc)&&a.j&&tm(a);var c=a.m?a.m.g:null;if(c&&a.m.u)for(var d=r(b.variants),e=d.next();!e.done;e=d.next()){e=e.value;e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem){f=r(f.initData||[]);for(var g=f.next();!g.done;g=f.next())g=g.value,xg(a.m,g.initDataType,g.initData)}}Qm(a,b)}}
|
|
479
479
|
function om(a,b){var c,d,e,f,g;return J(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,p,n;return J(function(t){if(1==t.g)return k?u(t,k.createSegmentIndex(),2):t.return(null);p=(m=k.segmentIndex.Cb(l))?m.next().value:null;if(!p)return t.return(null);n=p.startTime;return t.return(n)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
|
|
@@ -499,18 +499,18 @@ U.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return J(function(h
|
|
|
499
499
|
nc()?!!Xg[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(Xi));
|
|
500
500
|
k={};n=r(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=nc()?ad(l)?!0:MediaSource.isTypeSupported(l)||Qc(l):oc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Vm;for(g in f)e[g]=f[g]();return h.return(e)})};
|
|
501
501
|
U.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||rc("Trident/"))return!1;var a=wc();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:nc()?!0:oc("application/x-mpegurl")};U.setAdManagerFactory=function(a){Al=a};
|
|
502
|
-
U.registerSupportPlugin=function(a,b){Vm[a]=b};U.prototype.destroy=U.prototype.destroy;var Nl=0,xl=1,mm=2,wm=3;U.LoadMode={DESTROYED:Nl,NOT_LOADED:xl,MEDIA_SOURCE:mm,SRC_EQUALS:wm};U.version="v4.2.
|
|
502
|
+
U.registerSupportPlugin=function(a,b){Vm[a]=b};U.prototype.destroy=U.prototype.destroy;var Nl=0,xl=1,mm=2,wm=3;U.LoadMode={DESTROYED:Nl,NOT_LOADED:xl,MEDIA_SOURCE:mm,SRC_EQUALS:wm};U.version="v4.2.14";var Wm=["4","2"];te=new function(a){this.g=a;this.i=ue;this.h=ve}(new re(Number(Wm[0]),Number(Wm[1])));
|
|
503
503
|
var Um=["output-restricted","internal-error"],Vm={},Al=null,Sl={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"},Om={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
|
|
504
504
|
ssa:"text/x-ssa",ass:"text/x-ssa"};function Xm(){this.h=[];this.j=this.i=this.g=0};function V(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 nf;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})}q=V.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
|
|
505
505
|
q.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
|
|
506
506
|
q.isLinear=function(){return this.h.isLinear()};q.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)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};
|
|
507
507
|
q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};L("shaka.ads.ClientSideAd",V);V.prototype.release=V.prototype.release;V.prototype.getPositionInSequence=V.prototype.getPositionInSequence;V.prototype.getSequenceLength=V.prototype.getSequenceLength;V.prototype.setMuted=V.prototype.setMuted;V.prototype.resize=V.prototype.resize;V.prototype.isLinear=V.prototype.isLinear;V.prototype.isMuted=V.prototype.isMuted;
|
|
508
508
|
V.prototype.setVolume=V.prototype.setVolume;V.prototype.getVolume=V.prototype.getVolume;V.prototype.play=V.prototype.play;V.prototype.pause=V.prototype.pause;V.prototype.skip=V.prototype.skip;V.prototype.canSkipNow=V.prototype.canSkipNow;V.prototype.getTimeUntilSkippable=V.prototype.getTimeUntilSkippable;V.prototype.isSkippable=V.prototype.isSkippable;V.prototype.isPaused=V.prototype.isPaused;V.prototype.getRemainingTime=V.prototype.getRemainingTime;V.prototype.getMinSuggestedDuration=V.prototype.getMinSuggestedDuration;
|
|
509
|
-
V.prototype.getDuration=V.prototype.getDuration;function Ym(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.
|
|
510
|
-
function(f){$m(e,f)});this.h.C(this.i,"ended",function(){e.m.contentComplete()})}Ym.prototype.stop=function(){this.g&&this.g.stop();this.o&&Ck(this.o)};Ym.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function $m(a,b){b.getError();an(a,null);a.l(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
511
|
-
function Zm(a,b){a.l(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.
|
|
512
|
-
function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,cn(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,cn(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,cn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.h.
|
|
513
|
-
null)}}function cn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
509
|
+
V.prototype.getDuration=V.prototype.getDuration;function Ym(a,b,c,d){var e=this;this.o=a;this.i=b;this.u=!1;this.s=null;this.B=NaN;this.l=d;this.j=null;this.h=new nf;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.2.14");this.g=null;this.h.da(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Zm(e,f)});this.h.C(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
|
|
510
|
+
function(f){$m(e,f)});this.h.C(this.i,"ended",function(){e.m.contentComplete()});this.h.da(this.i,"play",function(){e.u=!0})}Ym.prototype.stop=function(){this.g&&this.g.stop();this.o&&Ck(this.o)};Ym.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function $m(a,b){b.getError();an(a,null);a.l(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
511
|
+
function Zm(a,b){a.l(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.B)));a.g=b.getAdsManager(a.i);a.l(new Q("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){b=[];c=r(c);for(var d=c.next();!d.done;d=c.next())b.push({start:d.value,end:null});a.l(new Q("ad-cue-points-changed",(new Map).set("cuepoints",b)))}bn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,cn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.C(a.i,"loadeddata",
|
|
512
|
+
function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,cn(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,cn(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,cn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.u?a.g.start():a.h.da(a.i,"play",
|
|
513
|
+
function(){a.u=!0;a.g.start()})}catch(e){an(a,null)}}function cn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
514
514
|
function bn(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new Q(d,c))}a.h.C(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){$m(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){dn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.STARTED,function(c){dn(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,
|
|
515
515
|
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){an(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){an(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")});
|
|
516
516
|
a.h.C(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j.i=!0;b(c,"ad-paused")});a.h.C(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j.i=!1;b(c,"ad-resumed")});a.h.C(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){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")});a.h.C(a.g,
|
|
@@ -526,10 +526,10 @@ var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.C(this
|
|
|
526
526
|
this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new Q("ad-complete"));e.i(new Q("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 Q("ad-skipped"));e.i(new Q("ad-stopped"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=r(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=
|
|
527
527
|
f;e.i(new Q("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}en.prototype.stop=function(){this.B="";this.o=null;this.D=[]};en.prototype.release=function(){this.stop();this.h&&this.h.release()};en.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
|
|
528
528
|
function fn(a,b){a.i(new Q("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 X(){Ve.call(this);this.g=this.i=null;this.h=new Xm;this.j=navigator.language}pa(X,Ve);q=X.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new M(2,10,1E4);this.i&&this.i.release();this.i=new Ym(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)})};
|
|
529
|
-
q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Ve.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.h=new Xm};q.requestClientSideAds=function(a){if(!this.i)throw new M(1,10,10001);var b=this.i;b.
|
|
529
|
+
q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Ve.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.h=new Xm};q.requestClientSideAds=function(a){if(!this.i)throw new M(1,10,10001);var b=this.i;b.B=Date.now()/1E3;b.m.requestAds(a)};
|
|
530
530
|
q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new M(2,10,10002);this.g&&this.g.release();this.g=new en(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)})};
|
|
531
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new M(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.2.
|
|
532
|
-
(c.F=!0),c.j=new kc,c.g.requestStream(a),c.B=b||"",c.G=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new M(1,10,10003);(a.mpt||a.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.2.
|
|
531
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new M(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.2.14";c=this.g;c.j?a=Promise.reject(new M(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
532
|
+
(c.F=!0),c.j=new kc,c.g.requestStream(a),c.B=b||"",c.G=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new M(1,10,10003);(a.mpt||a.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.2.14";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new M(1,10,10003);return this.g.D};
|
|
533
533
|
q.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};L("shaka.ads.AdManager",X);
|
|
534
534
|
X.prototype.onCueMetadataChange=X.prototype.onCueMetadataChange;X.prototype.onHlsTimedMetadata=X.prototype.onHlsTimedMetadata;X.prototype.onDashTimedMetadata=X.prototype.onDashTimedMetadata;X.prototype.getStats=X.prototype.getStats;X.prototype.getServerSideCuePoints=X.prototype.getServerSideCuePoints;X.prototype.replaceServerSideAdTagParameters=X.prototype.replaceServerSideAdTagParameters;X.prototype.requestServerSideStream=X.prototype.requestServerSideStream;X.prototype.initServerSide=X.prototype.initServerSide;
|
|
535
535
|
X.prototype.requestClientSideAds=X.prototype.requestClientSideAds;X.prototype.onAssetUnload=X.prototype.onAssetUnload;X.prototype.release=X.prototype.release;X.prototype.initClientSide=X.prototype.initClientSide;X.prototype.setLocale=X.prototype.setLocale;X.ADS_LOADED="ads-loaded";X.AD_STARTED="ad-started";X.AD_FIRST_QUARTILE="ad-first-quartile";X.AD_MIDPOINT="ad-midpoint";X.AD_THIRD_QUARTILE="ad-third-quartile";X.AD_COMPLETE="ad-complete";X.AD_STOPPED="ad-stopped";X.AD_SKIPPED="ad-skipped";
|
|
@@ -590,8 +590,8 @@ function Ao(a){var b=a.getAttribute("schemeIdUri"),c=Sf(a,"urn:mpeg:cenc:2013","
|
|
|
590
590
|
var yo=1,zo=(new Map).set("com.widevine.alpha",function(a){return(a=Nf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",xo).set("com.microsoft.playready.recommendation",xo).set("com.microsoft.playready.software",xo).set("com.microsoft.playready.hardware",xo).set("org.w3.clearkey",function(a){return(a=Nf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function Bo(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=
|
|
591
591
|
window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
|
|
592
592
|
function Co(a,b){var c=Do(a,b,"timescale"),d=1;c&&(d=ag(c)||1);var e=Do(a,b,"duration");c=ag(e||"");"image"==a.I.contentType&&(c=cg(e||""));c&&(c/=d);var f=Do(a,b,"startNumber");e=Number(Do(a,b,"presentationTimeOffset"))||0;var g=bg(f||"");if(null==f||null==g)g=1;f=Eo(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.W.duration||Infinity;f=Mf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],p=f[l+1],n=Wf(m,"t",bg),t=Wf(m,"d",bg);m=Wf(m,"r",$f);null!=n&&(n-=e);if(!t)break;n=null!=n?n:k;m=m||0;if(0>
|
|
593
|
-
m)if(p){p=Wf(p,"t",bg);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/t)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/t)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+t,h.push({start:n/b,end:k/b,ug:n}),n=k}b=h}return{timescale:d,ja:c,Mb:g,Ta:e/d||0,le:e,timeline:b}}function Do(a,b,c){return[b(a.I),b(a.
|
|
594
|
-
function Eo(a,b,c){return[b(a.I),b(a.
|
|
593
|
+
m)if(p){p=Wf(p,"t",bg);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/t)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/t)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+t,h.push({start:n/b,end:k/b,ug:n}),n=k}b=h}return{timescale:d,ja:c,Mb:g,Ta:e/d||0,le:e,timeline:b}}function Do(a,b,c){return[b(a.I),b(a.ha),b(a.ca)].filter(bc).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
|
|
594
|
+
function Eo(a,b,c){return[b(a.I),b(a.ha),b(a.ca)].filter(bc).map(function(d){return Lf(d,c)}).reduce(function(d,e){return d||e})}
|
|
595
595
|
function Fo(a,b,c,d,e,f){for(var g=Sf(a,"http://www.w3.org/1999/xlink","href"),h=Sf(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(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 Ne(new M(2,4,4028));if("onLoad"!=h)return Ne(new M(2,4,4027));var m=cc([d],[g]);return e.request(0,df(m,b)).aa(function(p){p=gg(p.data,a.tagName);if(!p)return Ne(new M(2,4,4001,g));
|
|
596
596
|
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=r(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return Go(a,b,c,m[0],e,f+1)})}
|
|
597
597
|
function Go(a,b,c,d,e,f){f=void 0===f?0:f;if(Sf(a,"http://www.w3.org/1999/xlink","href")){var g=Fo(a,b,c,d,e,f);c&&(g=g.aa(void 0,function(){return Go(a,b,c,d,e,f)}));return g}g=[];for(var h=r(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"==Sf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Go(k,b,c,d,e,f)));return Re(g).aa(function(){return a})};function Ho(a,b,c,d,e,f,g){var h,k=(new Af).U("sidx",function(l){h=Io(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new M(2,3,3004);}
|
|
@@ -607,7 +607,7 @@ function Uo(a){return a.vc}function Wo(a){var b=Eo(a,Uo,"RepresentationIndex");a
|
|
|
607
607
|
function So(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.Vc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Zo(a,b){var c=Ro(a,$o),d=ap(a);if(!d.ja&&!d.timeline&&1<d.Gb.length)throw new M(2,4,4002);if(!d.ja&&!a.W.duration&&!d.timeline&&1==d.Gb.length)throw new M(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new M(2,4,4002);var e=null,f=null;a.ca.id&&a.I.id&&(f=b[a.ca.id+","+a.I.id])&&(e=f.segmentIndex);var g=bp(a.W.start,a.W.duration,a.I.za,d,c);b=!e;e?e.Hb(g,a.presentationTimeline.Qa()):e=new tj(g);a.presentationTimeline.Ib(g);a.Xa&&a.W.Cd||e.Ya(a.W.start,a.W.duration?a.W.start+a.W.duration:
|
|
608
608
|
Infinity,b);f&&(f.segmentIndex=e);return{Bb:function(){e&&0!=e.H.length||e.pc(g);return Promise.resolve(e)}}}function $o(a){return a.ab}function ap(a){var b=cp(a);a=Co(a,$o);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,Ta:a.Ta,timeline:a.timeline,Gb:b}}
|
|
609
609
|
function bp(a,b,c,d,e){var f=d.Gb.length;d.timeline&&d.timeline.length!=d.Gb.length&&(f=Math.min(d.timeline.length,d.Gb.length));for(var g=a-d.Ta,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={md:m.md},p++){var n=d.Gb[p];m.md=cc(c,[n.Vf]);var t=void 0;t=null!=d.ja?l+d.ja:d.timeline?d.timeline[p].end:l+b;k.push(new R(a+l,a+t,function(y){return function(){return y.md}}(m),n.start,n.end,e,g,a,h));l=t}return k}
|
|
610
|
-
function cp(a){return[a.I.ab,a.
|
|
610
|
+
function cp(a){return[a.I.ab,a.ha.ab,a.ca.ab].filter(bc).map(function(b){return Mf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Ee&&(a.Ee=!0);var c=b.getAttribute("media");b=Wf(b,"mediaRange",Zf,{start:0,end:null});return{Vf:c,start:b.start,end:b.end}})};function dp(a,b,c,d,e,f){var g=ep(a),h=fp(a);gp(h);var k=Xe(a);if(h.mc)return Yo(a,g),{Bb:function(){var t=Bo(h.mc,k.I.id,null,k.bandwidth||null,null);t=cc(k.I.za,[t]);return Xo(k,b,g,t,0,null,h.Ta)}};if(h.ja)return d||"image"===a.ha.contentType||(a.presentationTimeline.Pd(h.ja),a.presentationTimeline.Qd(a.W.start)),{Bb:function(){return hp(k,h,e,g,f)}};var l=null;d=d=null;a.ca.id&&a.I.id&&(d=a.ca.id+","+a.I.id,d=c[d])&&(l=d.segmentIndex);var m=ip(k,h,g);c=a.W.start;var p=a.W.duration?a.W.start+a.W.duration:
|
|
611
611
|
Infinity,n=!(a.Xa&&a.W.Cd);l?(n&&(new tj(m)).Ya(c,p,!0),l.Hb(m,a.presentationTimeline.Qa())):l=new tj(m);a.presentationTimeline.Ib(m);n&&l.Ya(c,p);d&&a.Xa&&(d.segmentIndex=l);return{Bb:function(){l&&0!=l.H.length||l.pc(m);return Promise.resolve(l)}}}function jp(a){return a.wc}function fp(a){var b=Co(a,jp),c=Do(a,jp,"media");a=Do(a,jp,"index");return{ja:b.ja,timescale:b.timescale,Mb:b.Mb,Ta:b.Ta,le:b.le,timeline:b.timeline,Md:c,mc:a}}
|
|
612
612
|
function gp(a){var b=a.mc?1:0;b+=a.timeline?1:0;b+=a.ja?1:0;if(0==b)throw new M(2,4,4002);1!=b&&(a.mc&&(a.timeline=null),a.ja=null);if(!a.mc&&!a.Md)throw new M(2,4,4002);}
|
|
613
613
|
function hp(a,b,c,d,e){function f(K){var N=(K-t)*n,P=N+b.Ta,S=N+l;N=S+n;var Y=Math.min(N,h());S=new R(S,Y,function(){var fa=Bo(x,w,K,v,P*y);return cc(D,[fa])},0,null,d,z,l,h());S.j=N;return S}function g(){var K=[Math.max(k.Qa(),l),Math.min(k.hb(),h())].map(function(N){return N-l});return[Math.ceil(K[0]/n),Math.ceil(K[1]/n)-1].map(function(N){return N+t})}function h(){var K=null!=m&&e[m]||p;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.W.start,m=a.ca.id,p=a.W.duration,n=b.ja,t=b.Mb,y=b.timescale,
|
|
@@ -639,15 +639,15 @@ function Gp(a,b,c){if(a.id==c.id)return!0;var d=od(a.language,b.language),e=od(a
|
|
|
639
639
|
d=Kp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Lp)return!0;if(d==Mp)return!1;d=Kp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Lp?!0:d==Mp?!1:a.bandwidth&&Np(a.bandwidth,b.bandwidth,c.bandwidth)==Lp?!0:!1}
|
|
640
640
|
function Hp(a,b,c){if(a.id==c.id)return!0;var d=Kp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Lp)return!0;if(d==Mp)return!1;if(a.frameRate){d=Kp(a.frameRate,b.frameRate,c.frameRate);if(d==Lp)return!0;if(d==Mp)return!1}return a.bandwidth&&Np(a.bandwidth,b.bandwidth,c.bandwidth)==Lp?!0:!1}
|
|
641
641
|
function Ip(a,b,c){if(a.id==c.id)return!0;var d=od(a.language,b.language),e=od(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
|
|
642
|
-
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Jp(a,b,c){return a.id==c.id?!0:Kp(a.width*a.height,b.width*b.height,c.width*c.height)==Lp?!0:!1}function vp(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
|
|
643
|
-
function qp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new tj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
|
|
642
|
+
a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Jp(a,b,c){return a.id==c.id?!0:Kp(a.width*a.height,b.width*b.height,c.width*c.height)==Lp?!0:!1}function vp(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1}}
|
|
643
|
+
function qp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new tj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1}}
|
|
644
644
|
function Kp(a,b,c){if(b==a&&a!=c)return Mp;if(c==a&&a!=b)return Lp;if(b>a){if(c<=a||c-a<b-a)return Lp;if(c-a>b-a)return Mp}else{if(c>a)return Mp;if(a-c<a-b)return Lp;if(a-c>a-b)return Mp}return Op}function Np(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Lp:b<a?Mp:Op}var Lp=1,Op=0,Mp=-1;function Pp(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.G=1;this.l={};this.M={};this.j=new kp;this.F=0;this.J=new Qa(5);this.D=new O(function(){Qp(a)});this.o=new Ye;this.s=null;this.L=[];this.u=Infinity;this.B=!1}q=Pp.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return J(function(e){if(1==e.g)return c.B=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,Rp(c),2);d=e.h;c.h&&Sp(c,d);if(!c.h)throw new M(2,7,7001);return e.return(c.i)})};
|
|
645
645
|
q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.D&&(this.D.stop(),this.D=null);return this.o.destroy()};q.update=function(){var a=this,b;return J(function(c){if(1==c.g)return C(c,2),u(c,Rp(a),4);if(2!=c.g)return ua(c,0);b=F(c);if(!a.h||!b)return c.return();a.h.onError(b);A(c)})};q.onExpirationUpdated=function(){};
|
|
646
646
|
function Rp(a){var b,c,d,e,f,g,h;return J(function(k){if(1==k.g)return b=df(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),Ze(a.o,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k.return(0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,Tp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k.return(h)})}
|
|
647
647
|
function Tp(a,b,c){var d,e,f,g,h;return J(function(k){if(1==k.g){d=gg(b,"MPD");if(!d)throw new M(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(Up(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Go(d,a.g.retryParameters,f,c,a.h.networkingEngine);Ze(a.o,g);return u(k,g.promise,2)}h=k.h;return k.return(Up(a,h,c))})}
|
|
648
648
|
function Up(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,B,G,E,H,I,K,N,P,S,Y,fa,va,Da,Ea,Ga;return J(function(Ha){switch(Ha.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Mf(b,"Location").map(Uf).filter(bc);0<f.length&&(g=cc(e,f),e=a.m=g);h=Mf(b,"BaseURL");k=h.map(Uf);l=cc(e,k);m=0;h&&h.length&&(m=Wf(h[0],"availabilityTimeOffset",cg)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=Wf(b,"minBufferTime",Yf)||0);a.F=Wf(b,"minimumUpdatePeriod",Yf,-1);t=Wf(b,"availabilityStartTime",Xf);y=Wf(b,
|
|
649
649
|
"timeShiftBufferDepth",Yf);x=a.g.dash.ignoreSuggestedPresentationDelay;v=null;x||(v=Wf(b,"suggestedPresentationDelay",Yf));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=Wf(b,"maxSegmentDuration",Yf));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,G=r(Object.values(a.l)),E=G.next();!E.done;E=G.next())H=E.value,H.segmentIndex&&H.segmentIndex.fb(B.Qa());else I=a.g.defaultPresentationDelay||1.5*n,K=null!=v?v:I,B=new T(t,K,a.g.dash.autoCorrectDrift);B.xc("static"==z);(N=B.V())&&
|
|
650
|
-
!isNaN(a.g.availabilityWindowOverride)&&(y=a.g.availabilityWindowOverride);null==y&&(y=Infinity);B.ge(y);P=b.getAttribute("profiles")||"";S={Xa:"static"!=z,presentationTimeline:B,ca:null,W:null,
|
|
650
|
+
!isNaN(a.g.availabilityWindowOverride)&&(y=a.g.availabilityWindowOverride);null==y&&(y=Infinity);B.ge(y);P=b.getAttribute("profiles")||"";S={Xa:"static"!=z,presentationTimeline:B,ca:null,W:null,ha:null,I:null,bandwidth:0,Ee:!1,zb:m,profiles:P.split(",")};Y=Vp(a,S,l,b);fa=Y.duration;va=Y.periods;"static"!=z&&Y.we||B.Da(fa||Infinity);a.u&&!a.B&&(Da=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.B=a.h.isLowLatencyMode());a.B?B.Qe(a.u):a.u&&Va("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
|
|
651
651
|
B.Pd(D||1);return u(Ha,lp(a.j,va,S.Xa),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.A(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:!1};if(!B.Ve()){Ha.A(4);break}Ea=Mf(b,"UTCTiming");return u(Ha,Wp(a,l,Ea),5);case 5:Ga=Ha.h;if(!a.h)return Ha.return();B.Re(Ga);case 4:B.Jd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),A(Ha)}})}
|
|
652
652
|
function Vp(a,b,c,d){var e=Wf(d,"mediaPresentationDuration",Yf),f=[],g=0;d=Mf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Wf(k,"start",Yf,g),p=k.id,n=Wf(k,"duration",Yf),t=null;if(l){var y=Wf(l,"start",Yf);null!=y&&(t=y-m)}else null!=e&&(t=e-m);null==t&&(t=n);if(!(null!==a.s&&null!==p&&null!==m&&m<a.s)||a.L.includes(p)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=Xp(a,b,c,{start:m,duration:t,node:k,Cd:null==t||!l});f.push(g);b.ca.id&&t&&(a.M[b.ca.id]=t);if(null==t){g=
|
|
653
653
|
null;break}g=m+t}}a.L=f.map(function(x){return x.id});return null!=e?{periods:f,duration:e,we:!1}:{periods:f,duration:g,we:!0}}
|
|
@@ -655,16 +655,16 @@ function Xp(a,b,c,d){b.ca=Yp(d.node,null,c);b.W=d;b.ca.zb=b.zb;b.ca.id||(b.ca.id
|
|
|
655
655
|
}d=c.filter(function(m){return!m.je});c=c.filter(function(m){return m.je});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.je.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={Ec:h.Ec},l=k.next())h.Ec=l.value,h.Ec.trickModeVideo=e.streams.find(function(m){return function(p){return Xc(m.Ec.codecs)==Xc(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:aq(d,"audio");g=a.g.disableVideo?[]:aq(d,"video");f=a.g.disableText?
|
|
656
656
|
[]:aq(d,hc);c=a.g.disableThumbnails?[]:aq(d,"image");if(!g.length&&!e.length)throw new M(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.ca.id,Gc:d,ed:e,textStreams:g,imageStreams:f}}
|
|
657
657
|
function aq(a,b){return a.filter(function(c){return c.contentType==b})}
|
|
658
|
-
function $p(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.
|
|
658
|
+
function $p(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ha=Yp(c,b.ca,null);var e=!1,f=Mf(c,"Role"),g=f.map(function(E){return E.getAttribute("value")}).filter(bc),h=void 0,k=b.ha.contentType==hc;k&&(h="subtitle");f=r(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=
|
|
659
659
|
l}}var p;m=Mf(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;var t=n.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=n.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?p=d(parseInt(n.getAttribute("value"),10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=t&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=t&&(l=!0)}m=Mf(c,"SupplementalProperty");m=r(m);for(n=m.next();!n.done;n=m.next())n=n.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==
|
|
660
660
|
n.getAttribute("schemeIdUri")&&(p=d(parseInt(n.getAttribute("value"),10)));m=Mf(c,"Accessibility");var y=new Map;m=r(m);for(n=m.next();!n.done;n=m.next())if(t=n.value,n=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==n)if(n=1,null!=t){t=t.split(";");for(var x=r(t),v=x.next();!v.done;v=x.next()){var w=v.value,D=v=void 0;w.includes("=")?(w=w.split("="),v=w[0].startsWith("CC")?w[0]:"CC"+w[0],D=w[1]||"und"):(v="CC"+n,2==t.length?n+=2:n++,D=w);y.set(v,kd(D))}}else y.set("CC1",
|
|
661
661
|
"und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=1,null!=t)for(t=r(t.split(";")),v=t.next();!v.done;v=t.next())v=v.value,w=x=void 0,v.includes("=")?(v=v.split("="),x="svc"+v[0],w=v[1].split(",")[0].split(":").pop()):(x="svc"+n,n++,w=v),y.set(x,kd(w));else y.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Mf(c,"ContentProtection");var z=ro(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=kd(c.getAttribute("lang")||"und"),
|
|
662
|
-
G=c.getAttribute("label");(l=Mf(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(G=l.textContent));l=Mf(c,"Representation");c=l.map(function(E){if(E=bq(a,b,z,h,B,G,e,g,y,E))E.hdr=E.hdr||p;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.
|
|
663
|
-
b.
|
|
664
|
-
function bq(a,b,c,d,e,f,g,h,k,l){b.I=Yp(l,b.
|
|
662
|
+
G=c.getAttribute("label");(l=Mf(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(G=l.textContent));l=Mf(c,"Representation");c=l.map(function(E){if(E=bq(a,b,z,h,B,G,e,g,y,E))E.hdr=E.hdr||p;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.ha.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new M(2,4,4003);}if(!b.ha.contentType||"application"==b.ha.contentType)for(b.ha.contentType=cq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=
|
|
663
|
+
b.ha.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=m.value,n=r(z.drmInfos),t=n.next();!t.done;t=n.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(E){return E.getAttribute("id")}).filter(bc);return{id:b.ha.id||"__fake__"+a.G++,contentType:b.ha.contentType,language:B,fh:e,streams:c,drmInfos:z.drmInfos,je:f,gg:k}}
|
|
664
|
+
function bq(a,b,c,d,e,f,g,h,k,l){b.I=Yp(l,b.ha,null);a.u=Math.min(a.u,b.I.zb);if(!dq(b.I))return null;var m=b.W.start;b.bandwidth=Wf(l,"bandwidth",ag)||0;var p=b.I.contentType,n=p==hc||"application"==p;p="image"==p;try{var t=function(E,H,I){return eq(a,E,H,I)};if(b.I.vc)var y=To(b,t);else if(b.I.ab)y=Zo(b,a.l);else if(b.I.wc)y=dp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var x=b.I.za,v=b.W.duration||0;y={Bb:function(){return Promise.resolve(vj(m,v,x))}}}}catch(E){if((n||p)&&4002==E.code)return null;
|
|
665
665
|
throw E;}t=Mf(l,"ContentProtection");t=uo(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var w=!1;Mf(l,"SupplementalProperty").some(function(E){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==E.getAttribute("schemeIdUri")&&"JOC"==E.getAttribute("value")})&&(w=!0);var D=!1;n&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(p&&((l=Mf(l,"EssentialProperty").find(function(E){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(E.getAttribute("schemeIdUri"))}))&&
|
|
666
666
|
(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.ca.id+","+b.I.id:"";var G=l&&a.l[l]?a.l[l]:{id:a.G++,originalId:b.I.id,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){G.segmentIndex&&(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.I.mimeType,codecs:b.I.codecs,
|
|
667
|
-
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:t,language:e,label:f,type:b.
|
|
667
|
+
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:t,language:e,label:f,type:b.ha.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.I.Vc,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:B,tilesLayout:z,matchedStreams:[],external:!1};G.createSegmentIndex=function(){var E;return J(function(H){if(1==
|
|
668
668
|
H.g){if(G.segmentIndex)return H.A(0);E=G;return u(H,y.Bb(),3)}E.segmentIndex=H.h;A(H)})};l&&b.Xa&&!a.l[l]&&(a.l[l]=G);return G}function Qp(a){var b,c;J(function(d){switch(d.g){case 1:return b=0,C(d,2),u(d,Rp(a),4);case 4:b=d.h;ua(d,3);break;case 2:c=F(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d.return();Sp(a,b);A(d)}})}function Sp(a,b){0>a.F||a.D.R(Math.max(3,a.F-b,Ra(a.J)))}
|
|
669
669
|
function Yp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Vc:null,audioSamplingRate:null,zb:0};c=c||b.za;var d=Mf(a,"BaseURL"),e=d.map(Uf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Wf(a,"frameRate",dg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Mf(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=r(m);for(var n=m.next();!n.done;n=
|
|
670
670
|
m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Mf(a,"AudioChannelConfiguration");m=fq(m)||b.Vc;n=Wf(a,"audioSamplingRate",bg)||b.audioSamplingRate;f||(f=cq(g,h));var t=Lf(a,"SegmentBase"),y=Lf(a,"SegmentTemplate"),x=t?Wf(t,"availabilityTimeOffset",cg)||0:0,v=y?Wf(y,"availabilityTimeOffset",cg)||0:0;d=d&&d.length?Wf(d[0],"availabilityTimeOffset",cg)||0:0;d=b.zb+d+x+v;return{za:cc(c,e),vc:t||b.vc,ab:Lf(a,"SegmentList")||b.ab,wc:y||b.wc,width:Wf(a,"width",bg)||b.width,height:Wf(a,
|
|
@@ -682,18 +682,18 @@ function wq(a,b,c){b=Ac(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d
|
|
|
682
682
|
var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=xq(a,m),yq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==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=qq(d,m.trim()),h&&g.push(h),e.push(new kq(m,g,k)),g=[],k=[]);k.length&&
|
|
683
683
|
(h&&g.push(h),e.push(new kq("",g,k)));return new hq(c,b,f,e)}f.push(h);"EXT-X-STREAM-INF"==h.name&&(h.g.push(new lq("URI",k)),e=!0)}}return new hq(c,b,f)}function xq(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new M(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new rq(d);var f;(f=tq(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=tq(d,g);)c.push(new lq(f[1],f[2]||f[3])),sq(d)}return new iq(a,b,c,e)}
|
|
684
684
|
var yq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),zq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Aq(){}function Bq(a){try{var b=Cq(a);return Pe({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ne(c)}}
|
|
685
|
-
function Cq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new M(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new M(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=Lc(a):e=Ec(a);return{data:e,contentType:c}}L("shaka.net.DataUriPlugin",Aq);Aq.parse=Bq;af("data",Bq);function Dq(){var a=this;this.g=this.i=null;this.Ma=1;this.o=new Map;this.u=new Map;this.ya=new Set;this.h=new Map;this.j=null;this.M="";this.
|
|
685
|
+
function Cq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new M(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new M(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=Lc(a):e=Ec(a);return{data:e,contentType:c}}L("shaka.net.DataUriPlugin",Aq);Aq.parse=Bq;af("data",Bq);function Dq(){var a=this;this.g=this.i=null;this.Ma=1;this.o=new Map;this.u=new Map;this.ya=new Set;this.h=new Map;this.j=null;this.M="";this.ea=new vq;this.la=0;this.T=!1;this.O=null;this.$=Infinity;this.B=new O(function(){Eq(a)});this.m=Fq;this.J=null;this.ga=0;this.F=Infinity;this.Z=this.ka=0;this.D=new Ye;this.G=[];this.L=new Map;this.s=new Map;this.fa=new Map;this.l=!1}q=Dq.prototype;q.configure=function(a){this.g=a};
|
|
686
686
|
q.start=function(a,b){var c=this,d,e;return J(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),u(f,Gq(c,a),2);if(3!=f.g)return d=f.h,c.M=d.uri,u(f,Hq(c,d.data,a),3);e=c.la;0<e&&c.B.R(e);return f.return(c.J)})};q.stop=function(){this.B&&(this.B.stop(),this.B=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.g=this.i=null;this.ya.clear();this.J=null;this.h.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
|
|
687
687
|
q.update=function(){var a=this,b,c,d,e,f,g;return J(function(h){if(1==h.g){if(a.m==Fq)return h.return();b=[];c=Array.from(a.h.values());return c.length?u(h,Iq(a,c[0]),2):h.A(2)}if(4!=h.g){for(d=1;d<c.length;d++)b.push(Iq(a,c[d]));return u(h,Promise.all(b),4)}Jq(a);e=c.some(function(k){return 0==k.Ce});e||(f=Kq,Lq(a,f.Ye),g=c.map(function(k){return k.nc}),a.j.Da(Math.min.apply(Math,ia(g))),a.i.updateDuration());A(h)})};
|
|
688
|
-
function Iq(a,b){var c,d,e,f,g,h,k,l,m,p,n,t;return J(function(y){if(1==y.g)return c=b.Ze,d=new Lb(c),a.l&&b.df&&Ob(d,new Qb("_HLS_skip=YES")),u(y,Gq(a,d.toString()),2);e=y.h;f=wq(a.
|
|
688
|
+
function Iq(a,b){var c,d,e,f,g,h,k,l,m,p,n,t;return J(function(y){if(1==y.g)return c=b.Ze,d=new Lb(c),a.l&&b.df&&Ob(d,new Qb("_HLS_skip=YES")),u(y,Gq(a,d.toString()),2);e=y.h;f=wq(a.ea,e.data,e.uri);if(1!=f.type)throw new M(2,4,4017);g=mq(f.g,"EXT-X-DEFINE");h=Mq(a,g);k=b.stream;l=Nq(a,f,k.type,b.oc,h);a.G.push(l);k.segmentIndex.Hb(l,a.j.Qa());l.length&&(m=pq(f.g,"EXT-X-MEDIA-SEQUENCE"),p=b.oc.get(m),k.segmentIndex.fb(p));n=l[l.length-1];if(t=oq(f.g,"EXT-X-ENDLIST"))b.Ce=!0,b.nc=n.endTime;A(y)})}
|
|
689
689
|
q.onExpirationUpdated=function(){};
|
|
690
690
|
function Oq(a){if(!a.T){for(var b=-1,c=new Map,d=r(a.h.values()),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex;if(f&&(f=f.H[0]||null))for(var g=r(e.oc),h=g.next();!h.done;h=g.next()){h=r(h.value);var k=h.next().value;if(h.next().value==f.startTime){c.set(e,k);b=Math.max(b,k);break}}}if(!(0>b)){a.O=b;b=r(a.h.values());for(e=b.next();!e.done;e=b.next())if(d=e.value,e=d.stream.segmentIndex)if(f=a.O-c.get(d),e.H.splice(0,f),e=e.H[0]||null)e=-e.startTime,d.stream.segmentIndex.offset(e),
|
|
691
691
|
Pq(d,e);a.T=!0}}}
|
|
692
692
|
function Qq(a){if(!a.T&&Infinity==a.$){for(var b=Infinity,c=r(a.h.values()),d=c.next();!d.done;d=c.next())if(d=d.value.stream.segmentIndex)d=d.H[0]||null,null!=d&&null!=d.g&&(b=Math.min(b,d.g));if(Infinity!=b){a.$=b;c=r(a.h.values());for(d=c.next();!d.done;d=c.next()){d=d.value;var e=d.stream.segmentIndex;if(null!=e){var f=e.H[0]||null;if(null==f.g)Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.dd,"Expect AV sync issues!");else for(Pq(d,f.g-b-f.startTime),d=r(e),e=d.next();!e.done;e=d.next())e.value.he(b)}}a.T=
|
|
693
693
|
!0}}}function Pq(a,b){a.nc+=b;for(var c=r(a.oc),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.oc.set(d,e+b)}}
|
|
694
|
-
function Hq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,B,G,E,H,I,K,N,P,S,Y,fa,va,Da,Ea,Ga,Ha,Fc,Gc,ic,pd,ub,qd,Wb,rd;return J(function(Na){switch(Na.g){case 1:d=wq(a.
|
|
694
|
+
function Hq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,B,G,E,H,I,K,N,P,S,Y,fa,va,Da,Ea,Ga,Ha,Fc,Gc,ic,pd,ub,qd,Wb,rd;return J(function(Na){switch(Na.g){case 1:d=wq(a.ea,b,a.M);e=mq(d.g,"EXT-X-DEFINE");Rq(a,e);f=[];g=[];h=[];if(1==d.type)return G=a.g.hls.mediaPlaylistFullMimeType,E=G.split(";")[0],H=E.split("/")[0],I=Zc(G),K=new Map,u(Na,Sq(a,d,c,c,I,H,"",!0,"Media Playlist",null,K,null,!1,!1,E),8);k=mq(d.g,"EXT-X-MEDIA");l=mq(d.g,"EXT-X-STREAM-INF");m=mq(d.g,"EXT-X-IMAGE-STREAM-INF");Tq(a,l);p=
|
|
695
695
|
mq(d.g,"EXT-X-SESSION-DATA");n=r(p);for(t=n.next();!t.done;t=n.next())if(y=t.value,x=Z(y,"DATA-ID"),v=Z(y,"URI"),w=Z(y,"LANGUAGE"),D=Z(y,"VALUE"),z=(new Map).set("id",x),v&&z.set("uri",qq(a.M,v)),w&&z.set("language",w),D&&z.set("value",D),B=new Q("sessiondata",z),a.i)a.i.onEvent(B);return u(Na,Uq(a,k),4);case 4:return Vq(a,k),u(Na,Wq(a,l),5);case 5:return f=Na.h,u(Na,Xq(a,k),6);case 6:return g=Na.h,u(Na,Yq(a,m),7);case 7:h=Na.h;Na.A(3);break;case 8:N=Na.h,a.h.set(c,N),f.push({id:0,language:"und",
|
|
696
|
-
disabledUntilTime:0,primary:!0,audio:"audio"==H?N.stream:null,video:"video"==H?N.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new M(2,7,7001);a.g.hls.ignoreManifestProgramDateTime?Oq(a):Qq(a);P=Infinity;S=r(a.h.values());for(Y=S.next();!Y.done;Y=S.next())fa=Y.value,"text"!=fa.stream.type&&(P=Math.min(P,fa.nc));a.m!=Fq?(a.j=new T(0,a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Z?a.Z:3*a.
|
|
696
|
+
disabledUntilTime:0,primary:!0,audio:"audio"==H?N.stream:null,video:"video"==H?N.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new M(2,7,7001);a.g.hls.ignoreManifestProgramDateTime?Oq(a):Qq(a);P=Infinity;S=r(a.h.values());for(Y=S.next();!Y.done;Y=S.next())fa=Y.value,"text"!=fa.stream.type&&(P=Math.min(P,fa.nc));a.m!=Fq?(a.j=new T(0,a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Z?a.Z:3*a.ga),a.j.xc(!1)):(a.j=new T(null,0),
|
|
697
697
|
a.j.xc(!0));if(a.m!=Fq)a.la=a.F,va=Kq,a.m==va.Xe&&(Da=a.j.$c,isNaN(a.g.availabilityWindowOverride)||(Da=a.g.availabilityWindowOverride),a.j.ge(Da));else for(a.j.Da(P),Ea=r(a.h.values()),Y=Ea.next();!Y.done;Y=Ea.next())Ga=Y.value,Ga.stream.segmentIndex.Ya(0,P);a.G=[];Ha=[];Fc=r(f);for(Gc=Fc.next();!Gc.done;Gc=Fc.next())for(ic=Gc.value,pd=r([ic.video,ic.audio]),ub=pd.next();!ub.done;ub=pd.next())(qd=ub.value)&&Ha.push(qd);return u(Na,Promise.all(Ha.map(function(Pf){return J(function(Qf){return u(Qf,
|
|
698
698
|
Pf.createSegmentIndex(),0)})})),9);case 9:Wb=r(Ha);for(ub=Wb.next();!ub.done;ub=Wb.next())rd=ub.value,a.G.push(rd.segmentIndex.H);Jq(a);a.j.Jd();a.J={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.J);A(Na)}})}function Rq(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value;c=Z(d,"NAME");d=Z(d,"VALUE");c&&d&&(a.o.has(c)||a.o.set(c,d))}}
|
|
699
699
|
function Mq(a,b){var c=new Map;b=r(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}
|
|
@@ -711,15 +711,15 @@ function $q(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x;return J(function(v){if(1==v.g)
|
|
|
711
711
|
"YES"==t;return u(v,gr(a,f,d,e,g,l,h,m,null,n,y,p),2)}x=v.h;a.u.has(c)?a.u.get(c).push(x):a.u.set(c,[x]);if(a.h.has(f))return v.return(a.h.get(f));a.h.set(f,x);return v.return(x)})}
|
|
712
712
|
function ar(a,b){var c,d,e,f,g,h,k,l,m,p;return J(function(n){if(1==n.g){c=fr(jq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return n.return(a.h.get(c));e=er(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(n,gr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=n.h;if(a.h.has(c))return n.return(a.h.get(c));if(k=Z(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*Number(m.split("x")[1]);
|
|
713
713
|
if(p=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.h.set(c,h);return n.return(h)})}function cr(a,b,c,d){var e,f,g,h;return J(function(k){if(1==k.g){e=fr(jq(b,"URI"),a.o);if(a.h.has(e))return k.return(a.h.get(e));var l=Z(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.L.get(l):null;g=ec(d,c);return u(k,gr(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(a.h.has(e))return k.return(a.h.get(e));a.h.set(e,h);return k.return(h)})}
|
|
714
|
-
function gr(a,b,c,d,e,f,g,h,k,l,m,p){var n,t,y;return J(function(x){if(1==x.g)return n=qq(a.M,b),u(x,Gq(a,n),2);t=x.h;n=t.uri;y=wq(a.
|
|
714
|
+
function gr(a,b,c,d,e,f,g,h,k,l,m,p){var n,t,y;return J(function(x){if(1==x.g)return n=qq(a.M,b),u(x,Gq(a,n),2);t=x.h;n=t.uri;y=wq(a.ea,t.data,n);return x.return(Sq(a,y,b,n,c,d,e,f,g,h,k,l,m,p))})}
|
|
715
715
|
function Sq(a,b,c,d,e,f,g,h,k,l,m,p,n,t,y){var x,v,w,D,z,B,G,E,H,I,K,N,P,S,Y,fa,va,Da,Ea,Ga,Ha,Fc,Gc,ic,pd,ub,qd,Wb,rd,Na,Pf,Qf,pn,qn;return J(function(td){if(1==td.g){if(1!=b.type)throw new M(2,4,4017);x=mq(b.g,"EXT-X-DEFINE");v=Mq(a,x);hr(a,b);return y?td.A(2):u(td,ir(a,f,e,b,v),3)}2!=td.g&&(y=td.h);w=[];if(b.segments)for(D=r(b.segments),z=D.next();!z.done;z=D.next())B=z.value,G=mq(B.g,"EXT-X-KEY"),w.push.apply(w,ia(G));H=E=!1;I=[];K=new Set;N=r(w);for(P=N.next();!P.done;P=N.next())if(S=P.value,
|
|
716
716
|
Y=jq(S,"METHOD"),"NONE"!=Y)if(E=!0,"AES-128"==Y)H=!0;else if(fa=jq(S,"KEYFORMAT"),Da=(va=jr[fa])?va(S,y):null){if(Da.keyIds)for(Ea=r(Da.keyIds),Ga=Ea.next();!Ga.done;Ga=Ea.next())Ha=Ga.value,K.add(Ha);I.push(Da)}if(E&&!I.length&&!H)throw new M(2,4,4026);Xi.includes(y)&&(e="");Fc=new Map;Gc=a.l;ic=Nq(a,b,f,Fc,v);Gc!=a.l&&hr(a,b);pd=ic[ic.length-1].endTime;ub=new tj(ic);qd=f==hc?"subtitle":void 0;Wb=[];if(p)for(rd=r(p.split(",")),Na=rd.next();!Na.done;Na=rd.next())Pf=Na.value,Wb.push(Pf);Wb.length||
|
|
717
717
|
"subtitle"!==qd||Wb.push("subtitle");pn=(Qf=oq(b.g,"EXT-X-SERVER-CONTROL"))?null!=Qf.getAttribute("CAN-SKIP-UNTIL"):!1;qn={id:a.Ma++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ub,mimeType:y,codecs:e,kind:qd,encrypted:E,drmInfos:I,keyIds:K,language:g,label:k,type:f,primary:h,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Wb,forced:n,channelsCount:l,audioSamplingRate:null,spatialAudio:t,
|
|
718
|
-
closedCaptions:m,hdr:void 0,tilesLayout:void 0};return td.return({stream:qn,dd:c,Ze:d,nc:pd,oc:Fc,df:pn,Ce:!1})})}
|
|
718
|
+
closedCaptions:m,hdr:void 0,tilesLayout:void 0,external:!1};return td.return({stream:qn,dd:c,Ze:d,nc:pd,oc:Fc,df:pn,Ce:!1})})}
|
|
719
719
|
function kr(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Va("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new M(2,4,4042);var d=0,e=Z(b,"IV","");if(e){var f=Mc(e.substr(2));if(16!=f.byteLength)throw new M(2,4,4043);}else d=pq(c.g,"EXT-X-MEDIA-SEQUENCE");b=qq(c.h,jq(b,"URI"));var g=df([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l,m;return J(function(p){if(1==p.g)return u(p,
|
|
720
720
|
lr(a,g,6),2);if(3!=p.g){k=p.h;if(!k.data||16!=k.data.byteLength)throw new M(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}
|
|
721
|
-
function hr(a,b){var c=oq(b.g,"EXT-X-PLAYLIST-TYPE"),d=oq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Lq(a,Fq);else{c?Lq(a,mr):Lq(a,nr);d=oq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new M(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=oq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ka=Number(jq(c,"PART-TARGET")),a.F=Math.min(a.ka,a.F),b=oq(b.g,"EXT-X-SERVER-CONTROL"),a.Z=b?Number(jq(b,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.
|
|
722
|
-
function or(a,b,c,d){c=oq(c,"EXT-X-MAP");if(!c)return null;var e=jq(c,"URI");d=fr(qq(b,e),d);b=[d,Z(c,"BYTERANGE","")].join("-");a.
|
|
721
|
+
function hr(a,b){var c=oq(b.g,"EXT-X-PLAYLIST-TYPE"),d=oq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Lq(a,Fq);else{c?Lq(a,mr):Lq(a,nr);d=oq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new M(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=oq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ka=Number(jq(c,"PART-TARGET")),a.F=Math.min(a.ka,a.F),b=oq(b.g,"EXT-X-SERVER-CONTROL"),a.Z=b?Number(jq(b,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.ga=Math.max(d,a.ga)}}
|
|
722
|
+
function or(a,b,c,d){c=oq(c,"EXT-X-MAP");if(!c)return null;var e=jq(c,"URI");d=fr(qq(b,e),d);b=[d,Z(c,"BYTERANGE","")].join("-");a.fa.has(b)||(c=pr(d,c),a.fa.set(b,c));return a.fa.get(b)}function pr(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 ni(function(){return[a]},c,d)}
|
|
723
723
|
function qr(a,b,c,d,e,f,g,h,k){var l=d.g,m=fr(d.i,f),p=oq(l,"EXTINF"),n=0;f=0;var t=null;d.h.length&&!a.l&&Va("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var y=null;if(!a.g.hls.ignoreManifestProgramDateTime){var x=oq(l,"EXT-X-PROGRAM-DATE-TIME");x&&x.value&&(y=Xf(x.value))}x=pi;oq(l,"EXT-X-GAP")&&(x=2);if(!p){if(0==d.h.length)throw new M(2,4,4024,
|
|
724
724
|
"EXTINF");if(!a.l)return null}var v=[];if(a.l){n={};for(var w=0;w<d.h.length;n={nd:n.nd},w++){var D=d.h[w],z=0==w?c:v[v.length-1],B=0==w?e:z.endTime,G=Number(Z(D,"DURATION"))||a.ka;if(G){G=B+G;var E=0,H=null;"EXT-X-PRELOAD-HINT"==D.name?E=(E=Z(D,"BYTERANGE-START"))?Number(E):0:(E=Z(D,"BYTERANGE"),H=r(rr(z,E)),E=H.next().value,H=H.next().value);if(z=Z(D,"URI"))n.nd=qq(g,z),z=pi,"YES"==Z(D,"GAP")&&(z=2),B=new R(B,G,function(I){return function(){return[I.nd]}}(n),E,H,b,0,0,Infinity,[],"",null,null,z),
|
|
725
725
|
"EXT-X-PRELOAD-HINT"==D.name&&B.Ge(),v.push(B)}}}if(p){a=Number(p.value.split(",")[0]);if(0==a)return null;n=e+a}else n=v[v.length-1].endTime;(a=oq(l,"EXT-X-BYTERANGE"))?(t=r(rr(c,a.value)),f=t.next().value,t=t.next().value):v.length&&(f=v[0].Ea,t=v[v.length-1].na);c="";a=null;"image"==h&&(c="1x1",h=oq(l,"EXT-X-TILES"))&&(c=jq(h,"LAYOUT"),(h=Z(h,"DURATION"))&&(a=Number(h)));return new R(e,n,function(){return m.length?[m]:[]},f,t,b,0,0,Infinity,v,c,a,y,x,k)}
|
|
@@ -756,13 +756,13 @@ function ks(a){var b,c,d;return J(function(e){return 1==e.g?(b=Array.from(a.g.va
|
|
|
756
756
|
ms.prototype.cc=function(a){var b,c,d,e,f,g;return J(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=ns(a.periods[c],e),b.push(f);return u(h,up(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
|
|
757
757
|
function ns(a,b){os(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return ps(e,a.startTime,b)})}
|
|
758
758
|
function ps(a,b,c){var d=a.initSegmentUri?qs(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=qs(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
|
|
759
|
-
dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}ms.prototype.se=function(a){return{data:a.data}};function qs(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new M(2,9,9004,"Could not parse uri "+a);}
|
|
759
|
+
dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1}}ms.prototype.se=function(a){return{data:a.data}};function qs(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new M(2,9,9004,"Could not parse uri "+a);}
|
|
760
760
|
function os(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
|
|
761
761
|
f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function rs(){Yr.apply(this,arguments)}pa(rs,Yr);
|
|
762
762
|
rs.prototype.cc=function(a){var b,c,d,e,f,g;return J(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=r(k.streams),p=m.next();!p.done;p=m.next())p=p.value,0!=p.variantIds.length&&l.push(ss(p,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,up(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
|
|
763
763
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
764
764
|
function ss(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
|
|
765
|
-
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function ts(){Yr.apply(this,arguments)}pa(ts,Yr);q=ts.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return bs(this,a,b)};q.cc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function us(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=us.prototype;
|
|
765
|
+
dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1}};function ts(){Yr.apply(this,arguments)}pa(ts,Yr);q=ts.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return bs(this,a,b)};q.cc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function us(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=us.prototype;
|
|
766
766
|
q.init=function(){var a=this,b=new kc,c=!1,d=new O(function(){c=!0;b.reject(new M(2,9,9017))});d.R(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new ms(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new rs(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
767
767
|
new rs(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new ts(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new cs(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=r(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new M(2,
|
|
768
768
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return J(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.A(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),A(b)}})};
|
|
@@ -775,7 +775,7 @@ g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:
|
|
|
775
775
|
function As(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=
|
|
776
776
|
b.next())for(e=e.value,g=Bs(a,e,d),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Bs(a,e,d),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
|
|
777
777
|
function Bs(a,b,c){var d=b.segments.map(function(e){return Cs(a,e)});c.Ib(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new tj(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
|
|
778
|
-
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Cs(a,b){var c=new ws("segment",a.h,a.g,b.dataKey);return new R(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Ds(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
|
|
778
|
+
roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,external:b.external}}function Cs(a,b){var c=new ws("segment",a.h,a.g,b.dataKey);return new R(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Ds(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
|
|
779
779
|
function Ds(a,b){var c=new ws("segment",a.h,a.g,b);return new ni(function(){return[c.toString()]},0,null)};function Es(){this.g=null}q=Es.prototype;q.configure=function(){};
|
|
780
780
|
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return J(function(m){switch(m.g){case 1:d=xs(a);c.g=d;if(null==d||"manifest"!=d.g)throw new M(2,1,9004,a);e=new ds;ta(m);return u(m,e.init(),4);case 4:return u(m,hs(e,d.Ca(),d.ma()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new ys(d.Ca(),d.ma()),l=zs(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return wa(m),u(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
|
|
781
781
|
q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return J(function(m){switch(m.g){case 1:return d=c.g,e=new ds,C(m,2,3),u(m,e.init(),5);case 5:return u(m,hs(e,d.Ca(),d.ma()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.A(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:xa(m,0);break;case 2:F(m),m.A(3)}})};
|
|
@@ -810,8 +810,8 @@ Ys(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Ys(a),k=tt(h),u(l,Promise.all(s
|
|
|
810
810
|
function Zs(a,b,c,d){var e;return J(function(f){switch(f.g){case 1:return e=new hg({lb:a.g,onError:c,Xc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,mg(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Ag(e),3);case 3:return u(f,zg(e),4);case 4:return f.return(e)}})}
|
|
811
811
|
function jt(a,b,c,d){var e=new Map,f=tt(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=ut(a,b,c,h,d,e);g.set(h.id,k)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),ie:Array.from(e.values())}}
|
|
812
812
|
function ut(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
|
|
813
|
-
tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;vt(d,c.presentationTimeline.Qa(),function(l){var m=Jr(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=Rs(b,d.id)*n;n=Mr(a.g,n);f.set(m,new Ir(l,n,k,!1))}l.i&&(p=Jr(l.i),f.has(p)||(n=.5*Rs(b,d.id),n=Mr(a.g,n),f.set(p,new Ir(l.i,n,k,!0))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,
|
|
814
|
-
tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function vt(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function Ys(a){if(a.l.g)throw new M(2,9,7001);}function Ws(){if(!Ts())throw new M(2,9,9E3);}function kt(a,b){return J(function(c){if(1==c.g)return a.i.push(b),ta(c),u(c,b,4);if(2!=c.g)return c.return(c.h);wa(c);cb(a.i,b);return xa(c,0)})}
|
|
813
|
+
tilesLayout:d.tilesLayout,external:d.external},h=e.offline.numberOfParallelDownloads,k=0;vt(d,c.presentationTimeline.Qa(),function(l){var m=Jr(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=Rs(b,d.id)*n;n=Mr(a.g,n);f.set(m,new Ir(l,n,k,!1))}l.i&&(p=Jr(l.i),f.has(p)||(n=.5*Rs(b,d.id),n=Mr(a.g,n),f.set(p,new Ir(l.i,n,k,!0))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,
|
|
814
|
+
timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function vt(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function Ys(a){if(a.l.g)throw new M(2,9,7001);}function Ws(){if(!Ts())throw new M(2,9,9E3);}function kt(a,b){return J(function(c){if(1==c.g)return a.i.push(b),ta(c),u(c,b,4);if(2!=c.g)return c.return(c.h);wa(c);cb(a.i,b);return xa(c,0)})}
|
|
815
815
|
function Vs(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){cb(a.i,c)})}function qt(a){var b=new Set;a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
|
|
816
816
|
function pt(a,b,c,d){var e,f,g;return J(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=js(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:ot(d,!1),videoCapabilities:ot(d,!0)}});return u(h,Is(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
817
817
|
function tt(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=r(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=r(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
|