shaka-player 4.11.7 → 4.11.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/deps.js +1 -1
- package/dist/locales.js +36 -36
- package/dist/shaka-player.compiled.d.ts +6 -0
- package/dist/shaka-player.compiled.debug.d.ts +6 -0
- package/dist/shaka-player.compiled.debug.externs.js +7 -0
- package/dist/shaka-player.compiled.debug.js +45 -46
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.externs.js +7 -0
- package/dist/shaka-player.compiled.js +299 -298
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.d.ts +6 -0
- package/dist/shaka-player.ui.debug.d.ts +6 -0
- package/dist/shaka-player.ui.debug.externs.js +7 -0
- package/dist/shaka-player.ui.debug.js +56 -57
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.externs.js +7 -0
- package/dist/shaka-player.ui.js +419 -418
- package/dist/shaka-player.ui.map +3 -3
- package/lib/dash/dash_parser.js +4 -2
- package/lib/dash/segment_template.js +1 -1
- package/lib/media/media_source_engine.js +19 -30
- package/lib/media/playhead.js +3 -1
- package/lib/player.js +7 -1
- package/lib/util/platform.js +3 -2
- package/lib/util/player_configuration.js +3 -1
- package/package.json +1 -1
- package/ui/remote_button.js +3 -2
- package/ui/save_video_frame_button.js +3 -0
|
@@ -15,8 +15,8 @@ ha("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("
|
|
|
15
15
|
ha("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ea[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ca(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ia(ba(this))}})}return a});function ia(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
|
|
16
16
|
function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if("number"==typeof a.length)return{next:ba(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function x(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
|
|
17
17
|
if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},na={};try{na.__proto__=ma;la=na.a;break a}catch(a){}la=!1}ka=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ka;
|
|
18
|
-
function
|
|
19
|
-
function ua(a,b){a.i={qg:b,Cg:!0};a.g=a.m||a.j}sa.prototype.return=function(a){this.i={return:a};this.g=this.j};function G(a,b,c){a.g=c;return{value:b}}sa.prototype.u=function(a){this.g=a};function H(a){a.g=0}function va(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function wa(a,b){a.m=0;a.j=b||0}function xa(a,b,c){a.g=b;a.m=c||0}function ya(a,b){a.m=b||0;b=a.i.qg;a.i=null;return b}function
|
|
18
|
+
function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.jk=b.prototype}function sa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.A=this.i=null}function ta(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}sa.prototype.s=function(a){this.h=a};
|
|
19
|
+
function ua(a,b){a.i={qg:b,Cg:!0};a.g=a.m||a.j}sa.prototype.return=function(a){this.i={return:a};this.g=this.j};function G(a,b,c){a.g=c;return{value:b}}sa.prototype.u=function(a){this.g=a};function H(a){a.g=0}function va(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function wa(a,b){a.m=0;a.j=b||0}function xa(a,b,c){a.g=b;a.m=c||0}function ya(a,b){a.m=b||0;b=a.i.qg;a.i=null;return b}function za(a){a.A=[a.i];a.m=0;a.j=0}
|
|
20
20
|
function Ba(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.Cg?a.g=a.m||a.j:void 0!=c.u&&a.j<c.u?(a.g=c.u,a.i=null):a.g=a.j:a.g=b}function Ca(a){this.g=new sa;this.h=a}function Da(a,b){ta(a.g);var c=a.g.l;if(c)return Ea(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Fa(a)}
|
|
21
21
|
function Ea(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,ua(a.g,g),Fa(a)}a.g.l=null;d.call(a.g,f);return Fa(a)}function Fa(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ua(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Cg)throw b.qg;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
|
|
22
22
|
function Ga(a){this.next=function(b){ta(a.g);a.g.l?b=Ea(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Fa(a));return b};this.throw=function(b){ta(a.g);a.g.l?b=Ea(a,a.g.l["throw"],b,a.g.s):(ua(a.g,b),b=Fa(a));return b};this.return=function(b){return Da(a,b)};this[Symbol.iterator]=function(){return this}}function Ia(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}
|
|
@@ -56,12 +56,12 @@ function S(a,b){a=a.split(".");var c=Qa;a[0]in c||"undefined"==typeof c.execScri
|
|
|
56
56
|
Copyright 2016 Google LLC
|
|
57
57
|
SPDX-License-Identifier: Apache-2.0
|
|
58
58
|
*/
|
|
59
|
-
function Ra(){}function Ta(){};function Ua(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Ua.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Va(a){return a.h/(1-Math.pow(a.g,a.i))};function Wa(){this.h=new Ua(2);this.j=new Ua(5);this.g=0;this.i=128E3;this.l=16E3}Wa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Wa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Wa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Va(this.h),Va(this.j))};function Xa(){}function Za(){}function $a(){}function ab(a){var b=Ja.apply(1,arguments);bb.has(a)||(bb.add(a),$a.apply(Xa,x(b)))}function cb(){}function db(){}function eb(){}var bb=new Set;window.console&&($a=function(){return console.warn.apply(console,x(Ja.apply(0,arguments)))},Za=function(){console.error.apply(console,x(Ja.apply(0,arguments)))});function fb(){this.g={}}q=fb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function gb(){this.g=new fb}q=gb.prototype;q.release=function(){this.Qa();this.g=null};q.D=function(a,b,c,d){this.g&&(a=new ib(a,b,c,d),this.g.push(b,a))};q.
|
|
60
|
-
q.Qa=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,x(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.$a();this.g.g={}}};S("shaka.util.EventManager",gb);gb.prototype.removeAll=gb.prototype.Qa;gb.prototype.unlisten=gb.prototype.$a;gb.prototype.listenOnce=gb.prototype.
|
|
59
|
+
function Ra(){}function Ta(){};function Ua(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Ua.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Va(a){return a.h/(1-Math.pow(a.g,a.i))};function Wa(){this.h=new Ua(2);this.j=new Ua(5);this.g=0;this.i=128E3;this.l=16E3}Wa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Wa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Wa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Va(this.h),Va(this.j))};function Xa(){}function Za(){}function $a(){}function ab(a){var b=Ja.apply(1,arguments);bb.has(a)||(bb.add(a),$a.apply(Xa,x(b)))}function cb(){}function db(){}function eb(){}var bb=new Set;window.console&&($a=function(){return console.warn.apply(console,x(Ja.apply(0,arguments)))},Za=function(){console.error.apply(console,x(Ja.apply(0,arguments)))});function fb(){this.g={}}q=fb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function gb(){this.g=new fb}q=gb.prototype;q.release=function(){this.Qa();this.g=null};q.D=function(a,b,c,d){this.g&&(a=new ib(a,b,c,d),this.g.push(b,a))};q.ra=function(a,b,c,d){function e(g){f.$a(a,b,e);c(g)}var f=this;this.D(a,b,e,d)};q.$a=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.$a(),this.g.remove(b,e))}};
|
|
60
|
+
q.Qa=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,x(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.$a();this.g.g={}}};S("shaka.util.EventManager",gb);gb.prototype.removeAll=gb.prototype.Qa;gb.prototype.unlisten=gb.prototype.$a;gb.prototype.listenOnce=gb.prototype.ra;gb.prototype.listen=gb.prototype.D;gb.prototype.release=gb.prototype.release;function ib(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=jb(a,d);this.target.addEventListener(b,c,this.g)}
|
|
61
61
|
ib.prototype.$a=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function jb(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 kb(a)?b:b.capture||!1}
|
|
62
62
|
function kb(a){var b=lb;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}lb=b}return b||!1}var lb=void 0;function mb(a){if(ob.has(a))return ob.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);ob.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),ob.set(a,b),b):!1}function pb(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var ob=new Map;function qb(a,b){this.g=a;this.h=b}qb.prototype.toString=function(){return"v"+this.g+"."+this.h};function rb(a,b){var c=new qb(5,0),d=sb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function tb(a,b,c,d){$a([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function ub(a,b,c,d){Za([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var sb=null;function vb(){}vb.prototype.extract=function(){};vb.prototype.decode=function(){return[]};vb.prototype.clear=function(){};vb.prototype.getStreams=function(){return[]};function wb(){}wb.prototype.init=function(){};wb.prototype.parse=function(){return[]};function xb(){}function yb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(zb(a)==zb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Ab(a);b=Ab(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function zb(a){return a instanceof ArrayBuffer?a:a.buffer}function Bb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
|
|
63
|
-
function Ab(a,b,c){c=void 0===c?Infinity:c;return Cb(a,void 0===b?0:b,c,Uint8Array)}function
|
|
64
|
-
S("shaka.util.BufferUtils",xb);xb.toDataView=Fb;xb.toUint16=
|
|
63
|
+
function Ab(a,b,c){c=void 0===c?Infinity:c;return Cb(a,void 0===b?0:b,c,Uint8Array)}function Db(a,b,c){c=void 0===c?Infinity:c;return Cb(a,void 0===b?0:b,c,Uint16Array)}function Fb(a,b,c){c=void 0===c?Infinity:c;return Cb(a,void 0===b?0:b,c,DataView)}function Cb(a,b,c,d){var e=zb(a),f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}
|
|
64
|
+
S("shaka.util.BufferUtils",xb);xb.toDataView=Fb;xb.toUint16=Db;xb.toUint8=Ab;xb.toArrayBuffer=Bb;xb.equal=yb;function Gb(){}Gb.prototype.init=function(){};Gb.prototype.i=function(){};Gb.prototype.g=function(){};Gb.prototype.j=function(){};S("shaka.media.IClosedCaptionParser",Gb);function Hb(a){this.l=new wb;if(a=Ib[a.toLowerCase()])this.l=a();this.h=new vb;if(a=Jb)this.h=a()}Hb.prototype.init=function(a,b){(void 0===b?0:b)||this.g();this.l.init(a)};Hb.prototype.i=function(a){a=this.l.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=Ab(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()};
|
|
65
65
|
Hb.prototype.g=function(){this.h.clear()};Hb.prototype.j=function(){return this.h.getStreams()};S("shaka.media.ClosedCaptionParser",Hb);Hb.findDecoder=function(){return Jb};Hb.unregisterDecoder=function(){Jb=null};Hb.registerDecoder=function(a){Jb=a};Hb.findParser=function(a){return Ib[a]};Hb.unregisterParser=function(a){delete Ib[a]};Hb.registerParser=function(a,b){Ib[a]=b};var Ib={},Jb=null;function Kb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Lb;this.scroll=Mb}S("shaka.text.CueRegion",Kb);var Lb=1;Kb.units={PX:0,PERCENTAGE:Lb,LINES:2};var Mb="";Kb.scrollMode={NONE:Mb,UP:"up"};function Nb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Ob(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Pb(a,b,c){c||(c=Nb);if(a.length!=b.length)return!1;b=b.slice();a=t(a);for(var d=a.next(),e={};!d.done;e={Dg:void 0},d=a.next()){e.Dg=d.value;d=b.findIndex(function(f){return function(g){return c(f.Dg,g)}}(e));if(-1==d)return!1;b[d]=b[b.length-1];b.pop()}return 0==b.length}
|
|
66
66
|
function Qb(a,b,c){c||(c=Nb);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function T(a,b,c){var d=Ja.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(Rb)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}T.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};S("shaka.util.Error",T);var Rb=!0;T.Severity={RECOVERABLE:1,CRITICAL:2};T.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
|
|
67
67
|
T.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,
|
|
@@ -89,9 +89,9 @@ va(v,12),G(v,window.msdk.device.getDisplayInfoImmediate(),14);case 14:l=v.h;h="4
|
|
|
89
89
|
a.height=1080);case 19:xa(v,3);break;case 15:u=ya(v),Za("Failed to check canDisplayType:",u);case 3:return v.return(a)}})}var zc=null,yc=null;function Cc(){}
|
|
90
90
|
function Dc(a){if(!a)return"";a=Ab(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!rc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Za('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==
|
|
91
91
|
(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}
|
|
92
|
-
function Ec(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new T(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Fb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return
|
|
92
|
+
function Ec(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new T(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Fb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Fc(d)}
|
|
93
93
|
function Hc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Ab(a);if(239==c[0]&&187==c[1]&&191==c[2])return Dc(c);if(254==c[0]&&255==c[1])return Ec(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Ec(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Ec(a,!1);if(0==c[1]&&0==c[3])return Ec(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Dc(a);throw new T(2,2,2003);}
|
|
94
|
-
function Ic(a){if(window.TextEncoder&&!rc()){var b=new TextEncoder;return Bb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Bb(b)}function Jc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}function
|
|
94
|
+
function Ic(a){if(window.TextEncoder&&!rc()){var b=new TextEncoder;return Bb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Bb(b)}function Jc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}function Fc(a){return Kc.value()(a)}
|
|
95
95
|
function Lc(a){var b={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return"#"==e[1]?(e="x"==e[2]||"X"==e[2]?parseInt(e.substring(3),16):parseInt(e.substring(2),10),0<=e&&1114111>=e?String.fromCodePoint(e):""):b[e]||"'"}):a||""}S("shaka.util.StringUtils",Cc);Cc.resetFromCharCode=function(){Kc.g=void 0};
|
|
96
96
|
Cc.toUTF16=Jc;Cc.toUTF8=Ic;Cc.fromBytesAutoDetect=Hc;Cc.fromUTF16=Ec;Cc.fromUTF8=Dc;var Kc=new Sb(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={ec:65536};0<b.ec;b={ec:b.ec},b.ec/=2)if(a(b.ec))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.ec)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.ec));return e}}(b);return null});function Mc(a){this.h=a||"";this.g=0}function Nc(a){Oc(a,/[ \t]+/gm)}function Oc(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Pc(a){return a.g==a.h.length?null:(a=Oc(a,/[^ \t\n]*/gm))?a[0]:null}
|
|
97
97
|
function Qc(a){a=Oc(a,Sc);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:(Number(a[6])||0)/1E3+c+60*b+3600*(Number(a[1])||0)}function Tc(a){return a?Qc(new Mc(a)):null}var Sc=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Uc(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 instanceof 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 WeakSet;return b(a)}function Vc(a){var b={},c;for(c in a)b[c]=a[c];return b};/*
|
|
@@ -116,19 +116,19 @@ null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Tb=c.slice(1))}return b}
|
|
|
116
116
|
function zd(a,b){var c=xd(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;null==c&&(null!==d.t&&(c=Ad(a,"t",d.t)),null!==d.n&&(c=Ad(a,"n",d.n)));null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.Tb)&&a[c]?Bd(a[c],e,d,gd(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}
|
|
117
117
|
function Ad(a,b,c){var d=0;a=t(a);for(var e=a.next();!e.done;e=a.next()){if(Number(e.value.attributes[b])===c)return d;d++}return null}function Bd(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
|
|
118
118
|
function Cd(a){var b="",c=a.tagName.split(":");0<c.length&&(b=c[0],b=bd.has(b)?bd.get(b):"");b=document.createElementNS(b,a.tagName);for(var d in a.attributes)b.setAttribute(d,a.attributes[d]);a=t(a.children);for(d=a.next();!d.done;d=a.next())d=d.value,c=void 0,"string"==typeof d?c=new Text(d):c=Cd(d),b.appendChild(c);return b}
|
|
119
|
-
function Dd(a){if(!a)return null;var b={tagName:a.tagName,attributes:Vc(a.attributes),children:[],parent:null};a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"===typeof c?b.children.push(c):(c=Dd(c),c.parent=b,b.children.push(c));return b}var ad=new Map,bd=new Map;function Ed(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Kb;this.position=null;this.positionAlign=Fd;this.size=0;this.textAlign=Gd;this.direction=Hd;this.writingMode=Id;this.lineInterpretation=Jd;this.line=null;this.lineHeight="";this.lineAlign=Kd;this.displayAlign=Ld;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Md;this.fontStyle=
|
|
119
|
+
function Dd(a){if(!a)return null;var b={tagName:a.tagName,attributes:Vc(a.attributes),children:[],parent:null};a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"===typeof c?b.children.push(c):(c=Dd(c),c.parent=b,b.children.push(c));return b}var ad=new Map,bd=new Map;function Ed(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Kb;this.position=null;this.positionAlign=Fd;this.size=0;this.textAlign=Gd;this.direction=Hd;this.writingMode=Id;this.lineInterpretation=Jd;this.line=null;this.lineHeight="";this.lineAlign=Kd;this.displayAlign=Ld;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Md;this.fontStyle=Nd;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
|
|
120
120
|
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={jc:32,rows:15}}function Pd(a,b){a=new Ed(a,b,"");a.lineBreak=!0;return a}Ed.prototype.clone=function(){var a=new Ed(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
|
|
121
|
-
function
|
|
121
|
+
function Qd(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!Qb(a.nestedCues,b.nestedCues,Qd))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!Qb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}
|
|
122
122
|
function Td(a,b){b=void 0===b?new Map:b;var c=a.payload;if(c.includes("<")){0===b.size&&Ud(b);var d=c;c=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(Vd)&&c.push(e),e=-1);c=t(c);for(f=c.next();!f.done;f=c.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a:{f=d;e=[];var g=-1;c="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){c=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&
|
|
123
123
|
(l=e[e.length-1]);if(l){if(l===k)c+="/"+k+">";else{if(!l.startsWith("v")){c+=f[h];continue}c+="/"+l+">"}h+=k.length+1}else c+=f[h]}else c+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),c+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),c=c.replace("<"+e+">","<"+g+">"),c=c.replace("</"+e+">","</"+g+">"),d||(c+="</"+g+">")}c=Wd(c);a.payload="";try{var m=Xc("<span>"+c+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=
|
|
124
124
|
m.length||m[0].tagName)for(m=t(m),c=m.next();!c.done;c=m.next())Xd(c.value,a,b);else a.payload=Lc(c);else a.payload=Lc(c)}else a.payload=Lc(c)}function Ud(a){for(var b=t(Object.entries(Yd)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Ed(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(Zd));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Ed(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
|
|
125
125
|
function Wd(a){var b={"< ":""," >":" >"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}
|
|
126
126
|
function Xd(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Kb;d.position=null;d.size=0;if(a.tagName)for(var e=t(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(h=d,g=c.get(g))&&(h.backgroundColor=$d(g.backgroundColor,h.backgroundColor),h.color=$d(g.color,h.color),h.fontFamily=$d(g.fontFamily,h.fontFamily),h.fontSize=
|
|
127
127
|
$d(g.fontSize,h.fontSize),h.textShadow=$d(g.textShadow,h.textShadow),h.fontWeight=g.fontWeight,h.fontStyle=g.fontStyle,h.opacity=g.opacity,h.rubyTag=g.rubyTag,h.textCombineUpright=g.textCombineUpright,h.wrapLine=g.wrapLine);switch(f){case "br":d=Pd(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=ae;break;case "i":d.fontStyle=be;break;case "u":d.textDecoration.push(ce);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break;if(f=
|
|
128
|
-
Tc(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(cd(a)||1==e.length&&cd(e[0]))for(c=fd(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Pd(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Lc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())Xd(a.value,d,c)}function $d(a,b){return a&&0<a.length?a:b}S("shaka.text.Cue",Ed);Ed.parseCuePayload=Td;Ed.equal=
|
|
128
|
+
Tc(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(cd(a)||1==e.length&&cd(e[0]))for(c=fd(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Pd(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Lc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())Xd(a.value,d,c)}function $d(a,b){return a&&0<a.length?a:b}S("shaka.text.Cue",Ed);Ed.parseCuePayload=Td;Ed.equal=Qd;
|
|
129
129
|
Ed.prototype.clone=Ed.prototype.clone;var Fd="auto";Ed.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Fd};var Gd="center",de={LEFT:"left",RIGHT:"right",CENTER:Gd,START:"start",END:"end"};Ed.textAlign=de;var Ld="after",ee={BEFORE:"before",CENTER:"center",AFTER:Ld};Ed.displayAlign=ee;var Hd="ltr";Ed.direction={HORIZONTAL_LEFT_TO_RIGHT:Hd,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Id="horizontal-tb";Ed.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Id,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
|
|
130
130
|
var Jd=0;Ed.lineInterpretation={LINE_NUMBER:Jd,PERCENTAGE:1};var Kd="start",fe={CENTER:"center",START:Kd,END:"end"};Ed.lineAlign=fe;var Yd={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Ed.defaultTextColor=Yd;var Zd={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Ed.defaultTextBackgroundColor=Zd;var Md=400,ae=700;Ed.fontWeight={NORMAL:Md,BOLD:ae};
|
|
131
|
-
var
|
|
131
|
+
var Nd="normal",be="italic",ge={NORMAL:Nd,ITALIC:be,OBLIQUE:"oblique"};Ed.fontStyle=ge;var ce="underline";Ed.textDecoration={UNDERLINE:ce,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var Vd=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function he(){}he.prototype.destroy=function(){};function ie(a,b,c){je[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,fe:b}}function ke(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([le,me,ne,qe]),e=d.next();!e.done;e=d.next())if(e=je[c+"-"+e.value]){var f=e.fe(),g=f.isSupported(a,b);f.destroy();if(g)return e.fe}return null}S("shaka.transmuxer.TransmuxerEngine",he);he.findTransmuxer=ke;he.unregisterTransmuxer=function(a,b){delete je[a.toLowerCase().split(";")[0]+"-"+b]};
|
|
132
132
|
he.registerTransmuxer=ie;he.prototype.destroy=he.prototype.destroy;var je={},qe=1,ne=2,me=3,le=4;he.PluginPriority={FALLBACK:qe,PREFERRED_SECONDARY:ne,PREFERRED:me,APPLICATION:le};/*
|
|
133
133
|
@license
|
|
134
134
|
Copyright 2008 The Closure Library Authors
|
|
@@ -146,12 +146,12 @@ h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.p
|
|
|
146
146
|
function xe(a,b,c){b instanceof ze?a.g=b:(c||(b=Ae(b,Fe)),a.g=new ze(b))}function ye(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Ae(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Ge),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Ge(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Be=/[#\/\?@]/g,De=/[#\?:]/g,Ce=/[#\?]/g,Fe=/[#\?@]/g,Ee=/#/g;function ze(a){this.g=a||null}
|
|
147
147
|
function He(a){if(!a.Ka&&(a.Ka={},a.Zc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=ze.prototype;q.Ka=null;q.Zc=null;function Ie(a){He(a);return a.Zc}q.add=function(a,b){He(this);this.g=null;var c=this.Ka.hasOwnProperty(a)?this.Ka[a]:null;c||(this.Ka[a]=c=[]);c.push(b);this.Zc++;return this};
|
|
148
148
|
q.set=function(a,b){He(this);this.g=null;this.Ka.hasOwnProperty(a)?this.Ka[a]=[b]:this.add(a,b);return this};q.get=function(a){He(this);return this.Ka[a]||[]};q.toString=function(){if(this.g)return this.g;if(!this.Ka)return"";var a=[],b;for(b in this.Ka)for(var c=encodeURIComponent(b),d=this.Ka[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
|
|
149
|
-
q.clone=function(){var a=new ze;a.g=this.g;if(this.Ka){var b={},c;for(c in this.Ka)b[c]=this.Ka[c].concat();a.Ka=b;a.Zc=this.Zc}return a};function Je(){}function Ke(a){a=
|
|
149
|
+
q.clone=function(){var a=new ze;a.g=this.g;if(this.Ka){var b={},c;for(c in this.Ka)b[c]=this.Ka[c].concat();a.Ka=b;a.Zc=this.Zc}return a};function Je(){}function Ke(a){a=Fc(Ab(a));return btoa(a)}function Le(a,b){b=void 0==b?!0:b;a=Ke(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Me(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Ne(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
|
|
150
150
|
function Oe(a){var b=Ab(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Pe(){for(var a=Ja.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];e instanceof Uint8Array?b.set(e,c):b.set(Ab(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",Je);Je.concat=Pe;Je.toHex=Oe;Je.fromHex=Ne;Je.fromBase64=Me;Je.toBase64=Le;Je.toStandardBase64=Ke;function Qe(a,b,c){c=void 0===c?"":c;if(0==b.length)return a;if(1==a.length&&1==b.length){var d=new te(a[0]);b=new te(b[0]);b=d.resolve(b);c&&xe(b,c);return[b.toString()]}b=b.map(function(h){return new te(h)});d=[];a=t(a);for(var e=a.next();!e.done;e=a.next()){e=new te(e.value);for(var f=t(b),g=f.next();!g.done;g=f.next())g=e.resolve(g.value),c&&xe(g,c),d.push(g.toString())}return d}
|
|
151
151
|
function Re(a,b,c,d){a={keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set};d&&(a.keySystemUris=new Set([d]));return a}
|
|
152
152
|
function Se(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Le(Ne(h),!1));var l=g;22!=l.length&&(l=Le(Ne(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:Ab(Ic(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
|
|
153
153
|
audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Te(a,b){if(1==b.length)return b[0];a=Ue(a,b);if(null!=a)return a;throw new T(2,4,4025,b);}function Ue(a,b){for(var c=t(Ve[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==We?"":null}
|
|
154
|
-
function Xe(a,b){var c=[];a=t(Ve[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var We="text",Ye={ja:"video",Y:"audio",wa:We,De:"image",
|
|
154
|
+
function Xe(a,b){var c=[];a=t(Ve[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var We="text",Ye={ja:"video",Y:"audio",wa:We,De:"image",fj:"application"},Ze=1/15,Ve={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function $e(){}function af(a,b){var c=a;b&&!bf.includes(a)&&(c+='; codecs="'+b+'"');return c}function cf(a,b){b&&(a+='; codecs="'+b+'"');return a}function df(a,b,c){var d=af(a,b);b=cf(a,b);ke(b)?(a=ke(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
|
|
155
155
|
function ef(a,b,c){var d=[b];ff.forEach(function(e,f){var g=a[f];"codecs"==f?bf.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function gf(a){return a.split(";")[0].split("/")[1]}
|
|
156
156
|
function hf(a){var b=jf(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===
|
|
157
157
|
a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "vvc1"===a:case "vvi1"===a:return"vvc";case "dvh1"===a:case "dvhe"===a:return"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1";case "dvc1"===a:case "dvi1"===a:return"dovi-vvc"}return a}
|
|
@@ -225,37 +225,37 @@ yg.prototype.getBandwidthEstimate=yg.prototype.getBandwidthEstimate;yg.prototype
|
|
|
225
225
|
function Eg(a,b,c,d){var e;if(!(e=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(e=a.audio&&b.audio)){e=a.audio;var f=b.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||e.spatialAudio!==f.spatialAudio||c&&!Fg(e,f)||!Gg(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||Fg(a,b))&&Gg(a.roles,b.roles)));return d?!1:!0}Dg.prototype.values=function(){return this.g.values()};
|
|
226
226
|
function Fg(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return kf(d)});b=b.codecs.split(",").map(function(d){return kf(d)});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function Gg(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function Hg(a,b,c){b=void 0===b?"reload":b;c=void 0===c?!1:c;this.i=a;this.h=b;this.g=c;this.j=new Ig(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"",!1,"","","",b,c)}Hg.prototype.create=function(a){var b=this,c="smooth"==this.h&&pb(),d=a.filter(function(e){return Eg(b.i,e,!c,b.g)});return d.length?new Dg(d[0],d,!c,this.g):this.j.create(a)};
|
|
227
227
|
function Ig(a,b,c,d,e,f,g,h,k,l,m){this.A=a;this.B=b;this.i=c;this.j=d;this.C=e;this.m=f;this.h=void 0===g?"":g;this.l=void 0===h?"":h;this.o=void 0===k?"reload":k;this.s=void 0===l?!1:l;this.g=void 0===m?"":m}
|
|
228
|
-
Ig.prototype.create=function(a){var b=[];b=Jg(a,this.A);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Kg(b,this.B);a.length&&(b=a);this.m&&(a=Lg(b,this.m),a.length&&(b=a));this.j&&(a=Mg(b,this.j),a.length&&(b=a));this.i&&(a=Ng(b,this.i),a.length&&(b=a));this.h&&(a=Og(b,this.h),a.length&&(b=a));this.l&&(a=
|
|
229
|
-
function Jg(a,b){b=Gf(b);var c=Nf(b,a.map(function(d){return Mf(d)}));return c?a.filter(function(d){return c==Mf(d)}):[]}function Kg(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Og(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function
|
|
228
|
+
Ig.prototype.create=function(a){var b=[];b=Jg(a,this.A);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Kg(b,this.B);a.length&&(b=a);this.m&&(a=Lg(b,this.m),a.length&&(b=a));this.j&&(a=Mg(b,this.j),a.length&&(b=a));this.i&&(a=Ng(b,this.i),a.length&&(b=a));this.h&&(a=Og(b,this.h),a.length&&(b=a));this.l&&(a=Pg(b,this.l),a.length&&(b=a));a=Sg(b,this.C);a.length&&(b=a);this.g&&(a=Tg(b,this.g),a.length&&(b=a));return new Dg(b[0],b,!("smooth"==this.o&&pb()),this.s)};
|
|
229
|
+
function Jg(a,b){b=Gf(b);var c=Nf(b,a.map(function(d){return Mf(d)}));return c?a.filter(function(d){return c==Mf(d)}):[]}function Kg(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Og(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Pg(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
|
|
230
230
|
function Ng(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function Mg(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})}function Lg(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Sg(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}
|
|
231
231
|
function Tg(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function Ug(){this.g=Vg;this.i=(new Map).set(Vg,2).set(Wg,1);this.h=0}function Xg(a,b,c){a.i.set(Vg,c).set(Wg,b)}var Wg=0,Vg=1;function Yg(a,b){var c=Zg();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
|
|
232
|
-
function $g(a){var b,c;return P(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new T(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return G(d,new Promise(function(e){(new Zb(e)).$(c/1E3)}),2)}a.h*=a.m;H(d)})}function Zg(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function ah(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}ah.prototype.resolve=function(){};ah.prototype.reject=function(){};function bh(a,b){this.promise=a;this.i=b;this.g=!1}function
|
|
232
|
+
function $g(a){var b,c;return P(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new T(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return G(d,new Promise(function(e){(new Zb(e)).$(c/1E3)}),2)}a.h*=a.m;H(d)})}function Zg(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function ah(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}ah.prototype.resolve=function(){};ah.prototype.reject=function(){};function bh(a,b){this.promise=a;this.i=b;this.g=!1}function ch(a){return new bh(Promise.reject(a),function(){return Promise.resolve()})}function fh(){var a=Promise.reject(new T(2,7,7001));a.catch(function(){});return new bh(a,function(){return Promise.resolve()})}function gh(a){return new bh(Promise.resolve(a),function(){return Promise.resolve()})}function hh(a){return new bh(a,function(){return a.catch(function(){})})}bh.prototype.abort=function(){this.g=!0;return this.i()};
|
|
233
233
|
function ih(a){return new bh(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}bh.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
|
|
234
234
|
bh.prototype.Aa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=jh(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new ah,g=new T(2,7,7001);this.promise.then(c(!0),c(!1));return new bh(f,function(){return d()})};
|
|
235
235
|
function jh(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()}}}ea.Object.defineProperties(bh.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.g}}});S("shaka.util.AbortableOperation",bh);bh.prototype.chain=bh.prototype.Aa;bh.prototype["finally"]=bh.prototype.finally;
|
|
236
|
-
bh.all=ih;bh.prototype.abort=bh.prototype.abort;bh.notAbortable=hh;bh.completed=gh;bh.aborted=fh;bh.failed=
|
|
236
|
+
bh.all=ih;bh.prototype.abort=bh.prototype.abort;bh.notAbortable=hh;bh.completed=gh;bh.aborted=fh;bh.failed=ch;function V(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
|
|
237
237
|
function kh(a){var b=new V(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}V.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};V.prototype.stopImmediatePropagation=function(){this.g=!0};V.prototype.stopPropagation=function(){};S("shaka.util.FakeEvent",V);
|
|
238
|
-
var lh={
|
|
239
|
-
|
|
240
|
-
mh.prototype.release=function(){this.sa=null};function nh(){this.g=[]}function oh(a,b){a.g.push(b.finally(function(){Ob(a.g,b)}))}nh.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function ph(a,b,c,d,e,f){mh.call(this);this.i=!1;this.o=new nh;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.C=d||null;this.G=e||null;this.F=f||null;this.s=this.A=!1;this.m=16E3}
|
|
241
|
-
function th(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=t(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}q.
|
|
238
|
+
var lh={hj:"abrstatuschanged",ij:"adaptation",jj:"audiotrackchanged",kj:"buffering",lj:"complete",mj:"downloadfailed",nj:"downloadheadersreceived",oj:"drmsessionupdate",qj:"emsg",Kj:"prft",Error:"error",rj:"expirationupdated",sj:"firstquartile",tj:"gapjumped",wj:"keystatuschanged",Aj:"loaded",Bj:"loading",Dj:"manifestparsed",Ej:"manifestupdated",Fj:"mediaqualitychanged",Gj:"mediasourcerecovered",Metadata:"metadata",Hj:"midpoint",Ij:"nospatialvideoinfo",Jj:"onstatechange",Lj:"ratechange",Nj:"segmentappended",
|
|
239
|
+
Oj:"sessiondata",Pj:"spatialvideoinfo",Qj:"stalldetected",Rj:"started",Sj:"statechanged",Tj:"streaming",Uj:"textchanged",Vj:"texttrackvisibility",Wj:"thirdquartile",Xj:"timelineregionadded",Yj:"timelineregionenter",Zj:"timelineregionexit",$j:"trackschanged",bk:"unloading",dk:"variantchanged"};function mh(){this.sa=new fb;this.oe=this}mh.prototype.addEventListener=function(a,b){this.sa&&this.sa.push(a,b)};mh.prototype.removeEventListener=function(a,b){this.sa&&this.sa.remove(a,b)};mh.prototype.dispatchEvent=function(a){if(!this.sa)return!0;var b=this.sa.get(a.type)||[],c=this.sa.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.oe;a.currentTarget=this.oe;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
|
|
240
|
+
mh.prototype.release=function(){this.sa=null};function nh(){this.g=[]}function oh(a,b){a.g.push(b.finally(function(){Ob(a.g,b)}))}nh.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function ph(a,b,c,d,e,f){mh.call(this);this.i=!1;this.o=new nh;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.C=d||null;this.G=e||null;this.F=f||null;this.s=this.A=!1;this.m=16E3}pa(ph,mh);q=ph.prototype;q.Pf=function(a){this.A=a};q.Qf=function(a){this.s=a};function qh(a,b,c,d){c=c||rh;var e=sh[a];if(!e||c>=e.priority)sh[a]={priority:c,fe:b,Ci:void 0===d?!1:d}}
|
|
241
|
+
function th(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=t(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}q.Fi=function(a){this.g.add(a)};q.aj=function(a){this.g.delete(a)};q.jg=function(){this.g.clear()};q.Gi=function(a){this.h.add(a)};q.bj=function(a){this.h.delete(a)};q.kg=function(){this.h.clear()};
|
|
242
242
|
function uh(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();mh.prototype.release.call(this);return this.o.destroy()};
|
|
243
243
|
q.request=function(a,b,c){var d=this,e=new vh;if(this.i){var f=Promise.reject(new T(2,7,7001));f.catch(function(){});return new wh(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Uc(b.retryParameters):Zg();b.uris=Uc(b.uris);f=xh(this,a,b,c);var g=f.Aa(function(){return yh(d,a,b,c,new Yg(b.retryParameters,!1),0,null,e)}),h=g.Aa(function(p){return zh(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
|
|
244
|
-
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Aa(function(p){var r=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=r;p.
|
|
244
|
+
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Aa(function(p){var r=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=r;p.hi||!d.l||u.fromCache||"HEAD"==b.method||a!=Ah||d.l(u.timeMs,u.data.byteLength,Bh(c));d.F&&d.F(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new wh(n.promise,function(){return n.abort()},e);oh(this.o,f);return f};
|
|
245
245
|
function xh(a,b,c,d){function e(h){f=f.Aa(function(){c.body&&(c.body=Bb(c.body));return h(b,c,d)})}var f=gh(void 0);a.C&&e(a.C);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Aa(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})}
|
|
246
|
-
function yh(a,b,c,d,e,f,g,h){a.A&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.s&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.G&&a.G(b,d,c.uris[f],c.uris[f-1]);var k=new te(c.uris[f]),l=k.Bb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),ue(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=sh[l])?l.fe:null;if(!n)return
|
|
246
|
+
function yh(a,b,c,d,e,f,g,h){a.A&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.s&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.G&&a.G(b,d,c.uris[f],c.uris[f-1]);var k=new te(c.uris[f]),l=k.Bb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),ue(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=sh[l])?l.fe:null;if(!n)return ch(new T(2,1,1E3,k));var p=l.Ci,r=null,u=null,v=!1,w=!1,y;return hh($g(e)).Aa(function(){if(a.i)return fh();y=Date.now();var z=0;c.requestStartTime=Date.now();
|
|
247
247
|
var D=n(c.uris[f],c,b,function(C,E,F){r&&r.stop();u&&u.$(B/1E3);a.l&&b==Ah&&(z++,c.packetNumber=z,a.l(C,E,Bh(d),c),m=!0,h.g=F)},function(C){a.j&&a.j(C,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime},{minBytesForProgressEvents:a.m});if(!p)return D;var A=c.retryParameters.connectionTimeout;A&&(r=new Zb(function(){v=!0;D.abort()}),r.$(A/1E3));var B=c.retryParameters.stallTimeout;B&&(u=new Zb(function(){v=!0;D.abort()}));return D}).Aa(function(z){r&&r.stop();u&&u.stop();void 0==z.timeMs&&(z.timeMs=
|
|
248
|
-
Date.now()-y);var D={response:z,
|
|
248
|
+
Date.now()-y);var D={response:z,hi:m};!w&&a.j&&a.j(z.headers,c,b);return D},function(z){r&&r.stop();u&&u.stop();if(a.B){var D=null,A=0;z instanceof T&&(D=z,1001==z.code&&(A=z.data[1]));a.B(c,D,A,v)}if(a.i)return fh();v&&(z=new T(1,1,1003,c.uris[f],b));if(z instanceof T){if(7001==z.code)throw z;if(1010==z.code)throw g;if(1==z.severity)return D=(new Map).set("error",z),D=new V("retry",D),a.dispatchEvent(D),f=(f+1)%c.uris.length,yh(a,b,c,d,e,f,z,h)}throw z;})}
|
|
249
249
|
function zh(a,b,c,d){var e=gh(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={Sg:void 0},f=a.next())g.Sg=f.value,e=e.Aa(function(h){return function(){var k=c.response;k.data&&(k.data=Bb(k.data));return(0,h.Sg)(b,k,d)}}(g));return e.Aa(function(){return c},function(h){var k=2;if(h instanceof T){if(7001==h.code)throw h;k=h.severity}throw new T(k,1,1007,h);})}function Bh(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.s)return!1}return!0}S("shaka.net.NetworkingEngine",ph);
|
|
250
|
-
ph.prototype.request=ph.prototype.request;ph.prototype.destroy=ph.prototype.destroy;ph.makeRequest=uh;ph.defaultRetryParameters=function(){return Zg()};ph.prototype.clearAllResponseFilters=ph.prototype.kg;ph.prototype.unregisterResponseFilter=ph.prototype.
|
|
251
|
-
ph.registerScheme=qh;ph.prototype.setForceHTTPS=ph.prototype.Qf;ph.prototype.setForceHTTP=ph.prototype.Pf;function vh(){this.g=0}ph.NumBytesRemainingClass=vh;function wh(a,b,c){bh.call(this,a,b);this.h=c}
|
|
252
|
-
ph.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var rh=3;ph.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:rh};var sh={};function Ch(a){this.g=!1;this.h=new ah;this.i=a}Ch.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 Dh(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function Eh(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function Fh(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Gh(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Hh(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Ih(a,b){this.h=Fb(a);this.i=b==Jh;this.g=0}q=Ih.prototype;q.
|
|
250
|
+
ph.prototype.request=ph.prototype.request;ph.prototype.destroy=ph.prototype.destroy;ph.makeRequest=uh;ph.defaultRetryParameters=function(){return Zg()};ph.prototype.clearAllResponseFilters=ph.prototype.kg;ph.prototype.unregisterResponseFilter=ph.prototype.bj;ph.prototype.registerResponseFilter=ph.prototype.Gi;ph.prototype.clearAllRequestFilters=ph.prototype.jg;ph.prototype.unregisterRequestFilter=ph.prototype.aj;ph.prototype.registerRequestFilter=ph.prototype.Fi;ph.unregisterScheme=function(a){delete sh[a]};
|
|
251
|
+
ph.registerScheme=qh;ph.prototype.setForceHTTPS=ph.prototype.Qf;ph.prototype.setForceHTTP=ph.prototype.Pf;function vh(){this.g=0}ph.NumBytesRemainingClass=vh;function wh(a,b,c){bh.call(this,a,b);this.h=c}pa(wh,bh);ph.PendingRequest=wh;var Ah=1;ph.RequestType={MANIFEST:0,SEGMENT:Ah,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};
|
|
252
|
+
ph.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var rh=3;ph.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:rh};var sh={};function Ch(a){this.g=!1;this.h=new ah;this.i=a}Ch.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 Dh(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function Eh(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function Fh(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Gh(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Hh(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Ih(a,b){this.h=Fb(a);this.i=b==Jh;this.g=0}q=Ih.prototype;q.qa=function(){return this.g<this.h.byteLength};q.xa=function(){return this.g};q.getLength=function(){return this.h.byteLength};q.T=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Kh();}};q.la=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Kh();}};q.P=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Kh();}};
|
|
253
253
|
q.Pg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Kh();}};q.Qc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Kh();}if(2097151<b)throw new T(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.sb=function(a){if(this.g+a>this.h.byteLength)throw Kh();var b=Ab(this.h,this.g,a);this.g+=a;return b};
|
|
254
|
-
q.skip=function(a){if(this.g+a>this.h.byteLength)throw Kh();this.g+=a};q.
|
|
255
|
-
Ih.prototype.skip=Ih.prototype.skip;Ih.prototype.readBytes=Ih.prototype.sb;Ih.prototype.readUint64=Ih.prototype.Qc;Ih.prototype.readInt32=Ih.prototype.Pg;Ih.prototype.readUint32=Ih.prototype.P;Ih.prototype.readUint16=Ih.prototype.la;Ih.prototype.readUint8=Ih.prototype.T;Ih.prototype.getLength=Ih.prototype.getLength;Ih.prototype.getPosition=Ih.prototype.
|
|
256
|
-
q.Nc=function(a,b,c,d){var e=b.
|
|
257
|
-
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.
|
|
258
|
-
function Uh(a){var b=Rh(a);a.reader.skip(8);var c=a.reader.la();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.
|
|
254
|
+
q.skip=function(a){if(this.g+a>this.h.byteLength)throw Kh();this.g+=a};q.Ni=function(a){if(this.g<a)throw Kh();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Kh();this.g=a};q.tc=function(){for(var a=this.g;this.qa()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Ab(this.h,a,this.g-a);this.g+=1;return Dc(a)};function Kh(){return new T(2,3,3E3)}S("shaka.util.DataViewReader",Ih);Ih.prototype.readTerminatedString=Ih.prototype.tc;Ih.prototype.seek=Ih.prototype.seek;Ih.prototype.rewind=Ih.prototype.Ni;
|
|
255
|
+
Ih.prototype.skip=Ih.prototype.skip;Ih.prototype.readBytes=Ih.prototype.sb;Ih.prototype.readUint64=Ih.prototype.Qc;Ih.prototype.readInt32=Ih.prototype.Pg;Ih.prototype.readUint32=Ih.prototype.P;Ih.prototype.readUint16=Ih.prototype.la;Ih.prototype.readUint8=Ih.prototype.T;Ih.prototype.getLength=Ih.prototype.getLength;Ih.prototype.getPosition=Ih.prototype.xa;Ih.prototype.hasMoreData=Ih.prototype.qa;var Jh=1;Ih.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Jh};function Lh(){this.i=[];this.h=[];this.g=!1}q=Lh.prototype;q.box=function(a,b){a=Mh(a);this.i[a]=Nh;this.h[a]=b;return this};q.S=function(a,b){a=Mh(a);this.i[a]=Oh;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Ih(a,0);for(this.g=!1;a.qa()&&!this.g;)this.Nc(0,a,b,c)};
|
|
256
|
+
q.Nc=function(a,b,c,d){var e=b.xa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.P(),g=b.P(),h=Ph(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.xa()+8>b.getLength()){this.g=!0;return}f=b.Qc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Oh){if(d&&b.xa()+4>b.getLength()){this.g=!0;return}n=b.P();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.xa(),b=0<d?b.sb(d):new Uint8Array(0),b=new Ih(b,0),l({name:h,parser:this,
|
|
257
|
+
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.xa(),b.getLength()-b.xa()))}};function Qh(a){for(var b=Rh(a);a.reader.qa()&&!a.parser.g;)a.parser.Nc(a.start+b,a.reader,a.partialOkay)}function Sh(a){for(var b=Rh(a),c=a.reader.P(),d=0;d<c&&(a.parser.Nc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Th(a){var b=Rh(a);for(a.reader.skip(78);a.reader.qa()&&!a.parser.g;)a.parser.Nc(a.start+b,a.reader,a.partialOkay)}
|
|
258
|
+
function Uh(a){var b=Rh(a);a.reader.skip(8);var c=a.reader.la();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.qa()&&!a.parser.g;)a.parser.Nc(a.start+b,a.reader,a.partialOkay)}function Vh(a){return function(b){a(b.reader.sb(b.reader.getLength()-b.reader.xa()))}}function Mh(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Ph(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
|
|
259
259
|
function Rh(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",Lh);Lh.headerSize=Rh;Lh.typeToString=Ph;Lh.allData=Vh;Lh.audioSampleEntry=Uh;Lh.visualSampleEntry=Th;Lh.sampleDescription=Sh;Lh.children=Qh;Lh.prototype.parseNext=Lh.prototype.Nc;Lh.prototype.parse=Lh.prototype.parse;Lh.prototype.stop=Lh.prototype.stop;Lh.prototype.fullBox=Lh.prototype.S;Lh.prototype.box=Lh.prototype.box;var Nh=0,Oh=1;function Wh(a){var b=this;this.g=[];this.h=[];this.data=[];(new Lh).box("moov",Qh).box("moof",Qh).S("pssh",function(c){if(!(1<c.version)){var d=Ab(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Oe(c.reader.sb(16)));if(0<c.version){d=c.reader.P();for(var e=0;e<d;e++){var f=Oe(c.reader.sb(16));b.h.push(f)}}}}).parse(a)}
|
|
260
260
|
function Xh(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Fb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=Ne(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Yh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.ga=this.ea=!1;this.I=0;this.g=null;this.B=new gb;this.i=new Map;this.A=new Map;this.l=new ah;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.aa=new Map;this.fa=new Map;this.L=new Zb(function(){return Zh(b)});this.O=!1;this.N=[];this.X=!1;this.K=new Zb(function(){$h(b)});this.l.catch(function(){});this.j=new Ch(function(){return ai(b)});this.ba=!1;this.F=this.G=null;this.R=function(){return!1}}
|
|
261
261
|
q=Yh.prototype;q.destroy=function(){return this.j.destroy()};function ai(a){return P(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.l.reject(),a.K.stop(),a.K=null,a.L.stop(),a.L=null,G(b,bi(a),2);case 2:if(!a.m){b.u(3);break}va(b,4);return G(b,a.m.setMediaKeys(null),6);case 6:xa(b,5);break;case 4:ya(b);case 5:a.m=null;case 3:a.g=null,a.H.clear(),a.s=null,a.A=new Map,a.h=null,a.o=function(){},a.C=null,a.ba=!1,a.G=null,H(b)}})}
|
|
@@ -264,7 +264,7 @@ function fi(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:
|
|
|
264
264
|
function di(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,D,A;return P(function(B){if(1==B.g){if(c=hi(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(C){return C.video&&C.video.drmInfos.length||C.audio&&C.audio.drmInfos.length?!0:!1});g||(h=Gh(a.h.servers),ii(b,h));k=new Set;l=t(b);for(m=l.next();!m.done;m=l.next())for(n=m.value,p=ji(n),r=t(p),u=r.next();!u.done;u=r.next())v=u.value,k.add(v);w=t(k);for(y=w.next();!y.done;y=
|
|
265
265
|
w.next())z=y.value,ki(z,Gh(a.h.servers),Gh(a.h.advanced||{}),a.h.keySystemsMapping);return G(B,Yf(b,a.O,a.ba,a.h.preferredKeySystems),2)}Dh(a.j);D=g||Object.keys(a.h.servers).length;if(!D)return a.ea=!0,B.return(Promise.resolve());A=gi(a,void 0,b);return B.return(g?A:A.catch(function(){}))})}
|
|
266
266
|
function li(a){var b;return P(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.G){c.u(2);break}return G(c,a.G,3);case 3:return Dh(a.j),c.return();case 2:return va(c,4),a.G=a.m.setMediaKeys(a.s),G(c,a.G,6);case 6:xa(c,5);break;case 4:b=ya(c),a.o(new T(2,6,6003,b.message));case 5:Dh(a.j),H(c)}})}function mi(a,b){return P(function(c){if(1==c.g)return G(c,li(a),2);ni(a,b.initDataType,Ab(b.initData));H(c)})}
|
|
267
|
-
q.Sb=function(a){var b=this;return P(function(c){if(1==c.g){if(!b.s)return b.B.
|
|
267
|
+
q.Sb=function(a){var b=this;return P(function(c){if(1==c.g){if(!b.s)return b.B.ra(a,"encrypted",function(){b.o(new T(2,6,6010))}),c.return();b.m=a;b.B.ra(b.m,"play",function(){for(var d=t(b.N),e=d.next();!e.done;e=d.next())oi(b,e.value);b.X=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.B.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return bi(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||
|
|
268
268
|
b.A.size?G(c,li(b),2):c.u(2)}pi(b).catch(function(){});b.F||b.A.size||b.h.parseInbandPsshEnabled||b.B.D(b.m,"encrypted",function(d){return mi(b,d)});H(c)})};
|
|
269
269
|
function qi(a){var b,c,d,e,f;return P(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.u(2);break}b=uh([a.g.serverCertificateUri],a.h.retryParameters);va(g,3);c=a.C.Mb.request(5,b,{isPreload:a.R()});return G(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Ab(d.data);xa(g,4);break;case 3:throw e=ya(g),new T(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();
|
|
270
270
|
va(g,6);return G(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:xa(g,0);break;case 6:throw f=ya(g),new T(2,6,6004,f.message);}})}function ri(a,b){var c,d,e;return P(function(f){if(1==f.g)return G(f,si(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.lb=new ah,d.push(e.lb);d.push(c.remove());return G(f,Promise.all(d),3)}a.i.delete(c);H(f)})}
|
|
@@ -292,10 +292,10 @@ Bi(a,d));H(w)}})}
|
|
|
292
292
|
function Di(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(Vb(a.g.keySystem)&&16==g.byteLength&&(ec()||rc())){h=Fb(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=Oe(g).slice(0,32);a.aa.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.lb&&(a.i.delete(b),b.close().catch(function(){}));ui(a)&&
|
|
293
293
|
(a.l.resolve(),a.L.$(Ei))}function Zh(a){var b=a.aa,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.o(new T(2,6,6014));a.C.be(Hh(c))}
|
|
294
294
|
function Fi(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,D,A,B,C,E,F,J,K,L;return P(function(I){if(1==I.g){a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps".split(" ");b=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];c=["150","2000","3000"];d={"com.widevine.alpha":b,"com.microsoft.playready.recommendation":c};e=
|
|
295
|
-
[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(O,M){var N,Q,R,U,aa,fa,
|
|
296
|
-
(N=M.getConfiguration().sessionTypes)?N.includes("persistent-license"):!1,ic()&&(Q=!1),R=M.getConfiguration().videoCapabilities,U=M.getConfiguration().audioCapabilities,aa={persistentState:Q,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(O)&&k.get(O)?aa=k.get(O):k.set(O,aa),(fa=R[0].encryptionScheme)&&!aa.encryptionSchemes.includes(fa)&&aa.encryptionSchemes.push(fa),(
|
|
297
|
-
!aa.audioRobustnessLevels.includes(
|
|
298
|
-
[Ya,R];return G(Sa,navigator.requestMediaKeySystemAccess(O,Pa),4);case 4:return
|
|
295
|
+
[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(O,M){var N,Q,R,U,aa,fa,qa,Aa;return P(function(Ha){switch(Ha.g){case 1:return va(Ha,2),G(Ha,M.createMediaKeys(),4);case 4:xa(Ha,3);break;case 2:return ya(Ha),Ha.return();case 3:Q=
|
|
296
|
+
(N=M.getConfiguration().sessionTypes)?N.includes("persistent-license"):!1,ic()&&(Q=!1),R=M.getConfiguration().videoCapabilities,U=M.getConfiguration().audioCapabilities,aa={persistentState:Q,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(O)&&k.get(O)?aa=k.get(O):k.set(O,aa),(fa=R[0].encryptionScheme)&&!aa.encryptionSchemes.includes(fa)&&aa.encryptionSchemes.push(fa),(qa=R[0].robustness)&&!aa.videoRobustnessLevels.includes(qa)&&aa.videoRobustnessLevels.push(qa),(Aa=U[0].robustness)&&
|
|
297
|
+
!aa.audioRobustnessLevels.includes(Aa)&&aa.audioRobustnessLevels.push(Aa),H(Ha)}})};m=function(O,M,N,Q){var R,U,aa,fa,qa,Aa,Ha,Ya,Pa,ra;return P(function(Sa){switch(Sa.g){case 1:va(Sa,2);R=Uc(g);U=t(R.videoCapabilities);for(aa=U.next();!aa.done;aa=U.next())fa=aa.value,fa.encryptionScheme=M,fa.robustness=N;qa=t(R.audioCapabilities);for(Aa=qa.next();!Aa.done;Aa=qa.next())Ha=Aa.value,Ha.encryptionScheme=M,Ha.robustness=Q;Ya=Uc(R);Ya.persistentState="required";Ya.sessionTypes=["persistent-license"];Pa=
|
|
298
|
+
[Ya,R];return G(Sa,navigator.requestMediaKeySystemAccess(O,Pa),4);case 4:return ra=Sa.h,G(Sa,l(O,ra),5);case 5:xa(Sa,0);break;case 2:ya(Sa),H(Sa)}})};n=function(O,M,N,Q){var R,U,aa;return P(function(fa){switch(fa.g){case 1:return va(fa,2),R={type:"media-source",video:{contentType:e[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:f[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:O,video:{encryptionScheme:M,robustness:N},audio:{encryptionScheme:M,
|
|
299
299
|
robustness:Q}}},G(fa,navigator.mediaCapabilities.decodingInfo(R),4);case 4:return U=fa.h,aa=U.keySystemAccess,G(fa,l(O,aa),5);case 5:xa(fa,0);break;case 2:ya(fa),H(fa)}})};p=t(a);for(r=p.next();!r.done;r=p.next())u=r.value,k.set(u,null);v=[];w=t(h);for(y=w.next();!y.done;y=w.next())for(z=y.value,D=t(a),A=D.next();!A.done;A=D.next())B=A.value,"org.w3.clearkey"===B&&uc()||(v.push(m(B,z,"","")),v.push(n(B,z,"","")));C=t(a);for(E=C.next();!E.done;E=C.next())for(F=E.value,J=t(d[F]||[]),K=J.next();!K.done;K=
|
|
300
300
|
J.next())L=K.value,v.push(m(F,null,L,"")),v.push(m(F,null,"",L)),v.push(n(F,null,L,"")),v.push(n(F,null,"",L));return G(I,Promise.all(v),2)}return I.return(Hh(k))})}function Gi(a){var b;return P(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Zb(e)).$(Hi)}),va(c,2),G(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return xa(c,0);ya(c);H(c)})}
|
|
301
301
|
function bi(a){var b;return P(function(c){b=Array.from(a.i.entries());a.i.clear();return G(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return P(function(g){if(1==g.g)return va(g,2),a.ga||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?G(g,Gi(e),5):G(g,e.remove(),5);if(2!=g.g)return xa(g,0);ya(g);H(g)})})),0)})}function ji(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
|
|
@@ -315,18 +315,18 @@ function Ii(a,b,c){this.h=a;this.i=b;this.g=c}function Ji(a,b){return P(function
|
|
|
315
315
|
function Li(a,b){var c=a.h.restrictions;a=a.i;var d=!1;b=t(b.variants);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Sf(e,c,a);f!=e.allowedByApplication&&(d=!0)}return d}function Ki(a,b){var c=Li(a,b);if(b){var d=a.g?a.g.g:null;if(d&&a.g.s)for(var e=t(b.variants),f=e.next();!f.done;f=e.next())f=f.value,Mi(a,d.keySystem,f.video),Mi(a,d.keySystem,f.audio);Ni(a,b)}return c}
|
|
316
316
|
function Mi(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,ni(a.g,e.initDataType,e.initData)}}}
|
|
317
317
|
function Ni(a,b){a=a.g?a.g.Jd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=t(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?Oi.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
|
|
318
|
-
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var Oi=["output-restricted","internal-error"];function Pi(){}function Qi(a,b){if(b){var c=Ri[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",Pi);Pi.unregisterParserByMime=function(a){delete Ri[a]};Pi.registerParserByMime=function(a,b){Ri[a]=b};Pi.registerParserByExtension=function(){rb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Pi.AccessibilityPurpose={
|
|
318
|
+
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var Oi=["output-restricted","internal-error"];function Pi(){}function Qi(a,b){if(b){var c=Ri[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",Pi);Pi.unregisterParserByMime=function(a){delete Ri[a]};Pi.registerParserByMime=function(a,b){Ri[a]=b};Pi.registerParserByExtension=function(){rb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Pi.AccessibilityPurpose={ck:"visually impaired",uj:"hard of hearing"};var Ri={};function Si(a,b){function c(){f=!0}function d(m){h.push(m);Qh(m)}var e=a=Ab(a),f=!1,g,h=[],k=[];(new Lh).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).S("stsd",function(m){g=m;h.push(m);Sh(m)}).S("encv",c).S("enca",c).S("dvav",function(m){k.push({box:m,Oa:1701733238})}).S("dva1",function(m){k.push({box:m,Oa:1701733238})}).S("dvh1",function(m){k.push({box:m,Oa:1701733238})}).S("dvhe",function(m){k.push({box:m,Oa:1701733238})}).S("dvc1",function(m){k.push({box:m,Oa:1701733238})}).S("dvi1",
|
|
319
319
|
function(m){k.push({box:m,Oa:1701733238})}).S("hev1",function(m){k.push({box:m,Oa:1701733238})}).S("hvc1",function(m){k.push({box:m,Oa:1701733238})}).S("avc1",function(m){k.push({box:m,Oa:1701733238})}).S("avc3",function(m){k.push({box:m,Oa:1701733238})}).S("ac-3",function(m){k.push({box:m,Oa:1701733217})}).S("ec-3",function(m){k.push({box:m,Oa:1701733217})}).S("ac-4",function(m){k.push({box:m,Oa:1701733217})}).S("mp4a",function(m){k.push({box:m,Oa:1701733217})}).parse(a);if(f)return a;if(0==k.length||
|
|
320
320
|
!g)throw eb(Oe(a)),new T(2,3,3019,b);k.reverse();b=t(k);for(var l=b.next();!l.done;l=b.next())l=l.value,e=Ti(e,g,l.box,h,l.Oa);return ec()&&vc()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e}
|
|
321
321
|
function Ti(a,b,c,d,e){var f=Ui.value(),g=a.subarray(c.start,c.start+c.size),h=Fb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Fb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Vi(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=fc()||ec()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,Vi(e,d.start,d.size+k.byteLength);k=Fb(e,b.start);b=Rh(b);
|
|
322
322
|
a=k.getUint32(b);k.setUint32(b,a+1);return e}function Vi(a,b,c){a=Fb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Ui=new Sb(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Wi(a,b,c,d,e,f,g){this.M=a;this.Ha=b;this.va=c;this.Lc=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}Wi.prototype.Yb=function(){return this.Ha};Wi.prototype.Wb=function(){return this.va};Wi.prototype.ed=function(){return this.g};function Xi(a,b){return a===b?!0:a&&b?a.Yb()==b.Yb()&&a.Wb()==b.Wb()&&Qb(a.M().sort(),b.M().sort())&&yb(a.ed(),b.ed()):a==b}S("shaka.media.InitSegmentReference",Wi);
|
|
323
323
|
Wi.prototype.getEndByte=Wi.prototype.Wb;Wi.prototype.getStartByte=Wi.prototype.Yb;
|
|
324
|
-
function Yi(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v){l=void 0===l?[]:l;r=void 0===r?
|
|
325
|
-
this.o&&this.g.length&&this.g[this.g.length-1].Gg();this.C=this.bandwidth=this.mimeType=this.codecs=null}q=Yi.prototype;q.M=function(){return this.F()};q.getStartTime=function(){return this.startTime};q.Kh=function(){return this.endTime};q.Yb=function(){return this.Ha};q.Wb=function(){return this.va};q.
|
|
326
|
-
q.Kc=function(){this.l=!1};q.
|
|
327
|
-
q.Uf=function(a){null==this.h?Za("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.
|
|
328
|
-
Yi.prototype.getThumbnailSprite=Yi.prototype
|
|
329
|
-
Yi.prototype.markAsPreload=Yi.prototype.xf;Yi.prototype.markAsUnavailable=Yi.prototype.
|
|
324
|
+
function Yi(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v){l=void 0===l?[]:l;r=void 0===r?aj:r;this.startTime=a;this.j=this.endTime=b;this.F=c;this.Ha=d;this.va=e;this.Z=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.B=void 0===n?null:n;this.h=void 0===p?null:p;this.status=r;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.A=null;this.i=0;this.o=void 0===v?!1:v;this.G=this.s=!1;a=t(this.g);for(b=a.next();!b.done;b=a.next())b.value.Hg();
|
|
325
|
+
this.o&&this.g.length&&this.g[this.g.length-1].Gg();this.C=this.bandwidth=this.mimeType=this.codecs=null}q=Yi.prototype;q.M=function(){return this.F()};q.getStartTime=function(){return this.startTime};q.Kh=function(){return this.endTime};q.Yb=function(){return this.Ha};q.Wb=function(){return this.va};q.ci=function(){return this.tilesLayout};q.bi=function(){return this.B};q.Zb=function(){return this.status};q.vi=function(){this.status=bj};q.xf=function(){this.preload=!0};q.isPreload=function(){return this.preload};
|
|
326
|
+
q.Kc=function(){this.l=!1};q.mi=function(){return this.l};q.Hg=function(){this.s=!0};q.oi=function(){return this.s};q.Gg=function(){this.G=!0};q.ni=function(){return this.G};q.Fg=function(){this.m=!0};q.ii=function(){return this.m};q.bh=function(a){this.A=a};q.ai=function(){return this.A};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};
|
|
327
|
+
q.Uf=function(a){null==this.h?Za("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.Yi=function(a){this.C=a};q.ed=function(){return this.C};function cj(a,b){a.Z=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())cj(c.value,b)}S("shaka.media.SegmentReference",Yi);Yi.prototype.getSegmentData=Yi.prototype.ed;Yi.prototype.setSegmentData=Yi.prototype.Yi;Yi.prototype.syncAgainst=Yi.prototype.Uf;Yi.prototype.offset=Yi.prototype.offset;
|
|
328
|
+
Yi.prototype.getThumbnailSprite=Yi.prototype.ai;Yi.prototype.setThumbnailSprite=Yi.prototype.bh;Yi.prototype.hasByterangeOptimization=Yi.prototype.ii;Yi.prototype.markAsByterangeOptimization=Yi.prototype.Fg;Yi.prototype.isLastPartial=Yi.prototype.ni;Yi.prototype.markAsLastPartial=Yi.prototype.Gg;Yi.prototype.isPartial=Yi.prototype.oi;Yi.prototype.markAsPartial=Yi.prototype.Hg;Yi.prototype.isIndependent=Yi.prototype.mi;Yi.prototype.markAsNonIndependent=Yi.prototype.Kc;Yi.prototype.isPreload=Yi.prototype.isPreload;
|
|
329
|
+
Yi.prototype.markAsPreload=Yi.prototype.xf;Yi.prototype.markAsUnavailable=Yi.prototype.vi;Yi.prototype.getStatus=Yi.prototype.Zb;Yi.prototype.getTileDuration=Yi.prototype.bi;Yi.prototype.getTilesLayout=Yi.prototype.ci;Yi.prototype.getEndByte=Yi.prototype.Wb;Yi.prototype.getStartByte=Yi.prototype.Yb;Yi.prototype.getEndTime=Yi.prototype.Kh;Yi.prototype.getStartTime=Yi.prototype.getStartTime;Yi.prototype.getUris=Yi.prototype.M;var aj=0,bj=1;Yi.Status={gj:aj,ak:bj,Cj:2};function dj(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function ej(a){return!a||dj(a)?null:a.length?a.end(a.length-1):null}function fj(a,b){return!a||!a.length||dj(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function gj(a,b){if(!a||!a.length||dj(a))return 0;var c=0;a=t(hj(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}
|
|
330
330
|
function ij(a,b,c){if(!a||!a.length||dj(a))return null;a=hj(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function hj(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};/*
|
|
331
331
|
@license
|
|
332
332
|
Shaka Player
|
|
@@ -338,8 +338,8 @@ function nj(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureTyp
|
|
|
338
338
|
d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Dc(Ab(a.data,1,d));a=Dc(Ab(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Dc(Ab(a.data,1,d));a=Dc(Ab(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=Dc(Ab(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
|
|
339
339
|
c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Bb(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=Dc(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Dc(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Bb(a.data),b):null}
|
|
340
340
|
function oj(a){for(var b=0,c=[];kj(a,b);){var d=mj(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=mj(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=nj(e))&&c.push(f);b+=e.size+10}lj(a,b)&&(b+=10)}return c}function pj(a,b){for(var c=b=void 0===b?0:b,d=0;kj(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=mj(a,b+6),lj(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",jj);jj.getID3Data=pj;
|
|
341
|
-
jj.getID3Frames=oj;function qj(a,b){var c=null,d=null,e=null,f=a.P();b&1&&(e=a.Qc());b&2&&a.skip(4);b&8&&(c=a.P());b&16&&(d=a.P());return{trackId:f,$c:c,Gd:d,
|
|
342
|
-
function tj(a,b,c){var d=a.P(),e=[],f=null;c&1&&(f=a.P());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Kf:null,sampleSize:null,ke:null};c&256&&(h.Kf=a.P());c&512&&(h.sampleSize=a.P());c&1024&&a.skip(4);c&2048&&(h.ke=0==b?a.P():a.Pg());e.push(h)}return{
|
|
341
|
+
jj.getID3Frames=oj;function qj(a,b){var c=null,d=null,e=null,f=a.P();b&1&&(e=a.Qc());b&2&&a.skip(4);b&8&&(c=a.P());b&16&&(d=a.P());return{trackId:f,$c:c,Gd:d,ek:e}}function rj(a,b){return 1==b?(b=a.P(),a=a.P(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.P()}}function sj(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.P();a.skip(4);a=a.la();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
|
|
342
|
+
function tj(a,b,c){var d=a.P(),e=[],f=null;c&1&&(f=a.P());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Kf:null,sampleSize:null,ke:null};c&256&&(h.Kf=a.P());c&512&&(h.sampleSize=a.P());c&1024&&a.skip(4);c&2048&&(h.ke=0==b?a.P():a.Pg());e.push(h)}return{ik:d,Tg:e,Dh:f}}function uj(a){a.skip(6);a.skip(2);a.skip(8);var b=a.la();a.skip(2);a.skip(2);a.skip(2);a=a.la()+a.la()/65536;return{channelCount:b,sampleRate:a}}function vj(a){a=a.P();return{codec:Ph(a)}}
|
|
343
343
|
function wj(a){var b=null,c=null,d=a.sb(4);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if("nclx"===e){switch(a.la()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.la();a.la();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,wd:c}}
|
|
344
344
|
function xj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function yj(a){return(10>a?"0":"")+a};/*
|
|
345
345
|
|
|
@@ -358,108 +358,108 @@ function xj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0
|
|
|
358
358
|
limitations under the License.
|
|
359
359
|
*/
|
|
360
360
|
function zj(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=Ab(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function Aj(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Ih(c,0)).P(),a.g=8*d,a.i-=d)}function Bj(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;Aj(a)}a.h<<=b;a.g-=b}
|
|
361
|
-
function Cj(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&Aj(a);c=b-c;return 0<c?d<<c|Cj(a,c):d}function Dj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;Aj(a);return b+Dj(a)}function Ej(a){Bj(a,1+Dj(a))}function W(a){var b=Dj(a);return Cj(a,b+1)-1}function Fj(a){a=W(a);return 1&a?1+a>>>1:-1*(a>>>1)}function
|
|
361
|
+
function Cj(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&Aj(a);c=b-c;return 0<c?d<<c|Cj(a,c):d}function Dj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;Aj(a);return b+Dj(a)}function Ej(a){Bj(a,1+Dj(a))}function W(a){var b=Dj(a);return Cj(a,b+1)-1}function Fj(a){a=W(a);return 1&a?1+a>>>1:-1*(a>>>1)}function Nj(a){return 1===Cj(a,1)}function Oj(a){return Cj(a,8)}
|
|
362
362
|
function Pj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=Fj(a),d=(c+d+256)%256),c=0===d?c:d}function Qj(a){Oj(a);W(a);return W(a)}S("shaka.util.ExpGolomb",zj);function Rj(){this.G=null;this.H=!1;this.m=this.I=null;this.j=[];this.g=[];this.A=this.B=null;this.i=[];this.h=[];this.C=null;this.l=[];this.F=this.o=this.s=null}q=Rj.prototype;q.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
|
|
363
363
|
q.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,Sj(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.G=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.G:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Od:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
|
|
364
|
-
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0<m)for(var n=h+5,p=m;2<p;){var r=f[n+1]+2;switch(f[n]){case 5:var u=
|
|
364
|
+
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0<m)for(var n=h+5,p=m;2<p;){var r=f[n+1]+2;switch(f[n]){case 5:var u=Fc(f.subarray(n+2,n+r));-1==g.audio&&"Opus"===u?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===u&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(u=
|
|
365
365
|
null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.F={channelCount:0===(u&15)?2:u&15,Ah:u,sampleRate:48E3}))}n+=r;p-=r}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.Od&&(g.Od=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");
|
|
366
366
|
break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.I=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.B=f.audio,this.A=f.audioCodec);-1!=f.Od&&(this.C=f.Od);d&&!this.H&&(d=!1,e=b-188);this.H=!0;break;case this.I:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.B:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);
|
|
367
367
|
break;case this.C:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
|
|
368
368
|
function Tj(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.s&&(a.s=e);c.pts=Uj(e,a.s);a.s=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.o&&(a.o=d),c.dts=Uj(d,
|
|
369
|
-
a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}q.
|
|
369
|
+
a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}q.Bi=function(a){rb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Df(a)};
|
|
370
370
|
q.Df=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var p=a[n];if(p){if(2<=g&&1==p){b&&!h.length&&-1==k&&(p=n-(3<g?3:g),c&&0!=p&&(p=a.subarray(0,p),b.data=Pe(b.data,p),b.fullData=Pe(b.fullData,p)));0<=k?(g=n-((3<g?3:g)+1),h.push({data:a.subarray(k+f,g+1),fullData:a.subarray(k,g+1),type:l,time:d})):b&&!h.length&&(k=n-g,0<k&&(k=a.subarray(0,k),b.data=Pe(b.data,k),b.fullData=Pe(b.fullData,k)));if(n>=e-f)return h;
|
|
371
371
|
n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=Pe(b.data,a),b.fullData=Pe(b.fullData,a));return h};q.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Pe.apply(Je,x(c.value)),(c=Tj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:oj(c.data),dts:c.dts,pts:c.pts});return a};
|
|
372
372
|
q.Vb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=Pe.apply(Je,x(c.value)),e=Tj(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=Pe(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
|
|
373
373
|
q.oc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=Pe.apply(Je,x(d.value)),f=Tj(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=Pe(d.data,e),this.g.push(d))}if(a){c=[];d=t(this.g);for(e=d.next();!e.done;e=d.next())if(e=e.value,e.nalus=this.Df(e,
|
|
374
374
|
g,void 0),e.nalus.length){c.push(e);var g=e.nalus[e.nalus.length-1]}this.g=c}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};q.getStartTime=function(a){if("audio"==a){a=null;var b=this.Vb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.oc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};q.ad=function(){return{audio:this.A,video:this.m}};
|
|
375
|
-
q.Md=function(){for(var a=[],b=t(this.oc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};q.
|
|
376
|
-
function Wj(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Md();if(!c.length)return b;c=c.find(function(r){return 7==r.type});if(!c)return b;c=new zj(c.data);var d=Oj(c),e=Oj(c),f=Oj(c);Ej(c);if(Yj.includes(d)){var g=W(c);3===g&&Bj(c,1);Ej(c);Ej(c);Bj(c,1);if(
|
|
377
|
-
1);var l=0,m=0,n=0,p=0;
|
|
378
|
-
function Vj(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Md();if(!c.length)return b;c=c.find(function(B){return 33==B.type});if(!c)return b;var d=new zj(c.fullData,!0);Oj(d);Oj(d);Cj(d,4);var e=Cj(d,3);
|
|
379
|
-
y=0,D=0,A=0;
|
|
380
|
-
c&&(f+="."+c.toString(16).toUpperCase());b.codec=f;b.frameRate=Xj(a);return b}function Uj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Zj(a){return 0>Sj(a)?!1:!0}function Sj(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}S("shaka.util.TsParser",Rj);Rj.syncOffset=Sj;Rj.probe=Zj;Rj.prototype.getVideoInfo=Rj.prototype.kf;Rj.prototype.getVideoResolution=Rj.prototype.
|
|
381
|
-
Rj.prototype.getVideoNalus=Rj.prototype.Md;Rj.prototype.getCodecs=Rj.prototype.ad;Rj.prototype.getStartTime=Rj.prototype.getStartTime;Rj.prototype.getVideoData=Rj.prototype.oc;Rj.prototype.getAudioData=Rj.prototype.Vb;Rj.prototype.getMetadata=Rj.prototype.getMetadata;Rj.prototype.parseNalus=Rj.prototype.Df;Rj.prototype.parseAvcNalus=Rj.prototype.
|
|
375
|
+
q.Md=function(){for(var a=[],b=t(this.oc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};q.fi=function(){rb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.kf();return{height:a.height,width:a.width}};q.kf=function(){return"hvc"==this.m?Vj(this):Wj(this)};function Xj(a){var b=a.oc();return 1<b.length&&(a=b[0].pts,b=b[1].pts,!isNaN(b-a))?String(1/(b-a)*9E4):null}
|
|
376
|
+
function Wj(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Md();if(!c.length)return b;c=c.find(function(r){return 7==r.type});if(!c)return b;c=new zj(c.data);var d=Oj(c),e=Oj(c),f=Oj(c);Ej(c);if(Yj.includes(d)){var g=W(c);3===g&&Bj(c,1);Ej(c);Ej(c);Bj(c,1);if(Nj(c)){g=3!==g?8:12;for(var h=0;h<g;h++)Nj(c)&&(6>h?Pj(c,16):Pj(c,64))}}Ej(c);g=W(c);if(0===g)W(c);else if(1===g)for(Bj(c,1),Ej(c),Ej(c),g=W(c),h=0;h<g;h++)Ej(c);Ej(c);Bj(c,1);g=W(c);h=W(c);var k=Cj(c,1);0===k&&Bj(c,1);Bj(c,
|
|
377
|
+
1);var l=0,m=0,n=0,p=0;Nj(c)&&(l=W(c),m=W(c),n=W(c),p=W(c));b.height=String((2-k)*(h+1)*16-2*n-2*p);b.width=String(16*(g+1)-2*l-2*m);b.codec="avc1."+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2)+("0"+f.toString(16).toUpperCase()).slice(-2);b.frameRate=Xj(a);return b}
|
|
378
|
+
function Vj(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Md();if(!c.length)return b;c=c.find(function(B){return 33==B.type});if(!c)return b;var d=new zj(c.fullData,!0);Oj(d);Oj(d);Cj(d,4);var e=Cj(d,3);Nj(d);var f=Cj(d,2),g=Cj(d,1),h=Cj(d,5),k=Cj(d,32);c=Oj(d);for(var l=Oj(d),m=Oj(d),n=Oj(d),p=Oj(d),r=Oj(d),u=Oj(d),v=[],w=[],y=0;y<e;y++)v.push(Nj(d)),w.push(Nj(d));if(0<e)for(y=e;8>y;y++)Cj(d,2);for(y=0;y<e;y++)v[y]&&Cj(d,88),w[y]&&Oj(d);W(d);e=W(d);3==e&&Cj(d,1);v=W(d);w=W(d);var z=
|
|
379
|
+
y=0,D=0,A=0;Nj(d)&&(y+=W(d),z+=W(d),D+=W(d),A+=W(d));b.width=String(v-(y+z)*(1===e||2===e?2:1));b.height=String(w-(D+A)*(1===e?2:1));d=function(B){for(var C=0,E=0;32>E;E++)C|=(B>>E&1)<<31-E;return C>>>0}(k);g=1==g?"H":"L";f="hvc1"+("."+["","A","B","C"][f]+h);f+="."+d.toString(16).toUpperCase();f+="."+g+u;r&&(f+="."+r.toString(16).toUpperCase());p&&(f+="."+p.toString(16).toUpperCase());n&&(f+="."+n.toString(16).toUpperCase());m&&(f+="."+m.toString(16).toUpperCase());l&&(f+="."+l.toString(16).toUpperCase());
|
|
380
|
+
c&&(f+="."+c.toString(16).toUpperCase());b.codec=f;b.frameRate=Xj(a);return b}function Uj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Zj(a){return 0>Sj(a)?!1:!0}function Sj(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}S("shaka.util.TsParser",Rj);Rj.syncOffset=Sj;Rj.probe=Zj;Rj.prototype.getVideoInfo=Rj.prototype.kf;Rj.prototype.getVideoResolution=Rj.prototype.fi;
|
|
381
|
+
Rj.prototype.getVideoNalus=Rj.prototype.Md;Rj.prototype.getCodecs=Rj.prototype.ad;Rj.prototype.getStartTime=Rj.prototype.getStartTime;Rj.prototype.getVideoData=Rj.prototype.oc;Rj.prototype.getAudioData=Rj.prototype.Vb;Rj.prototype.getMetadata=Rj.prototype.getMetadata;Rj.prototype.parseNalus=Rj.prototype.Df;Rj.prototype.parseAvcNalus=Rj.prototype.Bi;Rj.prototype.parse=Rj.prototype.parse;Rj.prototype.clearData=Rj.prototype.clearData;Rj.Timescale=9E4;
|
|
382
382
|
var Yj=[100,110,122,244,44,83,86,118,128,138,139,134];function ak(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&$a("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,rb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{$a("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?($a("Could not find LCEVC Library on this page"),
|
|
383
383
|
a=!1):(this.h.SupportObject.SupportStatus||$a(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function bk(a){a.g&&a.i.classList.add("shaka-hidden")}
|
|
384
|
-
ak.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function ck(a,b,c){var d=0,e=-1;switch(b.mimeType){case "video/webm":d=1;break;case "video/mp4":d=2}switch(c){case "DASH":e=1;break;case "HLS":e=0}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}S("shaka.lcevc.Dec",ak);ak.prototype.release=ak.prototype.release;function dk(a,b,c,d){var e=this;this.
|
|
385
|
-
function ek(a,b){if(window.ManagedMediaSource){a.
|
|
384
|
+
ak.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function ck(a,b,c){var d=0,e=-1;switch(b.mimeType){case "video/webm":d=1;break;case "video/mp4":d=2}switch(c){case "DASH":e=1;break;case "HLS":e=0}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}S("shaka.lcevc.Dec",ak);ak.prototype.release=ak.prototype.release;function dk(a,b,c,d){var e=this;this.j=a;this.X=c;this.A=null;this.aa=b;this.h={};this.F={};this.Ea={};this.g=null;this.ea=!1;this.O=d||null;this.l={};this.s=new gb;this.i={};this.G=null;this.K=new ah;this.ta="";this.Fa=!1;this.m=ek(this,this.K);this.C=!1;this.H=new Ch(function(){return fk(e)});this.B=!1;this.R="UNKNOWN";this.za=this.Da=!1;this.sa=new ah;this.o=!1;this.oa=!0;this.ga=this.L=this.ka=this.N=this.I=this.ba=null;this.fa=new ah}
|
|
385
|
+
function ek(a,b){if(window.ManagedMediaSource){a.j.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.D(c,"startstreaming",function(){a.oa=!0});a.s.D(c,"endstreaming",function(){a.oa=!1})}else c=new MediaSource;a.s.ra(c,"sourceopen",function(){URL.revokeObjectURL(a.ta);b.resolve()});a.s.ra(a.j,"playing",function(){a.Fa=!0});a.ta=gk(c);a.j.src=a.ta;return c}
|
|
386
386
|
function hk(a,b){var c,d,e,f,g,h,k,l,m,n,p;return P(function(r){if(1==r.g)return a.createSegmentIndex?G(r,a.createSegmentIndex(),2):r.u(2);if(!a.segmentIndex)return r.return(!1);if(0==a.segmentIndex.getNumReferences())return r.return(!0);c=Ye;d=new Set;e=t(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",l=h+":"+k,!d.has(l))if(d.add(l),b==c.wa){if(m=af(h,k),!pf(m))return r.return(!1)}else if(b==c.ja?k=ag(k):b==c.Y&&(k=bg(k,h)),n=
|
|
387
387
|
ef(a,h,k),p=cf(h,k),!mb(n)&&!ke(p))return r.return(!1);return r.return(!0)})}q=dk.prototype;q.destroy=function(){return this.H.destroy()};
|
|
388
|
-
function fk(a){var b,c,d,e,f,g,h,k;return P(function(l){if(1==l.g){b=[];for(c in a.l)for(d=a.l[c],e=d[0],a.l[c]=d.slice(0,1),e&&b.push(e.p.catch(yf)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new T(2,7,7003,void 0));a.g&&b.push(a.g.destroy());for(k in a.
|
|
389
|
-
a.
|
|
388
|
+
function fk(a){var b,c,d,e,f,g,h,k;return P(function(l){if(1==l.g){b=[];for(c in a.l)for(d=a.l[c],e=d[0],a.l[c]=d.slice(0,1),e&&b.push(e.p.catch(yf)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new T(2,7,7003,void 0));a.g&&b.push(a.g.destroy());for(k in a.i)b.push(a.i[k].destroy());return G(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.A=null;a.m=null;a.g=null;a.aa=null;a.h={};a.i={};a.G=null;a.l={};a.O=null;a.I=null;
|
|
389
|
+
a.X=null;H(l)})}q.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return P(function(m){switch(m.g){case 1:return f=Ye,G(m,e.K,2);case 2:e.B=b,e.R=c,e.Da=d,e.za=!e.B&&"HLS"==e.R&&!e.Da,e.I=null,g=t(a.keys()),h=g.next();case 3:if(h.done){m.u(0);break}k=h.value;l=a.get(k);return G(m,ik(e,k,l,l.codecs),6);case 6:e.o?(e.l[f.Y]=[],e.l[f.ja]=[]):e.l[k]=[],h=g.next(),m.u(3)}})};
|
|
390
390
|
function ik(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v;return P(function(w){switch(w.g){case 1:return e=Ye,f=Ra,g=Ta,G(w,hk(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=af(c.mimeType,d);if(b==e.wa){jk(a,h,a.B,c.external);w.u(0);break}k=a.A.forceTransmux;if(!mb(h)||!a.B&&bf.includes(h))k=!0;l=cf(c.mimeType,d);if(!k){w.u(4);break}m=Ue(e.Y,(d||"").split(","));n=Ue(e.ja,(d||"").split(","));if(!m||!n){w.u(5);break}a.o=!0;return G(w,ik(a,e.Y,c,m),6);case 6:return G(w,
|
|
391
|
-
ik(a,e.ja,c,n),7);case 7:return w.return();case 5:if(p=ke(l))r=p(),a.
|
|
391
|
+
ik(a,e.ja,c,n),7);case 7:return w.return();case 5:if(p=ke(l))r=p(),a.i[b]=r,h=r.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);Dh(a.H);try{v=a.m.addSourceBuffer(u)}catch(y){throw new T(2,3,3015,y,"The mediaSource_ status was "+a.m.readyState+" expected 'open'",null);}a.B&&(v.mode=kk);a.s.D(v,"error",function(){var y=a.l[b][0];y.p.reject(new T(2,3,3014,a.j.error?a.j.error.code:0,y.uri))});a.s.D(v,"updateend",function(){return lk(a,b)});a.h[b]=v;a.F[b]=h;a.Ea[b]=!!c.drmInfos.length;
|
|
392
392
|
H(w)}})}q.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
|
|
393
|
-
function jk(a,b,c,d){a.g||(a.g=new of(a.
|
|
393
|
+
function jk(a,b,c,d){a.g||(a.g=new of(a.aa),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.ea;a=a.R;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,qf[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):rb("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):rb("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.B=d)}
|
|
394
394
|
function mk(a){return a.C?!1:a.m?"ended"==a.m.readyState:!0}function nk(a,b){a.C||!Object.keys(a.h).length?a=null:b==We?a=a.g.g:(a=ok(a,b),a=!a||dj(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null);return a}function pk(a,b){return a.C?null:b==We?a.g.h:ej(ok(a,b))}function qk(a,b,c){if(a.C)return 0;if(b==We)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=ok(a,b);return gj(a,c)}
|
|
395
|
-
q.xb=function(){var a={total:this.C?[]:hj(this.
|
|
396
|
-
function rk(a,b,c,d,e,f){var g=null,h=Ab(c);if(bf.includes(e))f=oj(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.
|
|
397
|
-
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else if(!e.includes("/mp4")&&!e.includes("/webm")&&Zj(h)&&(a.I?a.I.clearData():a.I=new Rj,h=a.I.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length))a.
|
|
398
|
-
function sk(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,p,r,u,v,w,y,z,D,A,B,C,E;return P(function(F){switch(F.g){case 1:m=Ye;if(b!=m.wa){F.u(2);break}if(!a.B){F.u(3);break}return G(F,a.
|
|
399
|
-
case 6:if(!a.h[b])return F.return();p=a.h[b].timestampOffset;r=a.F[b];a.
|
|
400
|
-
D=b==m.ja||!(m.ja in a.h),a.B&&D&&a.
|
|
401
|
-
a.
|
|
395
|
+
q.xb=function(){var a={total:this.C?[]:hj(this.j.buffered),audio:this.C?[]:hj(ok(this,"audio")),video:this.C?[]:hj(ok(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 ok(a,b){try{return a.h[b].buffered}catch(c){return null}}
|
|
396
|
+
function rk(a,b,c,d,e,f){var g=null,h=Ab(c);if(bf.includes(e))f=oj(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.X.onMetadata([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.Z&&d.Z.timescale){var k=d.Z.timescale;if(!isNaN(k)){var l=0,m=!1;(new Lh).box("moof",Qh).box("traf",Qh).S("tfdt",function(n){l=rj(n.reader,
|
|
397
|
+
n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else if(!e.includes("/mp4")&&!e.includes("/webm")&&Zj(h)&&(a.I?a.I.clearData():a.I=new Rj,h=a.I.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length))a.X.onMetadata(h,f,d?d.endTime:null);return g}
|
|
398
|
+
function sk(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,p,r,u,v,w,y,z,D,A,B,C,E;return P(function(F){switch(F.g){case 1:m=Ye;if(b!=m.wa){F.u(2);break}if(!a.B){F.u(3);break}return G(F,a.sa,4);case 4:n=F.h,a.g.s=n;case 3:return G(F,rf(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.M()[0]:null),5);case 5:return F.return();case 2:if(l||!a.o){F.u(6);break}return G(F,sk(a,m.Y,c,d,e,f,g,h,k,!0),7);case 7:return G(F,sk(a,m.ja,c,d,e,f,g,h,k,!0),8);case 8:return F.return();
|
|
399
|
+
case 6:if(!a.h[b])return F.return();p=a.h[b].timestampOffset;r=a.F[b];a.i[b]&&(r=a.i[b].getOriginalMimeType());d&&(u=rk(a,b,c,d,r,p),null!=u&&(null==a.N&&b==m.ja&&(a.N=u,a.ka=d.startTime,null!=a.L&&(v=0,a.ka==a.ga&&(v=a.N-a.L),a.fa.resolve(v))),null==a.L&&b==m.Y&&(a.L=u,a.ga=d.startTime,null!=a.N&&(w=0,a.ka==a.ga&&(w=a.N-a.L),a.fa.resolve(w))),y=d.startTime-u,z=Math.abs(p-y),(.001<=z||g||h)&&(!k||0<y||!p)&&(p=y,a.za&&(tk(a,b,function(){return uk(a,b)},null),tk(a,b,function(){return vk(a,b,p)},null))),
|
|
400
|
+
D=b==m.ja||!(m.ja in a.h),a.B&&D&&a.sa.resolve(p)));f&&b==m.ja&&(a.g||jk(a,"application/cea-608",a.B,!1),a.G||(A=r.split(";",1)[0],a.G=new Hb(A)),d?(B=a.G.i(c),B.length&&wf(a.g,B,d.startTime,d.endTime,p)):a.G.init(c,h));if(!a.i[b]){F.u(9);break}return G(F,a.i[b].transmux(c,e,d,a.m.duration,b),10);case 10:c=F.h;case 9:c=wk(a,c,d?d.startTime:null,b,d?d.M()[0]:null);if(!d||!a.B||b==m.wa){F.u(11);break}if(!g&&!h){F.u(11);break}C=d.startTime;if("HLS"!=a.R||a.o||b!=m.Y||!a.h[m.ja]){F.u(13);break}return G(F,
|
|
401
|
+
a.fa,14);case 14:E=F.h,.1<Math.abs(E)&&(C-=E);case 13:tk(a,b,function(){return uk(a,b)},null),tk(a,b,function(){return vk(a,b,C)},null);case 11:return G(F,tk(a,b,function(){var J=c;if("video"==b&&a.O){var K=a.O;K.g&&K.g.appendBuffer(J,"video",K.o,-p)}a.h[b].appendBuffer(J)},d?d.M()[0]:null),15);case 15:H(F)}})}function xk(a,b){var c=pk(a,"video")||0;tf(a.g,b,c)}function yk(a){a.g&&tf(a.g,"",0)}
|
|
402
402
|
q.remove=function(a,b,c){var d=this,e;return P(function(f){return 1==f.g?(e=Ye,a==e.wa?G(f,d.g.remove(b,c),0):G(f,tk(d,a,function(){return zk(d,a,b,c)},null),4)):d.o?G(f,tk(d,e.Y,function(){return zk(d,e.Y,b,c)},null),0):f.u(0)})};function Ak(a,b){var c;return P(function(d){return 1==d.g?(c=Ye,b==c.wa?a.g?G(d,a.g.remove(0,Infinity),0):d.return():G(d,tk(a,b,function(){return zk(a,b,0,a.m.duration)},null),4)):a.o?G(d,tk(a,c.Y,function(){return zk(a,c.Y,0,a.m.duration)},null),0):d.u(0)})}
|
|
403
|
-
q.flush=function(a){var b=this,c;return P(function(d){return 1==d.g?(c=Ye,a==c.wa?d.return():G(d,tk(b,a,function(){b.
|
|
403
|
+
q.flush=function(a){var b=this,c;return P(function(d){return 1==d.g?(c=Ye,a==c.wa?d.return():G(d,tk(b,a,function(){b.j.currentTime-=.001;lk(b,a)},null),2)):b.o?G(d,tk(b,c.Y,function(){var e=c.Y;b.j.currentTime-=.001;lk(b,e)},null),0):d.u(0)})};
|
|
404
404
|
function Bk(a,b,c,d,e,f,g,h,k){var l,m,n;return P(function(p){if(1==p.g){l=Ye;if(b==l.wa)return f||(a.g.s=c),sf(a.g,d,e),p.return();m=[];return G(p,Ck(a,b,g,h,k),2)}n=p.h;n||(m.push(tk(a,b,function(){return uk(a,b)},null)),a.o&&m.push(tk(a,l.Y,function(){return uk(a,l.Y)},null)));f||(m.push(tk(a,b,function(){return vk(a,b,c)},null)),a.o&&m.push(tk(a,l.Y,function(){return vk(a,l.Y,c)},null)));m.push(tk(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;lk(a,
|
|
405
405
|
b)},null));a.o&&m.push(tk(a,l.Y,function(){var r=l.Y;a.h[r].appendWindowStart=0;a.h[r].appendWindowEnd=e;a.h[r].appendWindowStart=d;lk(a,r)},null));return G(p,Promise.all(m),0)})}
|
|
406
|
-
function Dk(a,b,c){var d;return P(function(e){if(1==e.g){d=Ye;if(b==d.wa)return e.return();b==d.ja&&(a.
|
|
407
|
-
q.Za=function(a){var b=this;return P(function(c){return G(c,Ek(b,function(){if(a<b.m.duration)for(var d in b.h){var e={start:function(){},p:new ah,uri:null};b.l[d].unshift(e)}b.m.duration=a;b.
|
|
406
|
+
function Dk(a,b,c){var d;return P(function(e){if(1==e.g){d=Ye;if(b==d.wa)return e.return();b==d.ja&&(a.sa=new ah);tk(a,b,function(){return uk(a,b)},null);a.o&&tk(a,d.Y,function(){return uk(a,d.Y)},null);return G(e,tk(a,b,function(){return vk(a,b,c)},null),2)}return a.o?G(e,tk(a,d.Y,function(){return vk(a,d.Y,c)},null),0):e.u(0)})}q.endOfStream=function(a){var b=this;return P(function(c){return G(c,Ek(b,function(){mk(b)||"closed"===b.m.readyState||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};
|
|
407
|
+
q.Za=function(a){var b=this;return P(function(c){return G(c,Ek(b,function(){if(a<b.m.duration)for(var d in b.h){var e={start:function(){},p:new ah,uri:null};b.l[d].unshift(e)}b.m.duration=a;b.ba=a}),0)})};q.getDuration=function(){return this.m.duration};function zk(a,b,c,d){d<=c?lk(a,b):a.h[b].remove(c,d)}function uk(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;lk(a,b)}
|
|
408
408
|
function vk(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;lk(a,b)}function lk(a,b){if(!a.C){var c=a.l[b][0];c&&(c.p.resolve(),Fk(a,b))}}function tk(a,b,c,d){Dh(a.H);c={start:c,p:new ah,uri:d};a.l[b].push(c);1==a.l[b].length&&Gk(a,b);return c.p}
|
|
409
|
-
function Ek(a,b){var c,d,e,f,g,h,k;return P(function(l){switch(l.g){case 1:Dh(a.H);c=[];d={};for(e in a.h)d={ready:void 0},d.ready=new ah,f={start:function(m){return function(){return m.ready.resolve()}}(d),p:d.ready,uri:null},a.l[e].push(f),c.push(d.ready),1==a.l[e].length&&f.start();va(l,2);return G(l,Promise.all(c),4);case 4:xa(l,3);break;case 2:throw g=ya(l),g;case 3:return va(l,5,6),G(l,b(),6);case 6:
|
|
410
|
-
null);}})}function Fk(a,b){a.l[b].shift();Gk(a,b)}function Gk(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new T(2,3,3017,b)):c.p.reject(new T(2,3,3015,d,a.
|
|
411
|
-
function Hk(a,b,c,d){return tk(a,b,function(){b!==We&&(pb()&&(a.
|
|
412
|
-
function Ik(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,D,A,B,C,E,F,J;return P(function(K){switch(K.g){case 1:c=Ye;a.C=!0;a.o=!1;d=a.
|
|
413
|
-
Promise.all(g),4);case 4:return a.
|
|
414
|
-
K.u(6);break;case 2:
|
|
415
|
-
function Ck(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,y,z,D;return P(function(A){if(1==A.g){f=Ye;if(b==f.wa)return A.return(!1);g=hf(mf(a.F[b]));h=lf(a.F[b]);l=!1;m=af(c,d);n=a.A.forceTransmux;if(!mb(m)||!a.B&&bf.includes(m))n=!0;n&&(p=cf(c,d),r=ke(p))&&(k=r(),u=Ue(f.Y,(d||"").split(",")),v=Ue(f.ja,(d||"").split(",")),u&&v?(l=!0,w=v,b==f.Y&&(w=u),m=k.convertCodecs(b,cf(c,w))):m=k.convertCodecs(b,p));y=hf(mf(m));z=lf(m);if(g===y&&h===z)return a.
|
|
416
|
-
k:k&&(a.
|
|
417
|
-
function Kk(a,b,c,d){if(b==We)var e=!1;else{e=hf(mf(a.F[b]));var f=lf(a.F[b]),g=af(c,d),h=a.A.forceTransmux;if(!mb(g)||!a.B&&bf.includes(g))h=!0;c=cf(c,d);h&&(h=ke(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=hf(mf(g));g=lf(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!pb()||a.o:!1}var gk=window.URL.createObjectURL,kk="sequence";function Lk(a,b,c){this.i=a;this.C=b;this.o=this.l=Infinity;this.h=1;this.g=this.j=null;this.A=0;this.B=!0;this.I=!1;this.H=0;this.F=void 0===c?!0:c;this.G=0;this.s=!1;this.m=a}q=Lk.prototype;q.getDuration=function(){return this.l};q.
|
|
409
|
+
function Ek(a,b){var c,d,e,f,g,h,k;return P(function(l){switch(l.g){case 1:Dh(a.H);c=[];d={};for(e in a.h)d={ready:void 0},d.ready=new ah,f={start:function(m){return function(){return m.ready.resolve()}}(d),p:d.ready,uri:null},a.l[e].push(f),c.push(d.ready),1==a.l[e].length&&f.start();va(l,2);return G(l,Promise.all(c),4);case 4:xa(l,3);break;case 2:throw g=ya(l),g;case 3:return va(l,5,6),G(l,b(),6);case 6:za(l);for(h in a.h)Fk(a,h);Ba(l,0);break;case 5:throw k=ya(l),new T(2,3,3015,k,a.j.error||"No error in the media element",
|
|
410
|
+
null);}})}function Fk(a,b){a.l[b].shift();Gk(a,b)}function Gk(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new T(2,3,3017,b)):c.p.reject(new T(2,3,3015,d,a.j.error||"No error in the media element",c.uri)),Fk(a,b)}}function wk(a,b,c,d,e){var f=null==c,g=a.Ea[d];c=a.X.Ph();if(f=a.A.insertFakeEncryptionInInit&&f&&g)c=Vb(c),f=hc()||fc()||pc()||ec()&&vc()&&c;f&&"mp4"==gf(a.F[d])&&(b=Si(b,e));return b}
|
|
411
|
+
function Hk(a,b,c,d){return tk(a,b,function(){b!==We&&(pb()&&(a.i[b]&&(a.i[b].destroy(),delete a.i[b]),d&&(a.i[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.F[b]=c),lk(a,b))},null)}
|
|
412
|
+
function Ik(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,D,A,B,C,E,F,J;return P(function(K){switch(K.g){case 1:c=Ye;a.C=!0;a.o=!1;d=a.j.currentTime;e=a.j.autoplay;f=a.j.paused;a.Fa&&(a.j.autoplay=!1);wa(K,2);a.s.Qa();g=[];for(h in a.i)g.push(a.i[h].destroy());for(k in a.l)for(l=a.l[k],m=l[0],a.l[k]=l.slice(0,1),m&&g.push(m.p.catch(yf)),n=t(l.slice(1)),p=n.next();!p.done;p=n.next())r=p.value,r.p.reject(new T(2,7,7003,void 0));for(u in a.h){v=a.h[u];try{a.m.removeSourceBuffer(v)}catch(L){}}return G(K,
|
|
413
|
+
Promise.all(g),4);case 4:return a.i={},a.h={},w=a.m.duration,a.K=new ah,a.m=ek(a,a.K),G(K,a.K,5);case 5:!isNaN(w)&&w?a.m.duration=w:!isNaN(a.ba)&&a.ba&&(a.m.duration=a.ba),y=new ah,z=a.m.sourceBuffers,D=b.size,A=0,B=function(){A++;A===D&&(y.resolve(),a.s.$a(z,"addsourcebuffer",B))},a.s.D(z,"addsourcebuffer",B),C=t(b.keys()),E=C.next();case 6:if(E.done)return a.j.currentTime=d,G(K,y,2);F=E.value;J=b.get(F);return G(K,ik(a,F,J,J.codecs),9);case 9:a.o?(a.l[c.Y]=[],a.l[c.ja]=[]):a.l[F]=[];E=C.next();
|
|
414
|
+
K.u(6);break;case 2:za(K),a.C=!1,Dh(a.H),a.s.ra(a.j,"canplaythrough",function(){a.H.g||(a.j.autoplay=e,f||a.j.play())}),Ba(K,0)}})}function Jk(a,b){return Ek(a,function(){return Ik(a,b)})}
|
|
415
|
+
function Ck(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,y,z,D;return P(function(A){if(1==A.g){f=Ye;if(b==f.wa)return A.return(!1);g=hf(mf(a.F[b]));h=lf(a.F[b]);l=!1;m=af(c,d);n=a.A.forceTransmux;if(!mb(m)||!a.B&&bf.includes(m))n=!0;n&&(p=cf(c,d),r=ke(p))&&(k=r(),u=Ue(f.Y,(d||"").split(",")),v=Ue(f.ja,(d||"").split(",")),u&&v?(l=!0,w=v,b==f.Y&&(w=u),m=k.convertCodecs(b,cf(c,w))):m=k.convertCodecs(b,p));y=hf(mf(m));z=lf(m);if(g===y&&h===z)return a.i[b]&&!k?(a.i[b].destroy(),delete a.i[b]):!a.i[b]&&k?a.i[b]=
|
|
416
|
+
k:k&&(a.i[b]&&a.i[b].transmux!=k.transmux?(a.i[b].destroy(),delete a.i[b],a.i[b]=k):k.destroy()),A.return(!1);D=!0;if(a.o||l&&k&&!a.i[b])D=!1;if(D&&"smooth"===a.A.codecSwitchingStrategy&&pb())return G(A,Hk(a,b,m,k),3);k&&k.destroy();return G(A,Jk(a,e),3)}return A.return(!0)})}
|
|
417
|
+
function Kk(a,b,c,d){if(b==We)var e=!1;else{e=hf(mf(a.F[b]));var f=lf(a.F[b]),g=af(c,d),h=a.A.forceTransmux;if(!mb(g)||!a.B&&bf.includes(g))h=!0;c=cf(c,d);h&&(h=ke(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=hf(mf(g));g=lf(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!pb()||a.o:!1}var gk=window.URL.createObjectURL,kk="sequence";function Lk(a,b,c){this.i=a;this.C=b;this.o=this.l=Infinity;this.h=1;this.g=this.j=null;this.A=0;this.B=!0;this.I=!1;this.H=0;this.F=void 0===c?!0:c;this.G=0;this.s=!1;this.m=a}q=Lk.prototype;q.getDuration=function(){return this.l};q.Rh=function(){return this.h};q.$g=function(a){this.i=a};q.Za=function(a){this.l=a};q.Wh=function(){return this.i};q.Yg=function(a){this.A=a};q.wc=function(a){a&&!this.B&&(this.I=!0);this.B=a};q.ne=function(a){this.o=a};q.Ld=function(){return this.o};
|
|
418
418
|
q.Of=function(a){this.C=a};q.Jh=function(){return this.C};q.Lg=function(a,b){if(0!=a.length){var c=(Date.now()+this.A)/1E3;a=a.filter(function(e){return e.start+b<c});if(0!=a.length){var d=a[a.length-1].end+b;this.Zd(a[0].start+b);this.h=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.h);this.g=Math.max(this.g,d);null!=this.i&&this.F&&!this.s&&(this.i=c-this.g-this.h)}}};
|
|
419
|
-
q.rd=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.h=Math.max(this.h,e.endTime-e.startTime));this.Zd(b);this.g=Math.max(this.g,c);null!=this.i&&this.F&&!this.s&&(this.i=d-this.g-this.h)}};q.Kg=function(a,b){this.Zd(a);Infinity==b||this.U()||(this.g=Math.max(this.g,b))};q.
|
|
420
|
-
q.
|
|
419
|
+
q.rd=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.h=Math.max(this.h,e.endTime-e.startTime));this.Zd(b);this.g=Math.max(this.g,c);null!=this.i&&this.F&&!this.s&&(this.i=d-this.g-this.h)}};q.Kg=function(a,b){this.Zd(a);Infinity==b||this.U()||(this.g=Math.max(this.g,b))};q.Sh=function(){return this.g};q.Ud=function(){this.s=!0};
|
|
420
|
+
q.pi=function(){return this.s};q.Zg=function(a){this.m=a};q.Oh=function(){return this.m};q.Zd=function(a){null==this.j?this.j=a:this.I||(this.j=Math.min(this.j,a))};q.yf=function(a){this.h=Math.max(this.h,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.g&&(this.g+=a)};q.U=function(){return Infinity==this.l&&!this.B};q.qc=function(){return Infinity!=this.l&&!this.B};q.ob=function(){return Math.max(this.H,this.Xb()-this.o)};q.eh=function(a){this.H=a};
|
|
421
421
|
q.Xb=function(){return this.U()||this.qc()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.h-this.i)+this.G,this.l):this.g?Math.min(this.g,this.l):this.l};q.dd=function(a){var b=Math.max(this.j,this.H);return Infinity==this.o?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Xb()-this.o+a,this.zb()))};q.Jb=function(){return this.dd(0)};q.zb=function(){return Math.max(0,this.Xb()-(this.U()||this.qc()?this.C:0))};q.lh=function(){return null==this.i||null!=this.g&&this.F?!1:!0};
|
|
422
422
|
q.Xg=function(a){this.G=a};q.Hh=function(){return this.G};S("shaka.media.PresentationTimeline",Lk);Lk.prototype.getAvailabilityTimeOffset=Lk.prototype.Hh;Lk.prototype.setAvailabilityTimeOffset=Lk.prototype.Xg;Lk.prototype.usingPresentationStartTime=Lk.prototype.lh;Lk.prototype.getSeekRangeEnd=Lk.prototype.zb;Lk.prototype.getSeekRangeStart=Lk.prototype.Jb;Lk.prototype.getSafeSeekRangeStart=Lk.prototype.dd;Lk.prototype.getSegmentAvailabilityEnd=Lk.prototype.Xb;Lk.prototype.setUserSeekStart=Lk.prototype.eh;
|
|
423
|
-
Lk.prototype.getSegmentAvailabilityStart=Lk.prototype.ob;Lk.prototype.isInProgress=Lk.prototype.qc;Lk.prototype.isLive=Lk.prototype.U;Lk.prototype.offset=Lk.prototype.offset;Lk.prototype.notifyMaxSegmentDuration=Lk.prototype.yf;Lk.prototype.notifyMinSegmentStartTime=Lk.prototype.Zd;Lk.prototype.getInitialProgramDateTime=Lk.prototype.
|
|
424
|
-
Lk.prototype.getMaxSegmentEndTime=Lk.prototype.
|
|
425
|
-
Lk.prototype.getPresentationStartTime=Lk.prototype.
|
|
423
|
+
Lk.prototype.getSegmentAvailabilityStart=Lk.prototype.ob;Lk.prototype.isInProgress=Lk.prototype.qc;Lk.prototype.isLive=Lk.prototype.U;Lk.prototype.offset=Lk.prototype.offset;Lk.prototype.notifyMaxSegmentDuration=Lk.prototype.yf;Lk.prototype.notifyMinSegmentStartTime=Lk.prototype.Zd;Lk.prototype.getInitialProgramDateTime=Lk.prototype.Oh;Lk.prototype.setInitialProgramDateTime=Lk.prototype.Zg;Lk.prototype.isStartTimeLocked=Lk.prototype.pi;Lk.prototype.lockStartTime=Lk.prototype.Ud;
|
|
424
|
+
Lk.prototype.getMaxSegmentEndTime=Lk.prototype.Sh;Lk.prototype.notifyPeriodDuration=Lk.prototype.Kg;Lk.prototype.notifySegments=Lk.prototype.rd;Lk.prototype.notifyTimeRange=Lk.prototype.Lg;Lk.prototype.getDelay=Lk.prototype.Jh;Lk.prototype.setDelay=Lk.prototype.Of;Lk.prototype.getSegmentAvailabilityDuration=Lk.prototype.Ld;Lk.prototype.setSegmentAvailabilityDuration=Lk.prototype.ne;Lk.prototype.setStatic=Lk.prototype.wc;Lk.prototype.setClockOffset=Lk.prototype.Yg;
|
|
425
|
+
Lk.prototype.getPresentationStartTime=Lk.prototype.Wh;Lk.prototype.setDuration=Lk.prototype.Za;Lk.prototype.setPresentationStartTime=Lk.prototype.$g;Lk.prototype.getMaxSegmentDuration=Lk.prototype.Rh;Lk.prototype.getDuration=Lk.prototype.getDuration;function Mk(a,b,c){this.j=c;this.l=a;this.s=Nk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}Mk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function Ok(a,b){a.i=b}function Pk(a){this.g=a}function Nk(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(hj(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 Qk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.m=c;this.l=new gb;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.s=!1;this.l.D(a,"waiting",function(){return Rk(f)});this.o=(new Zb(function(){Rk(f)})).Ra(this.m.gapJumpTimerTime)}Qk.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.o&&(this.o.stop(),this.o=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.A=null};Qk.prototype.Bf=function(){this.s=!0;Rk(this)};
|
|
426
426
|
function Rk(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=Nk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new V("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=ij(c,b,a.m.gapDetectionThreshold),
|
|
427
|
-
null!=d&&(0!=d||a.s))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||fc()||hc())e=Math.ceil(100*(e+a.m.gapPadding))/100;e>=a.B.zb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new V("gapjumped")))}}}};function Sk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Tk.value().get(b),c.
|
|
428
|
-
function Yk(a,b){0<a.g.readyState?Zk(a.i,b):Sk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Wk(a,a.j())})}function Wk(a,b){.001>Math.abs(a.g.currentTime-b)?$k(a):(a.h.
|
|
429
|
-
function Vk(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Zb(function(){0>=b.i?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}Vk.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function Zk(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Ra(.1)};function al(a){this.h=a;this.j=!1;this.g=null;this.i=new gb}q=al.prototype;q.ready=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.
|
|
427
|
+
null!=d&&(0!=d||a.s))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||fc()||hc())e=Math.ceil(100*(e+a.m.gapPadding))/100;e>=a.B.zb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new V("gapjumped")))}}}};function Sk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Tk.value().get(b),c.ra(a,b,d))}var Tk=new Sb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Uk(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new gb;this.i=new Vk(a);Sk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Wk(e,e.j())})}Uk.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Xk(a){return a.o?a.g.currentTime:a.j()}
|
|
428
|
+
function Yk(a,b){0<a.g.readyState?Zk(a.i,b):Sk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Wk(a,a.j())})}function Wk(a,b){.001>Math.abs(a.g.currentTime-b)?$k(a):(a.h.ra(a.g,"seeking",function(){$k(a)}),Zk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function $k(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
|
|
429
|
+
function Vk(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Zb(function(){0>=b.i?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}Vk.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function Zk(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Ra(.1)};function al(a){this.h=a;this.j=!1;this.g=null;this.i=new gb}q=al.prototype;q.ready=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.ra(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;Sk(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};q.Ee=function(a){this.g=this.j?this.g:a};
|
|
430
430
|
q.xd=function(){return(this.j?this.h.currentTime:this.g)||0};q.dg=function(){return 0};q.cg=function(){return 0};q.Jg=function(){};
|
|
431
|
-
function bl(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.A=e;this.s=null;this.o=cl(a,c,f);this.j=new Qk(a,b.presentationTimeline,c,this.o,f);this.h=new Uk(a,function(){a:{var h=g.j;h.j=!0;h.s=!1;var k=Xk(g.h);h=dl(g,k);if(.001<Math.abs(h-k)){k=!1;if(!nc()||nc()&&wc())k=!0;else{var l=Date.now()/1E3;if(!g.s||g.s<l-
|
|
432
|
-
function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Jb():g.g.zb():0>h&&(h=g.g.zb()+h);return el(g,fl(g,h))});this.m=new Zb(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Xk(g.h),k=g.g.Jb(),l=g.g.zb();3>l-k&&(k=l-3);h<k&&(h=dl(g,h),g.i.currentTime=h)}})}q=bl.prototype;q.ready=function(){this.m.Ra(.25)};
|
|
433
|
-
q.Ee=function(a){Yk(this.h,a)};q.xd=function(){var a=Xk(this.h);return 0<this.i.readyState&&!this.i.paused?fl(this,a):a};q.dg=function(){return this.o?this.o.o:0};q.cg=function(){return this.j.C};q.Jg=function(){this.j.Bf()};function el(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
431
|
+
function bl(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.A=e;this.s=null;this.o=cl(a,c,f);this.j=new Qk(a,b.presentationTimeline,c,this.o,f);this.h=new Uk(a,function(){a:{var h=g.j;h.j=!0;h.s=!1;var k=Xk(g.h);h=dl(g,k);if(.001<Math.abs(h-k)){k=!1;if(!nc()||nc()&&wc())k=!0;else{var l=Date.now()/1E3,m=nc()&&gc("Fuchsia")?3:1;if(!g.s||g.s<l-m)g.s=l,k=!0}if(k){Yk(g.h,h);h=void 0;break a}}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&
|
|
432
|
+
!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Jb():g.g.zb():0>h&&(h=g.g.zb()+h);return el(g,fl(g,h))});this.m=new Zb(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Xk(g.h),k=g.g.Jb(),l=g.g.zb();3>l-k&&(k=l-3);h<k&&(h=dl(g,h),g.i.currentTime=h)}})}q=bl.prototype;q.ready=function(){this.m.Ra(.25)};
|
|
433
|
+
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.A=function(){}};q.Ee=function(a){Yk(this.h,a)};q.xd=function(){var a=Xk(this.h);return 0<this.i.readyState&&!this.i.paused?fl(this,a):a};q.dg=function(){return this.o?this.o.o:0};q.cg=function(){return this.j.C};q.Jg=function(){this.j.Bf()};function el(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
|
|
434
434
|
function dl(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Jb(),f=a.g.zb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.dd(c),k=a.g.dd(d);c=a.g.dd(c+d);return b>=g?el(a,b):b>f?f:b<e?fj(a.i.buffered,k)?k:c:b>=h||fj(a.i.buffered,b)?b:c}function fl(a,b){var c=a.g.Jb();if(b<c)return c;a=a.g.zb();return b>a?a:b}
|
|
435
|
-
function cl(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Mk(new Pk(a),b.stallThreshold,c);Ok(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function gl(a){this.g=a;this.m=null;this.i=0;this.o=!1}q=gl.prototype;q.getNumReferences=function(){return this.g.length};q.getNumEvicted=function(){return this.i};q.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};q.
|
|
435
|
+
function cl(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Mk(new Pk(a),b.stallThreshold,c);Ok(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function gl(a){this.g=a;this.m=null;this.i=0;this.o=!1}q=gl.prototype;q.getNumReferences=function(){return this.g.length};q.getNumEvicted=function(){return this.i};q.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};q.wi=function(){this.o=!0};q.Gb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function ng(a){return a.g[0]||null}
|
|
436
436
|
q.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};q.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
|
|
437
437
|
q.Wd=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,x(a))}};q.pd=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Wd(a);this.Ga(b)};q.Ga=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
|
|
438
438
|
q.Fc=function(a,b,c){c=void 0===c?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new Yi(a.startTime,b,a.F,a.Ha,a.va,a.Z,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.B,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}};
|
|
439
439
|
q.re=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new Zb(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.Ra(a))};gl.prototype[Symbol.iterator]=function(){return this.Ib(0)};
|
|
440
440
|
gl.prototype.Ib=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return Za("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new hl(this,d,f,c)};function il(a,b,c){a=new Yi(a,a+b,function(){return c},0,null,null,a,a,a+b);return new gl([a])}
|
|
441
|
-
S("shaka.media.SegmentIndex",gl);gl.forSingleSegment=il;gl.prototype.getIteratorForTime=gl.prototype.Ib;gl.prototype.updateEvery=gl.prototype.re;gl.prototype.fit=gl.prototype.Fc;gl.prototype.evict=gl.prototype.Ga;gl.prototype.mergeAndEvict=gl.prototype.pd;gl.prototype.offset=gl.prototype.offset;gl.prototype.get=gl.prototype.get;gl.prototype.find=gl.prototype.find;gl.prototype.markImmutable=gl.prototype.
|
|
441
|
+
S("shaka.media.SegmentIndex",gl);gl.forSingleSegment=il;gl.prototype.getIteratorForTime=gl.prototype.Ib;gl.prototype.updateEvery=gl.prototype.re;gl.prototype.fit=gl.prototype.Fc;gl.prototype.evict=gl.prototype.Ga;gl.prototype.mergeAndEvict=gl.prototype.pd;gl.prototype.offset=gl.prototype.offset;gl.prototype.get=gl.prototype.get;gl.prototype.find=gl.prototype.find;gl.prototype.markImmutable=gl.prototype.wi;gl.prototype.release=gl.prototype.release;gl.prototype.getNumEvicted=gl.prototype.getNumEvicted;
|
|
442
442
|
gl.prototype.getNumReferences=gl.prototype.getNumReferences;function hl(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}hl.prototype.Uc=function(a){this.reverse=a};hl.prototype.Ch=function(){return this.h};hl.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.o&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
|
|
443
443
|
hl.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};S("shaka.media.SegmentIterator",hl);hl.prototype.next=hl.prototype.next;hl.prototype.current=hl.prototype.current;hl.prototype.currentPosition=hl.prototype.Ch;
|
|
444
|
-
hl.prototype.setReverse=hl.prototype.Uc;function jl(){gl.call(this,[]);this.h=[]}
|
|
444
|
+
hl.prototype.setReverse=hl.prototype.Uc;function jl(){gl.call(this,[]);this.h=[]}pa(jl,gl);q=jl.prototype;q.clone=function(){var a=new jl;a.h=this.h.slice();a.i=this.i;return a};q.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};q.Gb=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Gb(a)};
|
|
445
445
|
q.find=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};q.get=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};q.offset=function(){};q.Wd=function(){};
|
|
446
446
|
q.Ga=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Ga(a);for(;1<this.h.length&&0==this.h[0].getNumReferences();)a=this.h.shift(),this.i+=a.getNumEvicted(),a.release()};q.pd=function(){};q.Fc=function(){};q.re=function(){};S("shaka.media.MetaSegmentIndex",jl);jl.prototype.updateEvery=jl.prototype.re;jl.prototype.fit=jl.prototype.Fc;jl.prototype.mergeAndEvict=jl.prototype.pd;jl.prototype.evict=jl.prototype.Ga;jl.prototype.merge=jl.prototype.Wd;jl.prototype.offset=jl.prototype.offset;
|
|
447
447
|
jl.prototype.get=jl.prototype.get;jl.prototype.find=jl.prototype.find;jl.prototype.forEachTopLevelReference=jl.prototype.Gb;jl.prototype.release=jl.prototype.release;function kl(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Kd();this.h=new Zb(function(){b.g.Ig(.25*b.i)})}kl.prototype.release=function(){this.set(this.mc());this.h&&(this.h.stop(),this.h=null);this.g=null};kl.prototype.set=function(a){this.i=a;ll(this)};kl.prototype.mc=function(){return this.g.mc()};function ll(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Kd()!=b&&a.g.Rf(b);return}catch(c){}a.h.Ra(.25);0!=a.g.Kd()&&a.g.Rf(0)};function ml(a){var b=this;this.h=a;this.g=new Set;this.i=(new Zb(function(){nl(b,!1)})).Ra(.25)}ml.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function nl(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function ol(){this.g=null;this.h=[]}function pl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function ql(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function rl(){this.i=this.h=null;this.g=[]}function sl(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 tl(){this.ic=this.Eg=this.A=this.B=this.I=this.C=this.s=this.j=this.H=this.m=this.i=this.R=this.X=this.L=this.N=this.O=this.l=this.o=NaN;this.K=0;this.F=this.G=NaN;this.g=new ol;this.h=new rl};function ul(a,b,c,d){this.m=a;this.i=b;this.l=c;this.h=new Map;this.j=new Map;this.g=null;this.o=d}function vl(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}function wl(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.Ib(b,!0,a.o)),a.g)){for(c&&a.g.next();a.h.size<a.m;){b=a.g.next().value;if(!b)break;c=!0;b.isPreload()&&null!=b.va&&(c=!1);2==b.Zb()&&(c=!1);c&&b.Z&&xl(a,b.Z);c&&!a.h.has(b)&&(c=new yl(a.l),zl(c,b,a.i),a.h.set(b,c))}Al(a)}}
|
|
448
448
|
function xl(a,b){if(a.i.segmentIndex&&!Array.from(a.j.keys()).some(function(d){return Xi(d,b)})){var c=new yl(a.l);zl(c,b,a.i);a.j.set(b,c)}}function Bl(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&Cl(a,c)}function Dl(a){Bl(a,a.h);Bl(a,a.j);a.g=null}ul.prototype.Ga=function(a,b){b=void 0===b?!1:b;for(var c=t(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&Cl(this,d);b&&Al(this)};ul.prototype.Uc=function(a){this.o=a;this.g&&this.g.Uc(a)};
|
|
449
449
|
function Al(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={nf:void 0},d=c.next())e.nf=d.value,b.some(function(f){return function(g){return Xi(g.Z,f.nf)}}(e))||Cl(a,e.nf)}function El(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&Cl(a,d)}Al(a)}function Fl(a,b){b&&b!==a.i&&(Dl(a),a.i=b)}function Cl(a,b){var c=a.h;b instanceof Wi&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function yl(a){this.g=a;this.ce=this.Tf=null}
|
|
450
|
-
function zl(a,b,c){var d=new Uint8Array(0);a.ce=a.g(b,c,function(e){return P(function(f){if(1==f.g)return 0<d.byteLength?d=Pe(d,e):d=e,a.Tf?G(f,a.Tf(d),3):f.u(0);d=new Uint8Array(0);H(f)})})}yl.prototype.abort=function(){this.ce&&this.ce.abort()};function Gl(a){mh.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Zb(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new V("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ra(2)}
|
|
450
|
+
function zl(a,b,c){var d=new Uint8Array(0);a.ce=a.g(b,c,function(e){return P(function(f){if(1==f.g)return 0<d.byteLength?d=Pe(d,e):d=e,a.Tf?G(f,a.Tf(d),3):f.u(0);d=new Uint8Array(0);H(f)})})}yl.prototype.abort=function(){this.ce&&this.ce.abort()};function Gl(a){mh.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Zb(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new V("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ra(2)}pa(Gl,mh);Gl.prototype.release=function(){this.g.clear();this.h.stop();mh.prototype.release.call(this)};function Hl(a){mh.call(this);this.g=new Map;this.h=a}pa(Hl,mh);Hl.prototype.release=function(){this.g.clear();mh.prototype.release.call(this)};function Il(a,b){var c=a.g.get(b);c||(c={td:[],Oe:null,contentType:b},a.g.set(b,c));return c}function Jl(a,b,c){var d=Il(a,b.contentType);Kl(a,d);a={Lc:b,position:c};d=d.td;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
|
|
451
451
|
Hl.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.Oe;a:{var e=c.td;for(var f=e.length-1;0<=f;f--){var g=e[f];if(g.position<=a){e=g.Lc;break a}}e=null}f=e&&!(d===e||d&&e&&d.bandwidth==e.bandwidth&&d.audioSamplingRate==e.audioSamplingRate&&d.codecs==e.codecs&&d.contentType==e.contentType&&d.frameRate==e.frameRate&&d.height==e.height&&d.mimeType==e.mimeType&&d.channelsCount==e.channelsCount&&d.pixelAspectRatio==e.pixelAspectRatio&&d.width==e.width);
|
|
452
452
|
g=e&&d&&e.label&&d.label&&d.label!==e.label;var h=e&&d&&e.language&&d.language&&d.language!==e.language;d=e&&d&&e.roles&&d.roles&&!Qb(d.roles,e.roles);(g||h||d)&&Ll(this,a,e.contentType)&&(c.Oe=e,d=new V("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&Ll(this,a,e.contentType)&&(c.Oe=e,JSON.stringify(e),c=new V("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
|
|
453
453
|
function Ll(a,b,c){return(a=a.h()[c])&&0<a.length&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function Kl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.td;b.td=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.td=[]}
|
|
454
454
|
function Ml(a){var b={bandwidth:a.bandwidth||0,audioSamplingRate:null,codecs:a.codecs,contentType:a.type,frameRate:null,height:null,mimeType:a.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:a.roles,language:null};"video"==a.type&&(b.frameRate=a.frameRate||null,b.height=a.height||null,b.pixelAspectRatio=a.pixelAspectRatio||null,b.width=a.width||null);"audio"==a.type&&(b.audioSamplingRate=a.audioSamplingRate,b.channelsCount=a.channelsCount,b.label=a.label||null,b.language=
|
|
455
455
|
a.language);return b};function Nl(a){var b=lf(a),c=b.split("/")[0];a=mf(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,wd:null,colorGamut:null,frameRate:null}}
|
|
456
|
-
function Ol(a,b){function c(A){w=A.name;var B=A.reader;B.skip(24);var C=B.la(),E=B.la();B.skip(50);n=String(C);m=String(E);A.reader.
|
|
457
|
-
k=!0;break;case "mp4a":f.push("mp4a.40.2");h=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":f.push(A),h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,p=null,r=null,u=null,v=null,w;(new Lh).box("moov",Qh).box("trak",Qh).box("mdia",Qh).S("mdhd",function(A){l=sj(A.reader,A.version).language}).box("minf",Qh).box("stbl",Qh).S("stsd",Sh).box("mp4a",function(A){var B=uj(A.reader);p=B.channelCount;r=B.sampleRate;A.reader.
|
|
458
|
-
"mp4a",C,E;A.
|
|
456
|
+
function Ol(a,b){function c(A){w=A.name;var B=A.reader;B.skip(24);var C=B.la(),E=B.la();B.skip(50);n=String(C);m=String(E);A.reader.qa()&&Qh(A)}function d(A){var B=uj(A.reader);p=B.channelCount;r=B.sampleRate;e(A.name)}function e(A){A=A.toLowerCase();switch(A){case "avc1":case "avc3":g.push(A+".42E01E");k=!0;break;case "hev1":case "hvc1":g.push(A+".1.6.L93.90");k=!0;break;case "dvh1":case "dvhe":g.push(A+".05.04");k=!0;break;case "vp09":g.push(A+".00.10.08");k=!0;break;case "av01":g.push(A+".0.01M.08");
|
|
457
|
+
k=!0;break;case "mp4a":f.push("mp4a.40.2");h=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":f.push(A),h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,p=null,r=null,u=null,v=null,w;(new Lh).box("moov",Qh).box("trak",Qh).box("mdia",Qh).S("mdhd",function(A){l=sj(A.reader,A.version).language}).box("minf",Qh).box("stbl",Qh).S("stsd",Sh).box("mp4a",function(A){var B=uj(A.reader);p=B.channelCount;r=B.sampleRate;A.reader.qa()?Qh(A):e(A.name)}).box("esds",function(A){A=A.reader;for(var B=
|
|
458
|
+
"mp4a",C,E;A.qa();){C=A.T();for(var F=A.T();F&128;)F=A.T();if(3==C)A.la(),F=A.T(),F&128&&A.la(),F&64&&A.skip(A.T()),F&32&&A.la();else if(4==C)E=A.T(),A.skip(12);else if(5==C)break}E&&(B+="."+xj(E),5==C&&A.qa()&&(C=A.T(),E=(C&248)>>3,31===E&&A.qa()&&(E=32+((C&7)<<3)+((A.T()&224)>>5)),B+="."+E));f.push(B);h=!0}).box("ac-3",d).box("ec-3",d).box("ac-4",d).box("Opus",d).box("fLaC",d).box("avc1",c).box("avc3",c).box("hev1",c).box("hvc1",c).box("dva1",c).box("dvav",c).box("dvh1",c).box("dvhe",c).box("vp09",
|
|
459
459
|
c).box("av01",c).box("avcC",function(A){var B=w||"";switch(w){case "dvav":B="avc3";break;case "dva1":B="avc1"}A=A.reader;A.skip(1);A=B+"."+xj(A.T())+xj(A.T())+xj(A.T());g.push(A);k=!0}).box("hvcC",function(A){var B=w||"";switch(w){case "dvh1":B="hvc1";break;case "dvhe":B="hev1"}var C=A.reader;C.skip(1);A=C.T();var E=["","A","B","C"][A>>6],F=A&31,J=C.P(),K=(A&32)>>5?"H":"L";A=[C.T(),C.T(),C.T(),C.T(),C.T(),C.T()];C=C.T();for(var L=0,I=0;32>I;I++){L|=J&1;if(31==I)break;L<<=1;J>>=1}B=B+("."+E+F)+("."+
|
|
460
460
|
xj(L,!0));B+="."+K+C;E="";for(F=A.length;F--;)if((K=A[F])||E)E="."+K.toString(16).toUpperCase()+E;B+=E;g.push(B);k=!0}).box("dvcC",function(A){var B=w||"";switch(w){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B="dva1";break;case "avc3":B="dvav";break;case "av01":B="dav1"}var C=A.reader;C.skip(2);A=C.T();C=C.T();g.push(B+"."+yj(A>>1&127)+"."+yj(A<<5&32|C>>3&31));k=!0}).box("dvvC",function(A){var B=w||"";switch(w){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B=
|
|
461
461
|
"dva1";break;case "avc3":B="dvav";break;case "av01":B="dav1"}var C=A.reader;C.skip(2);A=C.T();C=C.T();g.push(B+"."+yj(A>>1&127)+"."+yj(A<<5&32|C>>3&31));k=!0}).S("vpcC",function(A){var B=w||"",C=A.reader;A=C.T();var E=C.T();C=C.T()>>4&15;g.push(B+"."+yj(A)+"."+yj(E)+"."+yj(C));k=!0}).box("av1C",function(A){var B=w||"";switch(w){case "dav1":B="av01"}var C=A.reader;C.skip(1);A=C.T();C=C.T();var E=A>>>5,F=(C&64)>>6;g.push(B+"."+E+"."+yj(A&31)+(C>>>7?"H":"M")+"."+yj(2===E&&F?(C&32)>>5?12:10:F?10:8)+"."+
|
|
462
|
-
((C&16)>>4)+"."+((C&8)>>3)+((C&4)>>2)+(C&3)+"."+yj(1)+"."+yj(1)+"."+yj(1)+".0");k=!0}).box("enca",Uh).box("encv",Th).box("sinf",Qh).box("frma",function(A){A=vj(A.reader).codec;e(A)}).box("colr",function(A){g=g.map(function(E){if(E.startsWith("av01.")){var F=A.reader,J=F.
|
|
462
|
+
((C&16)>>4)+"."+((C&8)>>3)+((C&4)>>2)+(C&3)+"."+yj(1)+"."+yj(1)+"."+yj(1)+".0");k=!0}).box("enca",Uh).box("encv",Th).box("sinf",Qh).box("frma",function(A){A=vj(A.reader).codec;e(A)}).box("colr",function(A){g=g.map(function(E){if(E.startsWith("av01.")){var F=A.reader,J=F.xa(),K=F.sb(4);var L=String.fromCharCode(K[0]);L+=String.fromCharCode(K[1]);L+=String.fromCharCode(K[2]);L+=String.fromCharCode(K[3]);if("nclx"===L){K=F.la();L=F.la();var I=F.la(),O=F.T()>>7,M=E.split(".");10==M.length&&(M[6]=yj(K),
|
|
463
463
|
M[7]=yj(L),M[8]=yj(I),M[9]=String(O),E=M.join("."))}F.seek(J)}return E});var B=wj(A.reader),C=B.colorGamut;u=B.wd;v=C}).parse(a||b,!0);if(!f.length&&!g.length)return null;var y=h&&!k,z=new Map;if(k){var D=new Hb("video/mp4");a&&D.init(a);D.i(b);a=t(D.j());for(b=a.next();!b.done;b=a.next())b=b.value,z.set(b,b);D.g()}return{type:y?"audio":"video",mimeType:y?"audio/mp4":"video/mp4",codecs:Pl(f.concat(g)).join(", "),language:l,height:m,width:n,channelCount:p,sampleRate:r,closedCaptions:z,wd:u,colorGamut:v,
|
|
464
464
|
frameRate:null}}function Pl(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=kf(d);b.has(e)||(c.push(d),b.add(e))}b=Xe("audio",c);d=Xe("video",c);a=Xe(We,c);d=Ql(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
|
|
465
465
|
function Ql(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvav.")||c.startsWith("dva1.")||c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")||c.startsWith("dvc1.")||c.startsWith("dvi1.")});return b?mb('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
|
|
@@ -468,7 +468,7 @@ function Sl(a,b,c){var d,e,f,g,h;return P(function(k){if(1==k.g)return d=b,d.cry
|
|
|
468
468
|
function Vl(a){var b,c,d,e,f,g,h;return P(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Wl(e),b.push(Xl(e)),e.V&&(Dl(e.V),e.V=null);f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,Dl(h);return G(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.l=null;a.h=null;H(k)})}
|
|
469
469
|
q.configure=function(a){this.h=a;this.L=new Yg({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.V&&(Dl(b.V),b.V=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,Dl(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(We))&&
|
|
470
470
|
b.V&&(Dl(b.V),b.V=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.V&&(Dl(b.V),b.V=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.V?(El(c.V,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(Dl(c.V),c.V=null)):0<a.segmentPrefetchLimit&&(c.V=Yl(this,c.stream));a.disableAudioPrefetch||Zl(this)};function $l(a,b,c){a.l.presentationTimeline.U()||(a.R=b,a.O=c)}
|
|
471
|
-
q.start=function(a){var b=this;return P(function(c){if(1==c.g)return G(c,am(b,a||new Map),2);Dh(b.m);b.F=!0;H(c)})};function bm(a,b){var c,d,e,f,g,h,k;P(function(l){switch(l.g){case 1:return c=Ye,a.K++,d=a.K,va(l,2),G(l,Ak(a.g.ca,c.wa),4);case 4:xa(l,3);break;case 2:if(e=ya(l),a.g)a.g.onError(e);case 3:f=af(b.mimeType,b.codecs),jk(a.g.ca,f,a.l.sequenceMode,b.external),g=a.g.ca.
|
|
471
|
+
q.start=function(a){var b=this;return P(function(c){if(1==c.g)return G(c,am(b,a||new Map),2);Dh(b.m);b.F=!0;H(c)})};function bm(a,b){var c,d,e,f,g,h,k;P(function(l){switch(l.g){case 1:return c=Ye,a.K++,d=a.K,va(l,2),G(l,Ak(a.g.ca,c.wa),4);case 4:xa(l,3);break;case 2:if(e=ya(l),a.g)a.g.onError(e);case 3:f=af(b.mimeType,b.codecs),jk(a.g.ca,f,a.l.sequenceMode,b.external),g=a.g.ca.aa,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.K==d&&(k=cm(a,b),a.i.set(c.wa,k),dm(a,k,0)),H(l)}})}
|
|
472
472
|
function em(a){var b=a.i.get(We);b&&(Wl(b),Xl(b).catch(function(){}),a.C=a.i.get(We),a.i.delete(We));a.s=null}function fm(a,b){for(var c=0>a.g.gb(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.ma&&e.ma.Uc(c),e.V&&e.V.Uc(c);d=t(a.o.values());for(e=d.next();!e.done;e=d.next())e.value.Uc(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.cc&&(gm(a,b,!1,0,!1),c.cc=d);else if(b=c.cc)c.cc=null,gm(a,b,!0,0,!1)}
|
|
473
473
|
function hm(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.F&&(b.video&&gm(a,b.video,c,d,e,f),b.audio&&gm(a,b.audio,c,d,e,f))}function im(a,b){P(function(c){if(1==c.g)return a.C=null,a.s=b,a.F?b.segmentIndex?c.u(2):G(c,b.createSegmentIndex(),2):c.return();gm(a,b,!0,0,!1);H(c)})}function jm(a,b){for(var c=t(a.G.entries()),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.G.delete(d))}}
|
|
474
474
|
function gm(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=We?g&&(g.cc&&(b.trickModeVideo?(g.cc=b,b=b.trickModeVideo):g.cc=null),g.stream!=b||e)&&(a.o.has(b)?g.V=a.o.get(b):g.V&&Fl(g.V,b),b.type==We&&(e=af(b.mimeType,b.codecs),jk(a.g.ca,e,a.l.sequenceMode,b.external)),!a.o.has(g.stream)&&g.stream.closeSegmentIndex&&(g.La?(e="("+g.type+":"+g.stream.id+")",a.G.has(e)||a.G.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),g.stream=b,g.ma=null,g.eg=!!f,c?g.Xc?g.ze=!0:g.La?(g.hc=!0,g.Fd=
|
|
@@ -484,7 +484,7 @@ function Zl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d
|
|
|
484
484
|
(f.nb.audio.segmentIndex||f.nb.audio.createSegmentIndex(),a.o.set(f.nb.audio,e))}q.updateDuration=function(){var a=this.l.presentationTimeline.getDuration();Infinity>a?this.g.ca.Za(a):this.g.ca.Za(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
|
|
485
485
|
function om(a,b){var c,d,e,f,g,h;return P(function(k){switch(k.g){case 1:Dh(a.m);if(b.La||null==b.vb||b.Xc)return k.return();b.vb=null;if(!b.hc){k.u(2);break}return G(k,km(a,b,b.ze,b.Fd),3);case 3:return k.return();case 2:jm(a,b);if(b.stream.segmentIndex){k.u(4);break}c=b.stream;va(k,5);return G(k,b.stream.createSegmentIndex(),7);case 7:xa(k,6);break;case 5:return d=ya(k),G(k,pm(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.La||b.vb||
|
|
486
486
|
dm(a,b,0),k.return();case 4:va(k,9);e=qm(a,b);null!=e&&(dm(a,b,e),b.gd=!1);xa(k,10);break;case 9:return f=ya(k),G(k,pm(a,b,f),11);case 11:return k.return();case 10:g=Array.from(a.i.values());if(!a.F||!g.every(function(l){return l.endOfStream})){k.u(0);break}return G(k,a.g.ca.endOfStream(),13);case 13:Dh(a.m),h=a.g.ca.getDuration(),0!=h&&h<a.l.presentationTimeline.getDuration()&&a.l.presentationTimeline.Za(h),H(k)}})}
|
|
487
|
-
function qm(a,b){if(rm(b))return xk(a.g.ca,b.stream.originalId||""),null;b.type==We&&yk(a.g.ca);if(!a.g.ca.
|
|
487
|
+
function qm(a,b){if(rm(b))return xk(a.g.ca,b.stream.originalId||""),null;b.type==We&&yk(a.g.ca);if(!a.g.ca.oa&&b.type!=We)return a.h.updateIntervalSeconds/2;var c=a.g.cd();if("audio"===b.type)for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.Ga(c,!0),wl(e,c);d=b.Na?b.Na.endTime:c;var f=qk(a.g.ca,b.type,c),g=Math.max(1,Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.B),h=a.l.presentationTimeline.getDuration()-d;e=pk(a.g.ca,b.type);if(1E-6>h&&e)return b.endOfStream=
|
|
488
488
|
!0,"video"==b.type&&(a=a.i.get(We))&&rm(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(f>=g)return a.h.updateIntervalSeconds/2;g=!b.ma;e=sm(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=!1;g&&b.eg&&(f=!0,b.eg=!1);g=Infinity;h=Array.from(a.i.values());h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,rm(k)||k.ma&&!k.ma.current()||(g=Math.min(g,k.Na?k.Na.endTime:c));if(d>=g+a.l.presentationTimeline.h)return a.h.updateIntervalSeconds;b.V&&b.ma&&!a.o.has(b.stream)&&(b.V.Ga(e.startTime),wl(b.V,
|
|
489
489
|
e.startTime));tm(a,b,c,e,f).catch(function(){});return null}
|
|
490
490
|
function sm(a,b,c,d){if(b.ma)return b.ma.current();if(b.Na||d)return c=b.Na?b.Na.endTime:d,a=0>a.g.gb(),b.stream.segmentIndex&&(b.ma=b.stream.segmentIndex.Ib(c,!1,a)),b.ma&&b.ma.next().value;d=a.l.sequenceMode?0:a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.gb();var f=null;d&&(b.stream.segmentIndex&&(b.ma=b.stream.segmentIndex.Ib(e,!1,a)),f=b.ma&&b.ma.next().value);f||(b.stream.segmentIndex&&(b.ma=b.stream.segmentIndex.Ib(c,!1,a)),f=b.ma&&b.ma.next().value);return f}
|
|
@@ -496,10 +496,10 @@ function ym(a,b,c){var d,e,f,g,h,k;return P(function(l){if(1==l.g){d=Array.from(
|
|
|
496
496
|
function um(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,D;return P(function(A){switch(A.g){case 1:e=Ye;f=null==b.Na&&null==b.rc;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.R)-.1);k=Math.min(c.appendWindowEnd,a.O)+.01;l=c.codecs||b.stream.codecs;m=kf(l);n=lf(c.mimeType||b.stream.mimeType);p=c.timestampOffset;if(p==b.Td&&h==b.Sd&&k==b.Rd&&m==b.uf&&n==b.vf){A.u(2);break}r=b.uf&&b.vf&&Kk(a.g.ca,b.type,n,l);if(!r){A.u(3);break}u=null;b.type===e.ja?u=a.i.get(e.Y):b.type===e.Y&&(u=a.i.get(e.ja));if(!u){A.u(3);
|
|
497
497
|
break}return G(A,Xl(u).catch(function(){}),5);case 5:u.rc=null,mm(a,u);case 3:return G(A,Am(a,b,p,h,k,c,m,n),2);case 2:return Xi(c.Z,b.rc)||(b.rc=c.Z,c.l&&c.Z&&(v=xm(a,b,c.Z),w=function(){var B,C,E,F,J,K,L;return P(function(I){switch(I.g){case 1:return va(I,2),G(I,v,4);case 4:return B=I.h,Dh(a.m),C=null,E=new Map,F={projection:null,hfov:null},J=new Lh,J.box("moov",Qh).box("trak",Qh).box("mdia",Qh).S("mdhd",function(O){C=sj(O.reader,O.version).timescale}).box("hdlr",function(O){O=O.reader;O.skip(8);
|
|
498
498
|
switch(O.tc()){case "soun":E.set(e.Y,C);break;case "vide":E.set(e.ja,C)}C=null}).box("minf",Qh).box("stbl",Qh).S("stsd",Sh).box("encv",Th).box("avc1",Th).box("avc3",Th).box("hev1",Th).box("hvc1",Th).box("dvav",Th).box("dva1",Th).box("dvh1",Th).box("dvhe",Th).box("dvc1",Th).box("dvi1",Th).box("vexu",Qh).box("proj",Qh).S("prji",function(O){O=O.reader.tc();F.projection=O}).box("hfov",function(O){O=O.reader.P()/1E3;F.hfov=O}).parse(B),Bm(a,F),E.has(b.type)?c.Z.timescale=E.get(b.type):null!=C&&(c.Z.timescale=
|
|
499
|
-
C),K=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,G(I,a.g.hg(b.type,B),5);case 5:return G(I,sk(a.g.ca,b.type,B,null,b.stream,K,b.Sc,d),6);case 6:xa(I,0);break;case 2:throw L=ya(I),b.rc=null,L;}})},y=c.startTime,f&&(z=pk(a.g.ca,b.type),null!=z&&(y=z)),a.g.
|
|
499
|
+
C),K=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,G(I,a.g.hg(b.type,B),5);case 5:return G(I,sk(a.g.ca,b.type,B,null,b.stream,K,b.Sc,d),6);case 6:xa(I,0);break;case 2:throw L=ya(I),b.rc=null,L;}})},y=c.startTime,f&&(z=pk(a.g.ca,b.type),null!=z&&(y=z)),a.g.zi(y,c.Z),g.push(w()))),a.l.sequenceMode&&(D=b.Na?b.Na.i:null,c.i!=D&&g.push(Dk(a.g.ca,b.type,c.startTime))),G(A,Promise.all(g),0)}})}
|
|
500
500
|
function Am(a,b,c,d,e,f,g,h){var k,l,m,n;return P(function(p){if(1==p.g)return k=Ye,l=new Map,a.j.audio&&l.set(k.Y,a.j.audio),a.j.video&&l.set(k.ja,a.j.video),va(p,2),b.Sd=d,b.Rd=e,g&&(b.uf=g),h&&(b.vf=h),b.Td=c,m=a.l.sequenceMode||"HLS"==a.l.type,G(p,Bk(a.g.ca,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),4);if(2!=p.g)return xa(p,0);n=ya(p);b.Sd=null;b.Rd=null;b.uf=null;b.vf=null;b.Td=null;throw n;})}
|
|
501
501
|
function wm(a,b,c,d,e,f,g,h){g=void 0===g?!1:g;h=void 0===h?!1:h;var k,l,m,n,p,r,u,v;return P(function(w){switch(w.g){case 1:k=d.closedCaptions&&0<d.closedCaptions.size;m=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;n=a.h.parsePrftBox&&!a.H;p="video/mp4"==d.mimeType||"audio/mp4"==d.mimeType;r=null;e.Z&&(r=e.Z.timescale);u=p&&r&&"video"===d.type&&"DASH"==a.l.type&&a.h.shouldFixTimestampOffset;if(m||n||u)l=new Lh;m&&l.S("emsg",function(y){var z=d.emsgSchemeIdUris;
|
|
502
|
-
if(0===y.version){var D=y.reader.tc();var A=y.reader.tc();var B=y.reader.P();var C=y.reader.P();var E=y.reader.P();var F=y.reader.P();var J=e.startTime+C/B}else B=y.reader.P(),J=y.reader.Qc()/B+e.timestampOffset,C=J-e.startTime,E=y.reader.P(),F=y.reader.P(),D=y.reader.tc(),A=y.reader.tc();y=y.reader.sb(y.reader.getLength()-y.reader.
|
|
502
|
+
if(0===y.version){var D=y.reader.tc();var A=y.reader.tc();var B=y.reader.P();var C=y.reader.P();var E=y.reader.P();var F=y.reader.P();var J=e.startTime+C/B}else B=y.reader.P(),J=y.reader.Qc()/B+e.timestampOffset,C=J-e.startTime,E=y.reader.P(),F=y.reader.P(),D=y.reader.tc(),A=y.reader.tc();y=y.reader.sb(y.reader.getLength()-y.reader.xa());if(z&&z.includes(D)||a.h.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==D)a.g.Ai();else if(z=J+E/B,B=(new Map).set("detail",{startTime:J,endTime:z,schemeIdUri:D,
|
|
503
503
|
value:A,timescale:B,presentationTimeDelta:C,eventDuration:E,id:F,messageData:y}),B=new V("emsg",B),B.cancelable=!0,a.g.onEvent(B),!B.defaultPrevented&&("https://aomedia.org/emsg/ID3"==D||"https://developer.apple.com/streaming/emsg-id3"==D)&&(D=oj(y),D.length))a.g.onMetadata([{cueTime:J,data:y,frames:D,dts:J,pts:J}],0,z)});n&&l.S("prft",function(y){if(!a.H&&e.Z.timescale){var z=y.reader,D=y.version;z.P();y=z.P();var A=z.P();y=1E3*y+A/Math.pow(2,32)*1E3;0===D?z=z.P():(D=z.P(),z=z.P(),z=D*Math.pow(2,
|
|
504
504
|
32)+z);y=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+y)).getTime();z=(new Map).set("detail",{wallClockTime:y,programStartDate:new Date(y-z/e.Z.timescale*1E3)});z=new V("prft",z);a.g.onEvent(z);a.H=!0}});u&&l.box("moof",Qh).box("traf",Qh).S("tfdt",function(y){var z,D,A,B,C,E;return P(function(F){z=rj(y.reader,y.version);D=z.baseMediaDecodeTime;if(!D)return F.return();A=-D/r;B=Number(b.Td)||0;if(!(B<A))return F.u(0);C=b.Sd;E=b.Rd;return G(F,Am(a,b,A,C,E,e),0)})});(m||n||u)&&l.parse(f,!1,
|
|
505
505
|
g);return G(w,zm(a,b,c),2);case 2:return Dh(a.m),v=b.Sc,b.Sc=!1,G(w,a.g.hg(b.type,f),3);case 3:return G(w,sk(a.g.ca,b.type,f,e,d,k,v,h,g),4);case 4:Dh(a.m),H(w)}})}
|
|
@@ -518,11 +518,11 @@ function Hm(a,b){function c(g){for(var h=t(Object.keys(g)),k=h.next();!k.done;k=
|
|
|
518
518
|
m);else k[l]=m;return k},{})}function e(g){return Array.isArray(g)&&0===g.length}function f(g){return g&&"object"===typeof g&&!Array.isArray(g)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",Dm);Dm.getDifferenceFromConfigObjects=Hm;Dm.convertToConfigObject=Fm;Dm.mergeConfigObjects=Em;function Im(){}function Jm(a){a=Hc(a);return(new te(a)).Db}function Km(a,b,c){function d(h){Fb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ab(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new T(2,6,6015);var e;"string"==typeof b?e=Jc(b,!0):e=b;a=Hc(a);a=Jc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Lm(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Hc(a).split("skd://").pop();return Km(a,c,b)}
|
|
519
519
|
function Mm(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}S("shaka.util.FairPlayUtils",Im);Im.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Dc(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Bb(Me(c)))}};Im.expressplayFairPlayRequest=function(a,b){Mm(a,b)};
|
|
520
520
|
Im.conaxFairPlayRequest=function(a,b){Mm(a,b)};Im.ezdrmFairPlayRequest=function(a,b){Mm(a,b)};Im.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Ab(b.body),a=Le(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Ic("spc="+a))};Im.expressplayInitDataTransform=function(a,b,c){return Lm(a,b,c)};
|
|
521
|
-
Im.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Hc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=
|
|
521
|
+
Im.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Hc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Db(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Km(a,d,b)};Im.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Hc(a).split(";").pop();return Km(a,c,b)};Im.verimatrixInitDataTransform=function(a,b,c){return Lm(a,b,c)};Im.initDataTransform=Km;
|
|
522
522
|
Im.defaultGetContentId=Jm;Im.isFairPlaySupported=function(){var a;return P(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},va(b,2),G(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);ya(b);return b.return(!1)})};function Nm(){}
|
|
523
523
|
function Om(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Zg(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(m,n,p){Ac()&&"skd"==n&&(n=p.serverCertificate,p=Jm(m),m=Km(m,p,n));return m},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:fc(),minHdcpVersion:"",ignoreDuplicateInitData:!jc()};
|
|
524
|
-
(fc()||rc())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1
|
|
525
|
-
dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
|
|
524
|
+
(fc()||rc())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;!pb()||jc()||ic()||gc("Tizen 4")||gc("Tizen 5")||gc("Tizen 6")||lc()||kc()&&53===mc()||kc()&&68===mc()||rc()||sc()||!(!nc()||nc()&&wc()||nc()&&gc("Fuchsia"))||vc()&&ec()||(c="smooth",d=!0);d={retryParameters:Zg(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,
|
|
525
|
+
continueLoadingWhenPaused:!0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
|
|
526
526
|
"urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"},manifestPreprocessor:Pm,manifestPreprocessorTXml:Qm,sequenceMode:!1,enableAudioGroups:!1,multiTypeVariantsAllowed:d,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',
|
|
527
527
|
liveSegmentsDelay:3,sequenceMode:ic()||jc()||lc()||rc()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:Pm,manifestPreprocessorTXml:Qm,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var e={retryParameters:Zg(),failureCallback:function(m){return Gm([m])},
|
|
528
528
|
rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:.01,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16E3,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,
|
|
@@ -535,19 +535,19 @@ restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPix
|
|
|
535
535
|
lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return P(function(n){return n.return(Rm(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}
|
|
536
536
|
function Sm(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:"",headers:{}}};return Em(a,b,c||Om(),d,"")}
|
|
537
537
|
function Rm(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=Nf(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Gf(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
|
|
538
|
-
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=We&&"image"!=c.type||b.push(c);return b}function Pm(a){return Gm([a],a)}function Qm(a){return Gm([a],a)}S("shaka.util.PlayerConfiguration",Nm);Nm.mergeConfigObjects=Sm;Nm.createDefault=Om;function Tm(a,b,c,d){mh.call(this);this.N=a;this.X=b;this.Ea=d.networkingEngine;this.B=c;this.o=null;this.
|
|
538
|
+
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=We&&"image"!=c.type||b.push(c);return b}function Pm(a){return Gm([a],a)}function Qm(a){return Gm([a],a)}S("shaka.util.PlayerConfiguration",Nm);Nm.mergeConfigObjects=Sm;Nm.createDefault=Om;function Tm(a,b,c,d){mh.call(this);this.N=a;this.X=b;this.Ea=d.networkingEngine;this.B=c;this.o=null;this.za=0;this.bb=d.Cc;this.F=d.ti;this.fb=d.ui;this.g=d.config;this.j=this.G=this.h=null;this.ga=!1;this.H=d.Ei;this.oa=!1;this.l=null;this.ea=!1;this.i=this.C=null;this.ba=!1;this.L=new Map;this.ta=!1;this.Da=d.Di;this.aa=new tl;this.fa=new ah;this.m=new ah;this.O=null;this.s=!1;this.Ta=d.wh;this.ka=null;this.Fa=d.vh;this.R=!1;this.K=[];this.I=[];this.A=!0}pa(Tm,mh);
|
|
539
539
|
function Um(a,b,c){(a=b?a.I:a.K)?a.push(c):c()}function Vm(a){if(a.I)for(var b=t(a.I),c=b.next();!c.done;c=b.next())c=c.value,c();a.I=null}function Wm(a,b){a.O=b;a.R=!0;if(a.K){b=t(a.K);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.K=null}q=Tm.prototype;q.getStartTime=function(){return this.B};q.Hc=function(){return this.N};q.gf=function(){return this.h};function Xm(a){a.ba=!0;return a.i}function Ym(a){a.oa=!0;return a.H}q.getStats=function(){return this.aa};
|
|
540
540
|
function Zm(a){a.ea=!0;return a.l}function $m(a){a.ta=!0;return a.L}
|
|
541
541
|
q.start=function(){var a=this;(function(){var b;return P(function(c){switch(c.g){case 1:return G(c,Promise.resolve(),2);case 2:return va(c,3),G(c,an(a),5);case 5:return bn(a),G(c,cn(a),6);case 6:bn(a);a.o||(a.o=new Ig(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,a.g.manifest.dash.enableAudioGroups));
|
|
542
542
|
if(a.Fa){var d=a.g.abrFactory;a.C=d;a.i=d();a.i.configure(a.g.abr)}if(a.Ta){d=a.h.presentationTimeline.U();var e=ug(a.h.variants);e=a.o.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant())a.ka=e,e.video&&dn(a,e.video,d),e.audio&&dn(a,e.audio,d)}return G(c,void 0,7);case 7:bn(a);a.m.resolve();xa(c,0);break;case 3:b=ya(c),a.m.reject(b),H(c)}})})()};q.dispatchEvent=function(a){return this.O?this.O.dispatchEvent(a):mh.prototype.dispatchEvent.call(this,a)};
|
|
543
543
|
q.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new V("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function bn(a){if(a.s)throw new T(2,7,7003);}function en(a,b){a.dispatchEvent(new V("onstatechange",(new Map).set("state",b)))}
|
|
544
544
|
function an(a){var b,c,d,e;return P(function(f){switch(f.g){case 1:en(a,"manifest-parser");a.j||(a.G=Qi(a.N,a.X),a.j=a.G(),a.j.configure(a.g.manifest,function(){return a.A}));b=Date.now()/1E3;en(a,"manifest");if(a.h){f.u(2);break}return G(f,a.j.start(a.N,a.fb),3);case 3:a.h=f.h;case 2:return a.fa.resolve(),c=new V("manifestparsed",void 0),G(f,Promise.resolve(),4);case 4:a.dispatchEvent(c);if(0==a.h.variants.length)throw new T(2,4,4036);fn(a.h);d=Date.now()/1E3;e=d-b;a.aa.H=e;H(f)}})}
|
|
545
|
-
function cn(a){var b,c,d,e,f;return P(function(g){switch(g.g){case 1:en(a,"drm-engine");a.
|
|
545
|
+
function cn(a){var b,c,d,e,f;return P(function(g){switch(g.g){case 1:en(a,"drm-engine");a.za=Date.now()/1E3;a.l=a.bb();a.F.g=a.l;a.l.configure(a.g.drm,function(){return a.A});b=Li(a.F,a.h);if(!b){g.u(2);break}c=new V("trackschanged",void 0);return G(g,Promise.resolve(),3);case 3:bn(a),a.dispatchEvent(c);case 2:return d=ug(a.h.variants),G(g,ei(a.l,d,a.h.offlineSessionIds),4);case 4:return bn(a),G(g,Ji(a.F,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new V("trackschanged",void 0);return G(g,Promise.resolve(),
|
|
546
546
|
7);case 7:a.dispatchEvent(f),H(g)}})}q.configure=function(a,b){a=Fm(a,b);Sm(this.g,a)};q.getConfiguration=function(){return Uc(this.g)};
|
|
547
|
-
function dn(a,b,c){var d,e,f,g,h;P(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new ul(d,b,function(l,m,n){return nm(l,m,n||null,a.g.streaming.retryParameters,a.Ea,a.A)},!1),a.L.set(b.id,e),G(k,b.createSegmentIndex(),2);f=a.B||0;(h=(g=b.segmentIndex.Ib(f))?g.current():null)||(h=ng(b.segmentIndex));h&&(c?h.Z&&xl(e,h.Z):wl(e,h.startTime));H(k)})}q.
|
|
547
|
+
function dn(a,b,c){var d,e,f,g,h;P(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new ul(d,b,function(l,m,n){return nm(l,m,n||null,a.g.streaming.retryParameters,a.Ea,a.A)},!1),a.L.set(b.id,e),G(k,b.createSegmentIndex(),2);f=a.B||0;(h=(g=b.segmentIndex.Ib(f))?g.current():null)||(h=ng(b.segmentIndex));h&&(c?h.Z&&xl(e,h.Z):wl(e,h.startTime));H(k)})}q.ej=function(){return this.m};
|
|
548
548
|
q.destroy=function(){var a=this,b,c,d;return P(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.ga){e.u(2);break}return G(e,a.j.stop(),2);case 2:if(!a.i||a.ba){e.u(4);break}return G(e,a.i.stop(),4);case 4:a.H&&!a.oa&&a.H.release();if(!a.l||a.ea){e.u(6);break}return G(e,a.l.destroy(),6);case 6:if(0<a.L.size&&!a.ta)for(b=t(a.L.values()),c=b.next();!c.done;c=b.next())d=c.value,Dl(d);H(e)}})};
|
|
549
|
-
function fn(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))}S("shaka.media.PreloadManager",Tm);Tm.prototype.destroy=Tm.prototype.destroy;Tm.prototype.waitForFinish=Tm.prototype.
|
|
550
|
-
"regionremove",function(d){c.g.delete(d.region)})}
|
|
549
|
+
function fn(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))}S("shaka.media.PreloadManager",Tm);Tm.prototype.destroy=Tm.prototype.destroy;Tm.prototype.waitForFinish=Tm.prototype.ej;function gn(a,b){mh.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Ac:null,zc:hn,pc:function(d,e){return yn(c,"enter",d,e)}},{Ac:zn,zc:hn,pc:function(d,e){return yn(c,"enter",d,e)}},{Ac:An,zc:hn,pc:function(d,e){return yn(c,"enter",d,e)}},{Ac:hn,zc:zn,pc:function(d,e){return yn(c,"exit",d,e)}},{Ac:hn,zc:An,pc:function(d,e){return yn(c,"exit",d,e)}},{Ac:zn,zc:An,pc:function(d,e){return yn(c,"skip",d,e)}},{Ac:An,zc:zn,pc:function(d,e){return yn(c,"skip",d,e)}}];this.h=new gb;this.h.D(this.i,
|
|
550
|
+
"regionremove",function(d){c.g.delete(d.region)})}pa(gn,mh);gn.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;mh.prototype.release.call(this)};gn.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?zn:a>d.endTime?An:hn;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Ac==e&&h.zc==f&&h.pc(d,b)}}};
|
|
551
551
|
function yn(a,b,c,d){b=new V(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var zn=1,hn=2,An=3;function Bn(a,b,c){var d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:var n=(new te(a)).Pa.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Cn[d])return m.return(e);f=0;g=uh([a],c);va(m,2);g.method="HEAD";return G(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];xa(m,3);break;case 2:k=ya(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return G(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
|
|
552
552
|
e.toLowerCase().split(";").shift():"")}})}
|
|
553
553
|
var Cn={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa",
|
|
@@ -555,7 +555,7 @@ jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"ima
|
|
|
555
555
|
k=k.next().value;return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
|
|
556
556
|
function En(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
|
|
557
557
|
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function Fn(a,b){var c=[];a=t(Gn(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,x(Fn(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Dn(d,b);c.push(e)}return c}
|
|
558
|
-
function Gn(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={Le:void 0},c=a.next())d.Le=c.value,b.some(function(e){return function(f){return
|
|
558
|
+
function Gn(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={Le:void 0},c=a.next())d.Le=c.value,b.some(function(e){return function(f){return Qd(e.Le,f)}}(d))||b.push(d.Le);return b}
|
|
559
559
|
function Hn(a){function b(d){for(var e=5381,f=d.length;f;)e=33*e^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}"center"==a.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==a.writingMode?c.vertical="lr":"vertical-rl"==a.writingMode&&
|
|
560
560
|
(c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c}
|
|
561
561
|
function In(a){if(Infinity===a.endTime||a.endTime<a.startTime)return null;var b=new Ed(a.startTime,a.endTime,a.text);b.line="number"===typeof a.line?a.line:null;a.lineAlign&&(b.lineAlign=a.lineAlign);b.lineInterpretation=a.snapToLines?Jd:1;b.position="number"===typeof a.position?a.position:null;a.positionAlign&&(b.positionAlign=a.positionAlign);b.size=a.size;b.textAlign=a.align;"lr"===a.vertical?b.writingMode="vertical-lr":"rl"===a.vertical&&(b.writingMode="vertical-rl");a.region&&(b.region.id=a.region.id,
|
|
@@ -564,7 +564,7 @@ q.append=function(a){var b=Fn(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];b
|
|
|
564
564
|
c.indexOf(f)-c.indexOf(g)});a=t(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)};q.destroy=function(){this.g&&(Kn(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
|
|
565
565
|
function Kn(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}S("shaka.text.SimpleTextDisplayer",Jn);Jn.prototype.setTextVisibility=Jn.prototype.setTextVisibility;Jn.prototype.isTextVisible=Jn.prototype.isTextVisible;Jn.prototype.destroy=Jn.prototype.destroy;Jn.prototype.append=Jn.prototype.append;Jn.prototype.remove=Jn.prototype.remove;Jn.prototype.configure=Jn.prototype.configure;function Ln(){}q=Ln.prototype;q.configure=function(){};q.remove=function(){};q.append=function(){};q.destroy=function(){};q.isTextVisible=function(){return!1};q.setTextVisibility=function(){};S("shaka.text.StubTextDisplayer",Ln);Ln.prototype.setTextVisibility=Ln.prototype.setTextVisibility;Ln.prototype.isTextVisible=Ln.prototype.isTextVisible;Ln.prototype.destroy=Ln.prototype.destroy;Ln.prototype.append=Ln.prototype.append;Ln.prototype.remove=Ln.prototype.remove;Ln.prototype.configure=Ln.prototype.configure;function Mn(){}function Nn(a){for(;a.firstChild;)a.removeChild(a.firstChild)}S("shaka.util.Dom",Mn);Mn.removeAllChildren=Nn;function On(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.s=b;this.l=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.s.appendChild(this.g);c&&c.captionsUpdatePeriod||rb("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.C=(new Zb(function(){d.A.paused||
|
|
566
566
|
Pn(d)})).Ra(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new gb;this.j.D(document,"fullscreenchange",function(){Pn(d,!0)});this.j.D(this.A,"seeking",function(){Pn(d,!0)});this.j.D(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){Pn(d,!0)}),this.o.observe(this.g));this.B=new Map}q=On.prototype;q.configure=function(a){this.C&&this.C.Ra(a.captionsUpdatePeriod)};
|
|
567
|
-
q.append=function(a){var b=[].concat(x(this.h));a=t(Gn(a));for(var c=a.next(),d={};!c.done;d={Me:void 0},c=a.next())d.Me=c.value,b.some(function(e){return function(f){return
|
|
567
|
+
q.append=function(a){var b=[].concat(x(this.h));a=t(Gn(a));for(var c=a.next(),d={};!c.done;d={Me:void 0},c=a.next())d.Me=c.value,b.some(function(e){return function(f){return Qd(f,e.Me)}}(d))||this.h.push(d.Me);Pn(this)};q.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
|
|
568
568
|
q.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});Pn(this,c>this.h.length);return!0};q.isTextVisible=function(){return this.m};q.setTextVisibility=function(a){this.m=a};function Qn(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
|
|
569
569
|
function Rn(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.oh:null;l&&(g.push(l.Ne),l.vc&&g.push(l.vc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?Qn(a,n)||(f=!0):(Sn(a,k,e),l=a.i.get(k),n=l.oh,f=!0));0<k.nestedCues.length&&n&&Rn(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,r){return p.startTime!=
|
|
570
570
|
r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.i.get(d.value),d.vc?(d.vc.contains(c)&&d.vc.removeChild(c),c.appendChild(d.vc),d.vc.appendChild(d.Ne)):c.appendChild(d.Ne)}}function Pn(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.B.values());for(var d=b.next();!d.done;d=b.next())Nn(d.value);Nn(a.g);a.i.clear();a.B.clear()}a.m&&Rn(a,a.h,a.g,c,[])}}
|
|
@@ -589,33 +589,33 @@ function qo(a){if(0===a.type)return ro;if(a=a.stream){var b=a.type;if("video"==b
|
|
|
589
589
|
function vo(a,b){b=a.h.xb()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function wo(a,b){var c=a.h.nc();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case no:return a.videoBandwidth||NaN;case ho:return a.audioBandwidth||NaN;default:return a.bandwidth}}
|
|
590
590
|
function ko(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
|
|
591
591
|
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function po(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=ko(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
|
|
592
|
-
function lo(a,b){if(!b||a.includes("offline:"))return a;a=new te(a);a.g.set("CMCD",b);return a.toString()}var jo="m",ho="a",no="v",io="av",ro="i",to="c",so="tt",ao="d",bo="ld",co="h",eo="lh";S("shaka.util.CmcdManager.StreamingFormat",{DASH:ao,
|
|
593
|
-
q.getBandwidthEstimate=function(a){var b=this.vg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Co(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",xo);xo.prototype.getBandwidthEstimate=xo.prototype.getBandwidthEstimate;xo.prototype.getRoundTripTime=xo.prototype.
|
|
594
|
-
xo.prototype.getMaxBitrate=xo.prototype.wg;var zo="etp",yo="mb",Ao="rd",Bo="rtt";function Do(){this.g=null;this.h=[]}function Eo(a,b){return P(function(c){if(1==c.g)return a.g?G(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;H(c)})}Do.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b,c){b=void 0===b?null:b;mh.call(this);var d=this;this.m=Fo;this.h=null;this.ee=b;this.oa=!1;this.qe=new gb;this.kd=new gb;this.l=new gb;this.Ta=new gb;this.fb=new gb;this.G=this.I=this.B=this.F=null;this.ye=0;this.aa=new Do;this.ka=this.$f=this.ea=this.i=this.bb=this.H=this.j=this.$b=this.L=this.bg=this.fa=this.O=this.ac=this.N=this.ge=this.K=this.Fb=null;this.Da=!1;this.
|
|
592
|
+
function lo(a,b){if(!b||a.includes("offline:"))return a;a=new te(a);a.g.set("CMCD",b);return a.toString()}var jo="m",ho="a",no="v",io="av",ro="i",to="c",so="tt",ao="d",bo="ld",co="h",eo="lh";S("shaka.util.CmcdManager.StreamingFormat",{DASH:ao,yj:bo,HLS:co,zj:eo,Mj:"s",OTHER:"o"});function xo(a){this.h=a;this.g=null}q=xo.prototype;q.configure=function(a){this.h=a};q.wg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(yo)?1E3*this.g.get(yo):null};q.vg=function(){return this.h.enabled&&this.g&&this.g.has(zo)?1E3*this.g.get(zo):null};q.Xh=function(){return this.h.enabled&&this.g&&this.g.has(Ao)?this.g.get(Ao):null};q.Yh=function(){return this.h.enabled&&this.g&&this.g.has(Bo)?this.g.get(Bo):null};
|
|
593
|
+
q.getBandwidthEstimate=function(a){var b=this.vg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Co(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",xo);xo.prototype.getBandwidthEstimate=xo.prototype.getBandwidthEstimate;xo.prototype.getRoundTripTime=xo.prototype.Yh;xo.prototype.getResponseDelay=xo.prototype.Xh;xo.prototype.getEstimatedThroughput=xo.prototype.vg;
|
|
594
|
+
xo.prototype.getMaxBitrate=xo.prototype.wg;var zo="etp",yo="mb",Ao="rd",Bo="rtt";function Do(){this.g=null;this.h=[]}function Eo(a,b){return P(function(c){if(1==c.g)return a.g?G(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;H(c)})}Do.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b,c){b=void 0===b?null:b;mh.call(this);var d=this;this.m=Fo;this.h=null;this.ee=b;this.oa=!1;this.qe=new gb;this.kd=new gb;this.l=new gb;this.Ta=new gb;this.fb=new gb;this.G=this.I=this.B=this.F=null;this.ye=0;this.aa=new Do;this.ka=this.$f=this.ea=this.i=this.bb=this.H=this.j=this.$b=this.L=this.bg=this.fa=this.O=this.ac=this.N=this.ge=this.K=this.Fb=null;this.Da=!1;this.za=this.o=null;this.ag=1E9;this.qd=[];this.X=NaN;this.g=Go(this);this.R=null;this.Ae=-1;this.Fa=null;this.ga={width:Infinity,
|
|
595
595
|
height:Infinity};this.ae=new Ii(this.g,this.ga,null);this.je=[];this.s=null;this.Ea=new Ig(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.Eb=this.g.preferredTextLanguage;this.od=this.g.preferredTextRole;this.nd=this.g.preferForcedSubs;
|
|
596
596
|
this.md=[];c&&c(this);this.O=Ho(this);this.fa=new xo(this.g.cmsd);this.F=Io(this);this.F.Pf(this.g.streaming.forceHTTP);this.F.Qf(this.g.streaming.forceHTTPS);this.F.m=this.g.streaming.minBytesForProgressEvents;this.Hb=this.ba=this.A=null;this.Ce=!1;this.Be=new Zb(function(){return P(function(e){if(1==e.g)return d.ba?G(e,d.Sb(d.Hb,!0),3):e.u(0);if(4!=e.g)return G(e,d.load(d.ba),4);d.Ce?d.Hb.pause():d.Hb.play();d.ba=null;d.Ce=!1;H(e)})});Jo&&(this.A=Jo(),this.A.configure(this.g.ads),this.fb.D(this.A,
|
|
597
597
|
"ad-content-pause-requested",function(e){var f;return P(function(g){if(1==g.g){d.Be.stop();if(d.ba)return g.u(0);d.Hb=d.h;d.Ce=d.h.ended;f=e.saveLivePosition||!1;return G(g,d.og(!0,f),3)}d.ba=g.h;H(g)})}),this.fb.D(this.A,"ad-content-resume-requested",function(e){e=e.offset||0;if(d.ba){var f=d.ba;f.B&&e&&(f.B+=e)}d.Be.$(.1)}),this.fb.D(this.A,"ad-content-attach-requested",function(){return P(function(e){return d.h||!d.Hb?e.u(0):G(e,d.Sb(d.Hb,!0),0)})}));this.qe.D(window,"online",function(){Ko(d);
|
|
598
|
-
d.Jf()});this.he=new Zb(function(){for(var e=Date.now()/1E3,f=!1,g=!0,h=t(d.i.variants),k=h.next();!k.done;k=h.next())k=k.value,0<k.disabledUntilTime&&k.disabledUntilTime<=e&&(k.disabledUntilTime=0,f=!0),0<k.disabledUntilTime&&(g=!1);g&&d.he.stop();f&&Lo(d,!1,void 0,!1,!1)});this.ta=null;a&&(rb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Sb(a,!0));this.C=null}
|
|
599
|
-
function Mo(a){null!=a.L&&(bk(a.L),a.L.release(),a.L=null)}function No(a,b){b.lcevc.enabled?(Mo(a),null==a.L&&(a.L=new ak(a.h,a.bg,b.lcevc),a.I&&(a.I.
|
|
600
|
-
q.destroy=function(){var a=this,b;return P(function(c){switch(c.g){case 1:if(a.m==Po)return c.return();Mo(a);b=a.detach();a.m=Po;return G(c,b,2);case 2:return G(c,a.Pe(),3);case 3:a.qe&&(a.qe.release(),a.qe=null);a.kd&&(a.kd.release(),a.kd=null);a.l&&(a.l.release(),a.l=null);a.Ta&&(a.Ta.release(),a.Ta=null);a.fb&&(a.fb.release(),a.fb=null);a.
|
|
598
|
+
d.Jf()});this.he=new Zb(function(){for(var e=Date.now()/1E3,f=!1,g=!0,h=t(d.i.variants),k=h.next();!k.done;k=h.next())k=k.value,0<k.disabledUntilTime&&k.disabledUntilTime<=e&&(k.disabledUntilTime=0,f=!0),0<k.disabledUntilTime&&(g=!1);g&&d.he.stop();f&&Lo(d,!1,void 0,!1,!1)});this.ta=null;a&&(rb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Sb(a,!0));this.C=null}pa(X,mh);
|
|
599
|
+
function Mo(a){null!=a.L&&(bk(a.L),a.L.release(),a.L=null)}function No(a,b){b.lcevc.enabled?(Mo(a),null==a.L&&(a.L=new ak(a.h,a.bg,b.lcevc),a.I&&(a.I.O=a.L))):Mo(a)}function Oo(a,b){return new V(a,b)}q=X.prototype;
|
|
600
|
+
q.destroy=function(){var a=this,b;return P(function(c){switch(c.g){case 1:if(a.m==Po)return c.return();Mo(a);b=a.detach();a.m=Po;return G(c,b,2);case 2:return G(c,a.Pe(),3);case 3:a.qe&&(a.qe.release(),a.qe=null);a.kd&&(a.kd.release(),a.kd=null);a.l&&(a.l.release(),a.l=null);a.Ta&&(a.Ta.release(),a.Ta=null);a.fb&&(a.fb.release(),a.fb=null);a.za=null;a.g=null;a.s=null;a.ee=null;a.O=null;a.fa=null;if(!a.F){c.u(4);break}return G(c,a.F.destroy(),5);case 5:a.F=null;case 4:a.o&&(a.o.release(),a.o=null),
|
|
601
601
|
mh.prototype.release.call(a),H(c)}})};function Qo(a,b){a.dispatchEvent(Oo("onstatechange",(new Map).set("state",b)))}
|
|
602
|
-
q.Sb=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return P(function(g){switch(g.g){case 1:if(c.m==Po)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return G(g,c.detach(),2);case 2:return G(g,Ro(c,"attach"),4);case 4:if(g.h)return g.return();va(g,5,6);d||(Qo(c,"attach"),e=function(){var h=So(c,!1);h&&To(c,h)},c.kd.D(a,"error",e),c.h=a);if(!b||!$b()||c.I){g.u(6);break}return G(g,Uo(c),6);case 6:
|
|
602
|
+
q.Sb=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return P(function(g){switch(g.g){case 1:if(c.m==Po)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return G(g,c.detach(),2);case 2:return G(g,Ro(c,"attach"),4);case 4:if(g.h)return g.return();va(g,5,6);d||(Qo(c,"attach"),e=function(){var h=So(c,!1);h&&To(c,h)},c.kd.D(a,"error",e),c.h=a);if(!b||!$b()||c.I){g.u(6);break}return G(g,Uo(c),6);case 6:za(g);c.aa.release();Ba(g,0);break;case 5:return f=ya(g),G(g,c.detach(),10);case 10:throw f;
|
|
603
603
|
}})};q.xh=function(a){this.bg=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return P(function(c){if(1==c.g){if(b.m==Po)throw new T(2,7,7E3);return G(c,b.fc(!1,a),2)}if(3!=c.g)return G(c,Ro(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.kd.Qa(),b.h=null),Qo(b,"detach"),b.A&&!a&&b.A.release()}finally{b.aa.release()}H(c)})};function Ro(a,b){var c;return P(function(d){return 1==d.g?(c=++a.ye,G(d,Eo(a.aa,b),2)):c!=a.ye?(a.aa.release(),d.return(!0)):d.return(!1)})}
|
|
604
604
|
q.fc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,p;return P(function(r){switch(r.g){case 1:return c.m!=Po&&(c.m=Fo),G(r,Ro(c,"unload"),2);case 2:if(r.h)return r.return();wa(r,3);c.Da=!1;Qo(c,"unload");a&&!$b()&&(a=!1);Mo(c);d=c.md.map(function(u){return u()});c.md=[];return G(r,Promise.all(d),5);case 5:c.dispatchEvent(Oo("unloading"));c.ac&&(c.ac.release(),c.ac=null);c.h&&(c.l.Qa(),c.Ta.Qa());c.he.stop();c.Fb&&(c.Fb.release(),c.Fb=null);c.ge&&(c.ge.stop(),c.ge=null);
|
|
605
605
|
if(!c.H){r.u(6);break}return G(r,c.H.stop(),7);case 7:c.H=null,c.bb=null;case 6:if(!c.o){r.u(8);break}return G(r,c.o.stop(),8);case 8:if(!c.j){r.u(10);break}return G(r,c.j.destroy(),11);case 11:c.j=null;case 10:c.K&&(c.K.release(),c.K=null);c.G&&(c.G.release(),c.G=null);if(!Ac("webkit")||!c.B){r.u(12);break}return G(r,c.B.destroy(),13);case 13:c.B=null;case 12:if(!c.I){r.u(14);break}return G(r,c.I.destroy(),15);case 15:c.I=null;case 14:if(c.A&&!b)c.A.onAssetUnload();c.ba&&!b&&(c.ba.destroy(),c.ba=
|
|
606
606
|
null);b||c.Be.stop();c.O&&Zn(c.O);c.fa&&(c.fa.g=null);if(!c.C){r.u(16);break}return G(r,c.C.destroy(),17);case 17:c.C=null;case 16:c.h&&Nn(c.h);c.h&&c.h.src&&(c.h.removeAttribute("src"),c.h.load());if(!c.B){r.u(18);break}return G(r,c.B.destroy(),19);case 19:c.B=null;case 18:c.ta&&c.ea!=c.ta.Hc()&&(c.ta.s||c.ta.destroy(),c.ta=null);c.ea=null;c.$f=null;c.N=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&
|
|
607
|
-
l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(n=m.next();!n.done;n=m.next())p=n.value,p.segmentIndex&&p.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(eg={},Xb.clear());c.i=null;c.s=new tl;c.we=null;c.Fa=null;c.R=null;c.Ae=-1;c.qd=[];c.X=NaN;Vo(c);case 3:
|
|
607
|
+
l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(n=m.next();!n.done;n=m.next())p=n.value,p.segmentIndex&&p.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(eg={},Xb.clear());c.i=null;c.s=new tl;c.we=null;c.Fa=null;c.R=null;c.Ae=-1;c.qd=[];c.X=NaN;Vo(c);case 3:za(r);c.aa.release();Ba(r,4);break;case 4:if(a&&$b()&&!c.I&&c.h)return G(r,Uo(c),0);r.u(0)}})};q.dj=function(a){this.ka=a};
|
|
608
608
|
q.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w;return P(function(y){switch(y.g){case 1:if(d.m==Po)throw new T(2,7,7E3);e=null;f="";a instanceof Tm?(e=a,f=e.Hc()||""):f=a||"";return G(y,Eo(d.aa,"load"),2);case 2:d.aa.release();if(!d.h)throw new T(2,7,7002);if(!d.ea){y.u(3);break}d.ea=f;return G(y,d.fc(!1),3);case 3:g=++d.ye;h=function(){return P(function(z){if(1==z.g)return d.ye==g?z.u(0):e?G(z,e.destroy(),3):z.u(3);throw new T(2,7,7E3);})};k=function(z,D){return P(function(A){switch(A.g){case 1:return wa(A,
|
|
609
|
-
2),G(A,Eo(d.aa,D),4);case 4:return G(A,h(),5);case 5:return G(A,z(),6);case 6:return G(A,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:
|
|
609
|
+
2),G(A,Eo(d.aa,D),4);case 4:return G(A,h(),5);case 5:return G(A,z(),6);case 6:return G(A,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:za(A),d.aa.release(),Ba(A,0)}})};va(y,5,6);null==b&&e&&(b=e.getStartTime());d.ka=b;d.Da=!1;d.dispatchEvent(Oo("loading"));if(e){c=e.X;y.u(8);break}if(c){y.u(8);break}return G(y,k(function(){return P(function(z){if(1==z.g)return G(z,Wo(d,f),2);c=z.h;H(z)})},"guessMimeType_"),8);case 8:l=!!e;if(e){Wm(e,d);d.s=e.getStats();y.u(11);break}return G(y,Xo(d,f,b,c,!0),12);case 12:(e=
|
|
610
610
|
y.h)?(e.A=!1,Wm(e,d),d.s=e.getStats(),e.start(),e.m.catch(function(){})):d.s=new tl;case 11:return m=!e,n=Date.now()/1E3,d.s=e?e.getStats():new tl,d.ea=f,d.$f=c||null,m?G(y,k(function(){return P(function(z){return G(z,Yo(d,c),0)})},"initializeSrcEqualsDrmInner_"),21):G(y,k(function(){return P(function(z){if(1==z.g)return G(z,Promise.race([e.fa,e.m]),2);d.bb=e.G;var D=e;D.ga=!0;d.H=D.j;d.i=e.gf();H(z)})},"waitForFinish"),15);case 15:if(d.I){y.u(16);break}return G(y,k(function(){return P(function(z){return G(z,
|
|
611
|
-
Uo(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return G(y,k(function(){return P(function(z){return G(z,e.m,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.ae=e.F;d.H&&d.H.setMediaElement&&d.h&&d.H.setMediaElement(d.h);d.ac=Ym(e);d.$b=e.Da;if(p=e.o)d.Ea=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(Zo(d),d.configure("manifest.disableVideo",!0));d.B=Zm(e);return G(y,k(function(){return P(function(z){return G(z,d.B.Sb(d.h),0)})},"drmEngine_.attach"),19);case 19:return!(r=e.C)||d.
|
|
612
|
-
d.
|
|
613
|
-
d.o.trySuggestStreams=function(){})),u=$m(e),v=e.ka,G(y,k(function(){return P(function(z){return G(z,$o(d,n,v,u),0)})},"loadInner_"),20);case 20:Vm(e);y.u(14);break;case 21:return G(y,k(function(){return P(function(z){return G(z,ap(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(Oo("loaded"));case 6:
|
|
614
|
-
function Zo(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}q
|
|
611
|
+
Uo(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return G(y,k(function(){return P(function(z){return G(z,e.m,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.ae=e.F;d.H&&d.H.setMediaElement&&d.h&&d.H.setMediaElement(d.h);d.ac=Ym(e);d.$b=e.Da;if(p=e.o)d.Ea=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(Zo(d),d.configure("manifest.disableVideo",!0));d.B=Zm(e);return G(y,k(function(){return P(function(z){return G(z,d.B.Sb(d.h),0)})},"drmEngine_.attach"),19);case 19:return!(r=e.C)||d.za&&
|
|
612
|
+
d.za==r||(d.o=Xm(e),d.za=e.C,"function"!=typeof d.o.setMediaElement&&(rb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=function(){}),"function"!=typeof d.o.setCmsdManager&&(rb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(rb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),
|
|
613
|
+
d.o.trySuggestStreams=function(){})),u=$m(e),v=e.ka,G(y,k(function(){return P(function(z){return G(z,$o(d,n,v,u),0)})},"loadInner_"),20);case 20:Vm(e);y.u(14);break;case 21:return G(y,k(function(){return P(function(z){return G(z,ap(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(Oo("loaded"));case 6:za(y);if(!e){y.u(23);break}return G(y,e.destroy(),23);case 23:d.ta=null;Ba(y,0);break;case 5:w=ya(y);if(!w||7E3==w.code){y.u(25);break}return G(y,d.fc(!1),25);case 25:throw w;}})};
|
|
614
|
+
function Zo(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}q.$i=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return P(function(e){return 1==e.g?G(e,bp(c),2):3!=e.g?(d=e.h,G(e,c.fc(a,b),3)):e.return(d)})};
|
|
615
615
|
q.og=function(a,b){a=void 0===a?!1:a;b=void 0===b?!1:b;var c=this,d;return P(function(e){return 1==e.g?G(e,bp(c,b),2):3!=e.g?(d=e.h,G(e,c.detach(a),3)):e.return(d)})};
|
|
616
|
-
function bp(a,b){b=void 0===b?!1:b;var c,d;return P(function(e){if(1==e.g){c=null;if(!(a.i&&a.H&&a.bb&&a.ea))return e.u(2);d=a.h.currentTime;a.U()&&!b&&(d=null);return G(e,cp(a,a.ea,d,a.$f,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.je.push(c);a.H&&a.H.setMediaElement&&a.H.setMediaElement(null);var f=c,g=a.H,h=a.bb;f.h=a.i;f.j=g;f.G=h;f=c;g=a.
|
|
616
|
+
function bp(a,b){b=void 0===b?!1:b;var c,d;return P(function(e){if(1==e.g){c=null;if(!(a.i&&a.H&&a.bb&&a.ea))return e.u(2);d=a.h.currentTime;a.U()&&!b&&(d=null);return G(e,cp(a,a.ea,d,a.$f,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.je.push(c);a.H&&a.H.setMediaElement&&a.H.setMediaElement(null);var f=c,g=a.H,h=a.bb;f.h=a.i;f.j=g;f.G=h;f=c;g=a.za;f.i=a.o;f.C=g;c.o=a.Ea;c.start();a.i=null;a.H=null;a.bb=null;a.o=null;a.za=null}return e.return(c)})}
|
|
617
617
|
q.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return P(function(f){if(1==f.g)return G(f,Xo(d,a,b,c),2);(e=f.h)?e.start():To(d,new T(2,7,7005));return f.return(e)})};q.Pe=function(){var a=this,b,c,d,e;return P(function(f){b=[];c=t(a.je);for(d=c.next();!d.done;d=c.next())e=d.value,e.s||b.push(e.destroy());a.je=[];return G(f,Promise.all(b),0)})};
|
|
618
|
-
function Xo(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return P(function(l){if(1==l.g)return d?l.u(2):G(l,Wo(a,b),3);2!=l.g&&(d=l.h);if(f=dp(a,d))return l.return(null);g=!1;h=!0;e&&(a.o&&a.
|
|
618
|
+
function Xo(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return P(function(l){if(1==l.g)return d?l.u(2):G(l,Wo(a,b),3);2!=l.g&&(d=l.h);if(f=dp(a,d))return l.return(null);g=!1;h=!0;e&&(a.o&&a.za==a.g.abrFactory&&(h=!1),a.h&&"AUDIO"===a.h.nodeName&&(g=!0));k=cp(a,b,c,d||null,!e,g,h);k=e?k.then(function(m){m.A=!1;return m}):k.then(function(m){a.je.push(m);return m});return l.return(k)})}
|
|
619
619
|
function cp(a,b,c,d,e,f,g){e=void 0===e?!0:e;f=void 0===f?!1:f;g=void 0===g?!0:g;var h,k,l,m,n,p,r,u,v,w,y,z,D,A,B;return P(function(C){if(1==C.g)return h=null,k=Uc(a.g),f&&(k.manifest.disableVideo=!0),l=function(){return h.R&&h.s?null:h},m=function(){return l()?l().getConfiguration():a.g},n=function(E,F){l()?h.configure(E,F):a.configure(E,F)},Infinity!=a.ga.width||Infinity!=a.ga.height?C.u(2):G(C,Bc(),3);2!=C.g&&(p=C.h,a.ga.width=p.width,a.ga.height=p.height);r=new Ii(k,a.ga,null);u={networkingEngine:a.F,
|
|
620
620
|
filter:function(E){var F,J;return P(function(K){if(1==K.g)return G(K,Ji(r,E),2);if(4!=K.g){F=K.h;if(!F)return K.u(0);J=Oo("trackschanged");return G(K,Promise.resolve(),4)}h.dispatchEvent(J);H(K)})},makeTextStreamsForClosedCaptions:function(E){return ep(a,E)},onTimelineRegionAdded:function(E){var F=h.H;a:{var J=t(F.g);for(var K=J.next();!K.done;K=J.next())if(K=K.value,K.schemeIdUri==E.schemeIdUri&&K.id==E.id&&K.startTime==E.startTime&&K.endTime==E.endTime){J=K;break a}J=null}null==J&&(F.g.add(E),E=
|
|
621
621
|
new V("regionadd",new Map([["region",E]])),F.dispatchEvent(E))},onEvent:function(E){return h.dispatchEvent(E)},onError:function(E){return h.onError(E)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return m().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){n("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&h.R&&a.j.updateDuration()},newDrmInfo:function(E){var F=h.l,J=F?F.g:null;J&&F.s&&Mi(r,J.keySystem,E)},onManifestUpdated:function(){var E=
|
|
@@ -623,31 +623,31 @@ new V("regionadd",new Map([["region",E]])),F.dispatchEvent(E))},onEvent:function
|
|
|
623
623
|
F,J,L,O.Ff)}}(I))},disableStream:function(E){return a.disableStream(E,a.g.streaming.maxDisabledTime)},addFont:function(E,F){return a.addFont(E,F)}};v=new Gl(function(){return a.Pb()});v.addEventListener("regionadd",function(E){var F=E.region;gp(a,"timelineregionadded",F,h);Um(h,!1,function(){a.A&&(a.A.onDashTimedMetadata(F),a.A.onDASHInterstitialMetadata(a,a.h,F))})});w=null;k.streaming.observeQualityChanges&&(w=new Hl(function(){return a.xb()}),w.addEventListener("qualitychange",function(E){hp(a,
|
|
624
624
|
E.quality,E.position)}),w.addEventListener("audiotrackchange",function(E){hp(a,E.quality,E.position,!0)}));y=!0;z={Mb:a.F,onError:function(E){return h.onError(E)},be:function(E){Um(h,!0,function(){a:{var F=E,J=Oo("keystatuschanged");a.dispatchEvent(J);var K=Object.keys(F);1==K.length&&""==K[0]&&(K=["00"],F={"00":F[""]});J=1==K.length&&"00"==K[0];var L=!1;if(K.length){K=t(a.i.variants);for(var I=K.next();!I.done;I=K.next()){I=I.value;var O=[];I.audio&&O.push(I.audio);I.video&&O.push(I.video);O=t(O);
|
|
625
625
|
for(var M=O.next();!M.done;M=O.next()){var N=M.value;M=I.allowedByKeySystem;if(N.keyIds.size){I.allowedByKeySystem=!0;N=t(N.keyIds);for(var Q=N.next();!Q.done;Q=N.next())if(Q=Q.value,(Q=F[J?"00":Q])||a.B.F)I.allowedByKeySystem=I.allowedByKeySystem&&!!Q&&!Oi.includes(Q)}M!=I.allowedByKeySystem&&(L=!0)}}}if(L&&(ip(a),!jp(a)))break a;(F=a.j.j)&&!F.allowedByKeySystem&&Lo(a)}})},onExpirationUpdated:function(E,F){var J=Oo("expirationupdated");h.dispatchEvent(J);if((J=h.j)&&J.onExpirationUpdated)J.onExpirationUpdated(E,
|
|
626
|
-
F)},onEvent:function(E){h.dispatchEvent(E);"drmsessionupdate"==E.type&&y&&(y=!1,E=Date.now()/1E3-h.
|
|
626
|
+
F)},onEvent:function(E){h.dispatchEvent(E);"drmsessionupdate"==E.type&&y&&(y=!1,E=Date.now()/1E3-h.za,(a.s||h.getStats()).j=E,a.L&&bk(a.L))}};D=Io(a,l);th(a.F,D);A=function(){return a.Cc(z)};B={config:k,ui:u,Ei:v,Di:w,Cc:A,ti:r,networkingEngine:D,wh:e,vh:g};h=new Tm(b,d,c,B);return C.return(h)})}
|
|
627
627
|
function Wo(a,b){var c,d;return P(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,G(e,Bn(b,a.F,c),2);d=e.h;"application/x-mpegurl"==d&&oc()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}function dp(a,b){if(!$b())return!0;if(b){if(""==(a.h||bc()).canPlayType(b))return!1;if(!($b()&&b in Ri))return!0;if(nf(b))return oc()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls}return!1}
|
|
628
628
|
function kp(a){var b=a.g.textDisplayFactory;b!==a.we&&(a.C=b(),a.C.configure?a.C.configure(a.g.textDisplayer):rb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.we=b,a.C.setTextVisibility(a.oa))}
|
|
629
|
-
function Uo(a){var b,c,d;return P(function(e){if(1==e.g)return Qo(a,"media-source"),kp(a),b=lp(a.h,a.C,{
|
|
629
|
+
function Uo(a){var b,c,d;return P(function(e){if(1==e.g)return Qo(a,"media-source"),kp(a),b=lp(a.h,a.C,{Ph:function(){return a.keySystem()},onMetadata:function(f,g,h){mp(a,f,g,h)}},a.L),b.configure(a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.ea=d,G(e,b.K,2);a.I=b;H(e)})}
|
|
630
630
|
function $o(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,D,A,B,C,E,F,J,K;return P(function(L){switch(L.g){case 1:Qo(a,"load"),e=a.h,a.K=new kl({Kd:function(){return e.playbackRate},mc:function(){return e.defaultPlaybackRate},Rf:function(I){e.playbackRate=I},Ig:function(I){e.currentTime+=I}}),f=function(){return np(a)},g=function(){return op(a)},a.l.D(e,"playing",f),a.l.D(e,"pause",f),a.l.D(e,"ended",f),a.l.D(e,"ratechange",g),No(a,a.g),a.Eb=a.g.preferredTextLanguage,a.od=a.g.preferredTextRole,a.nd=
|
|
631
631
|
a.g.preferForcedSubs,pp(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd),a.o.init(function(I,O,M){a.i&&a.j&&I!=a.j.j&&qp(a,I,!0,void 0===O?!1:O,void 0===M?0:M)}),a.o.setMediaElement(e),a.o.setCmsdManager(a.fa),a.j=rp(a),a.j.configure(a.g.streaming),a.m=sp,e.textTracks&&a.l.D(e.textTracks,"addtrack",function(I){if(I.track)switch(I=I.track,I.kind){case "chapters":tp(a,I)}}),a.dispatchEvent(Oo("streaming")),h=c;case 2:(l=a.j.j)||h||(h=jp(a)?a.o.chooseVariant():null);m=[];k=l||h;n=t([k.video,
|
|
632
632
|
k.audio]);for(p=n.next();!p.done;p=n.next())(r=p.value)&&!r.segmentIndex&&m.push(r.createSegmentIndex());if(!(0<m.length)){L.u(4);break}return G(L,Promise.all(m),4);case 4:if(!k||0!=k.disabledUntilTime){L.u(2);break}if(a.H&&a.H.onInitialVariantChosen)a.H.onInitialVariantChosen(k);a.i.isLowLatency&&!a.g.streaming.lowLatencyMode&&$a("Low-latency 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.");
|
|
633
633
|
a.O&&$n(a.O,a.i.isLowLatency&&a.g.streaming.lowLatencyMode);pp(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);$l(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(I){a.G=up(a,I);a.Fb=vp(a,I);wp(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||(v=a.ka,null==v&&a.i.startTime&&(v=a.i.startTime),u(v));if(l){L.u(7);break}if(!a.g.streaming.startAtSegmentBoundary){L.u(8);break}w=a.i.presentationTimeline;y=a.ka||a.h.currentTime;null==a.ka&&
|
|
634
634
|
a.i.startTime&&(y=a.i.startTime);z=w.Jb();D=w.zb();y<z?y=z:y>D&&(y=D);return G(L,xp(h,y),9);case 9:A=L.h,u(A);case 8:qp(a,h,!0,!1,0);case 7:return a.G.ready(),B=a.Ic().find(function(I){return I.active}),B||((C=vg(a.i.textStreams,a.Eb,a.od,a.nd)[0]||null)&&sl(a.s.h,C,!0),h&&(C?(yp(a,h.audio,C)&&(a.oa=!0),a.oa&&a.C.setTextVisibility(!0),zp(a)):a.oa=!1),C&&(a.g.streaming.alwaysStreamText||a.rf())&&im(a.j,C)),G(L,a.j.start(d),10);case 10:a.g.abr.enabled&&(a.o.enable(),Ap(a));ip(a);jp(a);a.i.variants.some(function(I){return I.primary});
|
|
635
635
|
if((E=a.U())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)F=function(){return Bp(a)},a.l.D(e,"timeupdate",F);E||(J=function(){return Cp(a)},a.l.D(e,"timeupdate",J),Cp(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(K=function(){var I;return P(function(O){if(1==O.g){I=a.h.duration-a.h.currentTime;if(isNaN(I)||!(I<=a.g.streaming.preloadNextUrlWindow))return O.u(0);a.l.$a(e,"timeupdate",
|
|
636
|
-
K);return G(O,a.preload(a.i.nextUrl),4)}a.ta=O.h;H(O)})},a.l.D(e,"timeupdate",K)),a.l.D(e,"ended",function(){a.load(a.ta||a.i.nextUrl)})));if(a.A)a.A.onManifestUpdated(E);a.Da=!0;a.l.
|
|
636
|
+
K);return G(O,a.preload(a.i.nextUrl),4)}a.ta=O.h;H(O)})},a.l.D(e,"timeupdate",K)),a.l.D(e,"ended",function(){a.load(a.ta||a.i.nextUrl)})));if(a.A)a.A.onManifestUpdated(E);a.Da=!0;a.l.ra(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});H(L)}})}
|
|
637
637
|
function Yo(a,b){var c,d,e,f,g;return P(function(h){return 1==h.g?(c=Ye,d=Date.now()/1E3,e=!0,a.B=a.Cc({Mb:a.F,onError:function(k){To(a,k)},be:function(){},onExpirationUpdated:function(){var k=Oo("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.B.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
|
|
638
638
|
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?lf(b):"",codecs:b?mf(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ja,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set},g.fullMimeTypes.add(af(g.mimeType,
|
|
639
639
|
g.codecs)),b.startsWith("audio/")?(g.type=c.Y,f.audio=g):f.video=g,a.B.ba=!0,G(h,ei(a.B,[f],[]),2)):G(h,a.B.Sb(a.h),0)})}
|
|
640
640
|
function ap(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;return P(function(v){if(1==v.g)return Qo(a,"src-equals"),d=a.h,a.G=new al(d),e=!1,a.md.push(function(){e=!0}),null!=a.ka&&a.G.Ee(a.ka),a.K=new kl({Kd:function(){return d.playbackRate},mc:function(){return d.defaultPlaybackRate},Rf:function(w){d.playbackRate=w},Ig:function(w){d.currentTime+=w}}),f=a.g.streaming.rebufferingGoal,wp(a,d,f),g=function(){return np(a)},h=function(){return op(a)},a.l.D(d,"playing",g),a.l.D(d,"pause",g),a.l.D(d,"ended",g),a.l.D(d,
|
|
641
|
-
"ratechange",h),"none"!=d.preload&&a.l.
|
|
641
|
+
"ratechange",h),"none"!=d.preload&&a.l.ra(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.l.D(d.audioTracks,"addtrack",function(){return ip(a)}),a.l.D(d.audioTracks,"removetrack",function(){return ip(a)}),a.l.D(d.audioTracks,"change",function(){return ip(a)})),d.textTracks&&(kp(a),a.l.D(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "metadata":Dp(a,w);break;case "chapters":tp(a,w);break;default:ip(a)}}),a.l.D(d.textTracks,"removetrack",function(){return ip(a)}),
|
|
642
642
|
a.l.D(d.textTracks,"change",function(){return ip(a)}),a.l.D(d,"enterpictureinpicture",function(){var w=Ep(a).find(function(y){return"disabled"!==y.mode});w&&(w.mode="showing")}),a.l.D(d,"leavepictureinpicture",function(){var w=Ep(a).find(function(y){return"disabled"!==y.mode});w&&(w.mode="hidden")})),k=fo(a.O,a.ea,c),!k.includes("#t=")&&(0<a.g.playRangeStart||isFinite(a.g.playRangeEnd))&&(k+="#t=",0<a.g.playRangeStart&&(k+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(k+=","+a.g.playRangeEnd)),
|
|
643
|
-
d.src=k,(hc()||kc())&&d.load(),"none"!=d.preload&&!d.autoplay&&nf(c)&&uc()&&d.load(),a.m=Fp,a.dispatchEvent(Oo("streaming")),l=new ah,Sk(d,HTMLMediaElement.HAVE_METADATA,a.l,function(){a.G.ready();l.resolve()}),Sk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.l,function(){var w,y,z,D,A;return P(function(B){if(1==B.g)return Gp(a),w=Ep(a),w.find(function(C){return"disabled"!=C.mode})?(0<w.length&&(a.oa=!0,a.C.setTextVisibility(!0)),B.u(2)):G(B,new Promise(function(C){a.l.
|
|
644
|
-
2);if(e)return B.return();y=!1;z=t(w);for(D=z.next();!D.done;D=z.next())A=D.value,"disabled"!==A.mode&&(y?(A.mode="disabled",$a("Found more than one enabled text track, disabling it",A)):(Hp(a,A),y=!0));Ip(a);H(B)})}),d.error?l.reject(So(a)):"none"==d.preload&&($a('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.'),
|
|
645
|
-
l.resolve()),a.l.
|
|
643
|
+
d.src=k,a.I&&window.ManagedMediaSource&&(d.disableRemotePlayback=!1),(hc()||kc())&&d.load(),"none"!=d.preload&&!d.autoplay&&nf(c)&&uc()&&d.load(),a.m=Fp,a.dispatchEvent(Oo("streaming")),l=new ah,Sk(d,HTMLMediaElement.HAVE_METADATA,a.l,function(){a.G.ready();l.resolve()}),Sk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.l,function(){var w,y,z,D,A;return P(function(B){if(1==B.g)return Gp(a),w=Ep(a),w.find(function(C){return"disabled"!=C.mode})?(0<w.length&&(a.oa=!0,a.C.setTextVisibility(!0)),B.u(2)):G(B,new Promise(function(C){a.l.ra(d.textTracks,
|
|
644
|
+
"change",C);(new Zb(C)).$(1)}),2);if(e)return B.return();y=!1;z=t(w);for(D=z.next();!D.done;D=z.next())A=D.value,"disabled"!==A.mode&&(y?(A.mode="disabled",$a("Found more than one enabled text track, disabling it",A)):(Hp(a,A),y=!0));Ip(a);H(B)})}),d.error?l.reject(So(a)):"none"==d.preload&&($a('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.'),
|
|
645
|
+
l.resolve()),a.l.ra(d,"error",function(){l.reject(So(a))}),m=new Promise(function(w,y){(new Zb(y)).$(a.g.streaming.loadTimeout)}),G(v,Promise.race([l,m]),2);if((n=a.U())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)p=function(){return Bp(a)},a.l.D(d,"timeupdate",p);n||(r=function(){return Cp(a)},a.l.D(d,"timeupdate",r),Cp(a));a.A&&(a.A.onManifestUpdated(n),n&&(u=a.Pb().end,a.l.D(d,"progress",function(){var w=a.Pb().end;
|
|
646
646
|
u!=w&&(a.A.onManifestUpdated(a.U()),u=w)})));a.Da=!0;H(v)})}function Gp(a){var b=a.g.preferredAudioLanguage;""!=b&&a.Ug(b,a.g.preferredVariantRole)}function Ip(a){var b=a.g.preferredTextLanguage;""!=b&&a.Lf(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
|
|
647
647
|
function Dp(a,b){if("metadata"==b.kind){b.mode="hidden";a.l.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,fp(a,e.startTime,e.endTime,e.type,e.value),a.A)a.A.onCueMetadataChange(e.value);if(b.cues){d=[];e=t(b.cues);for(var f=e.next(),g={};!f.done;g={Ub:void 0},f=e.next())g.Ub=f.value,"com.apple.quicktime.HLS"==g.Ub.type&&null!=g.Ub.startTime&&(f=d.find(function(h){return function(k){return k.startTime==h.Ub.startTime&&k.endTime==h.Ub.endTime}}(g)),
|
|
648
648
|
f||(f={startTime:g.Ub.startTime,endTime:g.Ub.endTime,values:[]},d.push(f)),f.values.push(g.Ub.value));d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return"X-ASSET-URI"==h.key||"X-ASSET-LIST"==h.key})&&a.A&&(e.values.push({key:"CUE",description:"",data:0==e.startTime?"ONCE,PRE":"ONCE",mimeType:null,pictureType:null}),a.A.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new Zb(function(){var d=Jp(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).xc().$(.5);
|
|
649
649
|
a.md.push(function(){c.stop()})}}function mp(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&"number"==typeof e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())fp(a,f,g,"org.id3",k.value);if(a.A)a.A.onHlsTimedMetadata(e,f)}}function fp(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Oo("metadata",b))}
|
|
650
|
-
function tp(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Zb(function(){b.mode="hidden"})).xc().$(.5);a.md.push(function(){c.stop()})}}q.
|
|
650
|
+
function tp(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Zb(function(){b.mode="hidden"})).xc().$(.5);a.md.push(function(){c.stop()})}}q.Ii=function(){for(var a=this.aa;a.g;)a.release()};q.Cc=function(a){return new Yh(a)};
|
|
651
651
|
function Io(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?Um(b(),!0,e):e()}b||(b=function(){return null});return new ph(function(e,f,g,h){var k=b()?b().i:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(Oo("downloadheadersreceived",f));d(function(){if(a.fa){var h=a.fa;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
|
|
652
652
|
Co(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var p=new Map,r=l.split(";");for(l=1;l<r.length;l++){var u=r[l].split("=");p.set(u[0],Co(u[1]))}var v=p}catch(w){v=null}v&&(h.g=v)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(Oo("downloadfailed",e))},function(e,f,g){d(function(){var h=a.O,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)mo(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
|
|
653
653
|
h.j?bo:ao;break a;case 3:case 2:l=h.j?eo:co;break a;case 5:l="s";break a}l=void 0}h.i=l}mo(h,f,{ot:jo,su:!h.l})}}catch(M){ab("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",M)}break;case Ah:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.U()?"l":"v"};n.ot=qo(k);var p=n.ot===no||n.ot===ho||n.ot===io||n.ot===so,r=k.stream;if(r){var u=h.h.gb();if(p&&(n.bl=uo(h,r.type),n.ot!==so)){var v=vo(h,r.type);n.dl=u?v/Math.abs(u):v}r.bandwidth&&(n.br=r.bandwidth/
|
|
@@ -658,8 +658,8 @@ function vp(a,b){b=new gn(a.ac,a.U()||0<b);b.addEventListener("enter",function(d
|
|
|
658
658
|
function wp(a,b,c){a.N=new Ug;a.N.g=Wg;Xg(a.N,c,Math.min(.5,c/2));Vo(a);a.ge=(new Zb(function(){Kp(a)})).Ra(.25);a.l.D(b,"waiting",function(){return Kp(a)});a.l.D(b,"stalled",function(){return Kp(a)});a.l.D(b,"canplaythrough",function(){return Kp(a)});a.l.D(b,"progress",function(){return Kp(a)})}
|
|
659
659
|
function Kp(a){switch(a.m){case Fp:if(a.h.ended)var b=!0;else{var c=ej(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case sp:a:if(a.h.ended||mk(a.I))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.Xb();var d=ej(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=gj(a.h.buffered,a.h.currentTime);c=a.N;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Vg:Wg;c.g=d;(b=b!=d)&&d===Vg&&(c.h=Date.now());b&&Vo(a)}function lp(a,b,c,d){return new dk(a,b,c,d)}
|
|
660
660
|
function Ho(a){return new Yn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},xb:function(){return a.xb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},gb:function(){return a.gb()},yb:function(){return a.yb()},nc:function(){return a.nc()},U:function(){return a.U()}},a.g.cmcd)}
|
|
661
|
-
function rp(a){return new Ul(a.i,{cd:function(){return a.G?a.G.xd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},gb:function(){return a.gb()},ca:a.I,Mb:a.F,onError:function(b){return To(a,b)},onEvent:function(b){return a.dispatchEvent(b)},
|
|
662
|
-
(new Map).set("start",d).set("end",b).set("contentType",e).set("isMuxed",c);a.dispatchEvent(Oo("segmentappended",d))},
|
|
661
|
+
function rp(a){return new Ul(a.i,{cd:function(){return a.G?a.G.xd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},gb:function(){return a.gb()},ca:a.I,Mb:a.F,onError:function(b){return To(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Ai:function(){a.H&&a.H.update&&a.H.update()},Bf:function(b,c){var d=b.startTime;b=b.endTime;var e=c.type;c=c.codecs.includes(",");if(e!=We){if(a.G){a.G.Jg();var f=nk(a.I,e);!a.U()&&a.h.paused&&null!=f&&0<f&&a.G.xd()<f&&a.G.Ee(f)}Kp(a)}d=
|
|
662
|
+
(new Map).set("start",d).set("end",b).set("contentType",e).set("isMuxed",c);a.dispatchEvent(Oo("segmentappended",d))},zi:function(b,c){(c=c.Lc)&&a.$b&&Jl(a.$b,c,b)},hg:function(b,c){var d=a.B;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){b=new Wh(Ab(c));c=0;for(var e=t(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(0==c)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=t(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,c.set(f,e),e+=f.length;ni(d,"cenc",c);d=
|
|
663
663
|
d.l}}else d=Promise.resolve();return d},onMetadata:function(b,c,d){mp(a,b,c,d)},disableStream:function(b,c){return a.disableStream(b,c)}})}
|
|
664
664
|
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Fm(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(rb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(rb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
|
|
665
665
|
a.streaming&&"useNativeHlsOnSafari"in a.streaming&&(rb("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead."),a.streaming.preferNativeHls=a.streaming.useNativeHlsOnSafari&&oc(),delete a.streaming.useNativeHlsOnSafari);if(a.streaming&&"boolean"==typeof a.streaming.liveSync){rb("streaming.liveSync","Please Use streaming.liveSync.enabled instead.");var c=a.streaming.liveSync;a.streaming.liveSync={};a.streaming.liveSync.enabled=
|
|
@@ -672,17 +672,17 @@ a.streaming.liveSyncPanicThreshold,delete a.streaming.liveSyncPanicThreshold);if
|
|
|
672
672
|
"Please Use liveSync config to keep on live Edge instead."),delete a.manifest.hls.useSafariBehaviorForLive);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2),void 0==a.streaming.updateIntervalSeconds&&(a.streaming.updateIntervalSeconds=.1),void 0==a.streaming.maxDisabledTime&&
|
|
673
673
|
(a.streaming.maxDisabledTime=1),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.dash&&(a.manifest.dash={}),void 0==a.manifest.dash.autoCorrectDrift&&(a.manifest.dash.autoCorrectDrift=!1),void 0==a.manifest.retryParameters&&(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=
|
|
674
674
|
100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&(a.drm.retryParameters.baseDelay=100));c=Sm(this.g,a,Go(this));Lp(this);return c};
|
|
675
|
-
function Lp(a){a.ae=new Ii(a.g,a.ga,a.B);if(a.H){var b=Uc(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.H.configure(b)}a.B&&a.B.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.m!=Po&&Ki(a.ae,a.i)&&ip(a)}catch(e){To(a,e)}a.o&&jp(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Lo(a)}a.F&&(a.F.Pf(a.g.streaming.forceHTTP),a.F.Qf(a.g.streaming.forceHTTPS),a.F.m=a.g.streaming.minBytesForProgressEvents);a.I&&(a.I.configure(a.g.mediaSource),a.I.
|
|
676
|
-
if(a.C)if(b=a.g.textDisplayFactory,a.we!=b){var c=a.C;a.C=b();a.C.configure?a.C.configure(a.g.textDisplayer):rb("Text displayer w/ configure",'Text displayer should have a "configure" method!');a.C.setTextVisibility(c.isTextVisible());c.destroy();if(a.I){c=a.I;var d=a.C;c.
|
|
675
|
+
function Lp(a){a.ae=new Ii(a.g,a.ga,a.B);if(a.H){var b=Uc(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.H.configure(b)}a.B&&a.B.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.m!=Po&&Ki(a.ae,a.i)&&ip(a)}catch(e){To(a,e)}a.o&&jp(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Lo(a)}a.F&&(a.F.Pf(a.g.streaming.forceHTTP),a.F.Qf(a.g.streaming.forceHTTPS),a.F.m=a.g.streaming.minBytesForProgressEvents);a.I&&(a.I.configure(a.g.mediaSource),a.I.ea=a.g.manifest.segmentRelativeVttTiming);
|
|
676
|
+
if(a.C)if(b=a.g.textDisplayFactory,a.we!=b){var c=a.C;a.C=b();a.C.configure?a.C.configure(a.g.textDisplayer):rb("Text displayer w/ configure",'Text displayer should have a "configure" method!');a.C.setTextVisibility(c.isTextVisible());c.destroy();if(a.I){c=a.I;var d=a.C;c.aa=d;c.g&&(c.g.j=d)}a.we=b;a.j&&(b=a.j,(c=b.i.get(We))&&gm(b,c.stream,!0,0,!0))}else a.C.configure&&a.C.configure(a.g.textDisplayer);a.o&&(a.o.configure(a.g.abr),a.g.abr.enabled?a.o.enable():a.o.disable(),Ap(a));a.N&&(b=a.g.streaming.rebufferingGoal,
|
|
677
677
|
a.i&&(b=Math.max(b,a.i.minBufferTime)),Xg(a.N,b,Math.min(.5,b/2)));a.i&&pp(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.A&&a.A.configure(a.g.ads);a.O&&a.O.configure(a.g.cmcd);a.fa&&a.fa.configure(a.g.cmsd)}q.getConfiguration=function(){var a=Go(this);Sm(a,this.g,Go(this));return a};q.xg=function(){var a=Go(this);Sm(a,this.g,Go(this));return Hm(this.g,Go(this))};
|
|
678
|
-
q.tg=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Pb().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};q.
|
|
679
|
-
q.yb=function(){return this.F};q.Hc=function(){return this.ea};q.sg=function(){return this.A?this.A:null};q.U=function(){return this.i?this.i.presentationTimeline.U():this.h&&this.h.src?Infinity==this.h.duration:!1};q.qc=function(){return this.i?this.i.presentationTimeline.qc():!1};q.
|
|
680
|
-
q.Pb=function(){if(this.i){if(!this.Da&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Jb(),end:a.zb()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.
|
|
678
|
+
q.tg=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Pb().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};q.Mi=function(){for(var a in this.g)delete this.g[a];Sm(this.g,Go(this),Go(this));Lp(this)};q.ff=function(){return this.m};q.hf=function(){return this.i?this.i.type:null};q.Th=function(){return this.h};
|
|
679
|
+
q.yb=function(){return this.F};q.Hc=function(){return this.ea};q.sg=function(){return this.A?this.A:null};q.U=function(){return this.i?this.i.presentationTimeline.U():this.h&&this.h.src?Infinity==this.h.duration:!1};q.qc=function(){return this.i?this.i.presentationTimeline.qc():!1};q.ji=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
|
|
680
|
+
q.Pb=function(){if(this.i){if(!this.Da&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Jb(),end:a.zb()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.gi=function(){this.U()&&(this.h.currentTime=this.Pb().end)};q.ki=function(){return this.Da};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.B?this.B.g:null};
|
|
681
681
|
q.bd=function(){return this.B?this.B.bd():Infinity};q.ef=function(){return this.B?this.B.ef():[]};q.Jd=function(){return this.B?this.B.Jd():{}};q.pf=function(){return this.N?this.N.g==Wg:!1};q.gb=function(){return this.h?this.K?this.K.i:1:0};
|
|
682
682
|
q.vd=function(a,b){var c=this;b=void 0===b?!0:b;0==a?$a("A trick play rate of 0 is unsupported!"):(this.Ta.Qa(),this.h.paused&&this.h.play(),this.K.set(a),this.m==sp&&(this.o.playbackRateChanged(a),fm(this.j,b&&1<Math.abs(a))),this.U()&&this.Ta.D(this.h,"timeupdate",function(){var d=c.h.currentTime,e=c.Pb(),f=c.g.streaming.safeSeekOffset;0<a?Math.floor(d)>=Math.floor(e.end)&&c.Vc():Math.floor(d)<=Math.floor(e.start+f)&&c.Vc()}))};
|
|
683
683
|
q.Vc=function(){var a=this.K.mc();this.m==Fp&&this.K.set(a);this.m==sp&&(this.K.set(a),this.o.playbackRateChanged(a),fm(this.j,!1));this.Ta.Qa()};
|
|
684
684
|
q.nc=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,tg(e)){var f=kg(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return sg(g)}):[]};
|
|
685
|
-
q.Ic=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=lg(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Ep(this).map(function(f){return qg(f)}):[]};q.
|
|
685
|
+
q.Ic=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=lg(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Ep(this).map(function(f){return qg(f)}):[]};q.Nh=function(){var a=this.qd;this.i&&(a=this.i.imageStreams);return a.map(function(b){return mg(b)})};
|
|
686
686
|
q.Eh=function(a){var b=this,c,d,e,f;return P(function(g){if(1==g.g){if(b.m!=sp&&b.m!=Fp)return g.return(null);c=b.qd;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):G(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Gb(function(h){var k=Mp(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.jc;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.zg(a,h.startTime+l*m/k))}}),G(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
|
|
687
687
|
function Mp(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{jc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
|
|
688
688
|
q.zg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,D,A;return P(function(B){if(1==B.g){if(c.m!=sp&&c.m!=Fp)return B.return(null);d=c.qd;c.i&&(d=c.i.imageStreams);return(e=d.find(function(C){return C.id==a}))?e.segmentIndex?B.u(2):G(B,e.createSegmentIndex(),2):B.return(null)}f=e.segmentIndex.find(b);if(null==f)return B.return(null);g=e.segmentIndex.get(f);h=Mp(g.tilesLayout||e.tilesLayout);if(!h)return B.return(null);k=e.width||0;l=e.height||0;m=k/h.jc;n=l/h.rows;p=h.jc*h.rows;r=g.j-g.startTime;
|
|
@@ -690,15 +690,15 @@ u=g.B||r/p;v=g.startTime;y=w=0;1<p&&(z=Math.floor((b-g.startTime)/u),v=g.startTi
|
|
|
690
690
|
q.Vg=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(sl(this.s.h,b,!1),im(this.j,b),Np(this),this.Eb=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){var c=Ep(this);b=c.find(function(d){return"disabled"!==d.mode});c=c.find(function(d){return og(d)===a.id});b!==c&&(b&&(b.mode="disabled",this.l.$a(b,"cuechange"),this.C.remove(0,Infinity)),c&&Hp(this,c));Np(this)}};
|
|
691
691
|
function Hp(a,b){a.l.D(b,"cuechange",function(){a.C.remove(0,Math.max(0,a.h.currentTime-a.g.streaming.bufferBehind));var c=Array.from(b.activeCues||[]).map(In).filter(zf);a.C.append(c)});b.mode=document.pictureInPictureElement?"showing":"hidden"}
|
|
692
692
|
q.Mf=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&tg(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&$a("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");qp(this,d,!1,b,c);this.Ea=new Hg(d,
|
|
693
|
-
this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);jp(this)}}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,og(c)==a.id){Op(this,c);break}};q.Gh=function(){return Pp(this.nc())};q
|
|
693
|
+
this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);jp(this)}}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,og(c)==a.id){Op(this,c);break}};q.Gh=function(){return Pp(this.nc())};q.$h=function(){return Pp(this.Ic())};q.Fh=function(){return Array.from(Qp(this.nc()))};q.Zh=function(){return Array.from(Qp(this.Ic()))};
|
|
694
694
|
q.Ug=function(a,b,c,d,e){c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?"":e;if(this.i&&this.G){this.Ea=new Ig(a,b||"",c,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups,e);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;e=this.Ea.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())f=f.value,
|
|
695
695
|
tg(f)&&(!c||a(c,b)>a(f,b))&&(c=f);c!=b&&(c?(a=kg(c),this.Mf(a,!0,d)):Lo(this))}else this.h&&this.h.audioTracks&&(d=vg(this.nc(),a,b||"",!1)[0])&&this.Mf(d)};q.Lf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Eb=a,this.od=b||"",this.nd=c,(a=vg(this.i.textStreams,this.Eb,this.od,this.nd)[0]||null)&&a!=this.j.s&&(sl(this.s.h,a,!1),this.g.streaming.alwaysStreamText||this.rf()))im(this.j,a),Np(this)}else(a=vg(this.Ic(),a,b||"",c)[0])&&this.Vg(a)};
|
|
696
|
-
q.
|
|
696
|
+
q.Si=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.G){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.Ea=new Ig(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),Lo(this,b,c))}else if(this.h&&this.h.audioTracks){c=Array.from(this.h.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&Op(this,b)}};
|
|
697
697
|
q.rf=function(){var a=this.oa;return this.C?this.C.isTextVisible():a};q.ug=function(){return this.h&&this.h.src&&this.h.textTracks?Rp(this).map(function(a){return qg(a)}):[]};
|
|
698
698
|
q.Ih=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=Gf(a),c=Rp(this).filter(function(h){return Gf(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
|
|
699
699
|
function Ep(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Jp(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function Rp(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
|
|
700
700
|
q.ah=function(a){a=!!a;this.oa!=a&&(this.oa=a,this.m==sp?(this.C.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=vg(this.i.textStreams,this.Eb,this.od,this.nd),0<a.length&&(im(this.j,a[0]),Np(this))):em(this.j))):this.h&&this.h.src&&this.h.textTracks&&this.C.setTextVisibility(a),zp(this))};
|
|
701
|
-
q.
|
|
701
|
+
q.Vh=function(){if(this.G)var a=this.G.xd();else{if(null==this.ka)return new Date;a=this.ka}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.m||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};q.yg=function(){if(this.i){var a=this.i.presentationTimeline;return new Date(1E3*(a.m||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};
|
|
702
702
|
q.Ld=function(){return this.U()?this.i?this.i.presentationTimeline.Ld():null:null};q.xb=function(){if(this.m==sp)return this.I.xb();var a={total:[],audio:[],video:[],text:[]};this.m==Fp&&(a.total=hj(this.h.buffered));return a};
|
|
703
703
|
q.getStats=function(){if(this.m!=sp&&this.m!=Fp)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,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],
|
|
704
704
|
stateHistory:[]};np(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&!this.U()){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.G&&(this.s.R=this.G.cg(),this.s.X=this.G.dg());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.O=Number(c.droppedVideoFrames);b.N=d;this.s.L=Number(c.corruptedVideoFrames)}this.B?(c=this.B,c=c.I?c.I:NaN):c=NaN;this.s.s=c;if(this.m==sp){c=this.j.j;b=this.j.s;if(c){d=this.K?this.K.i:1;
|
|
@@ -712,12 +712,13 @@ q.th=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,D;return P(functio
|
|
|
712
712
|
vttOffset:0};l=Ab(f);m=h.parseMedia(l,k,a,[]);n=[];p=t(m);r=p.next();for(u={};!r.done;u={ve:void 0,Dc:void 0},r=p.next())u.Dc=r.value,u.ve=null,v=function(B){return function(){null==B.ve&&(B.ve=Qe([a],[B.Dc.payload]));return B.ve||[]}}(u),w=new Yi(u.Dc.startTime,u.Dc.endTime,v,0,null,null,0,0,Infinity),u.Dc.payload.includes("#xywh")&&(y=u.Dc.payload.split("#xywh=")[1].split(","),4===y.length&&w.bh({height:parseInt(y[3],10),positionX:parseInt(y[0],10),positionY:parseInt(y[1],10),width:parseInt(y[2],
|
|
713
713
|
10)})),n.push(w);z=b;if(!n.length){A.u(5);break}return G(A,Bn(n[0].M()[0],c.F,c.g.manifest.retryParameters),6);case 6:z=A.h;case 5:return D={id:c.ag++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new gl(n),mimeType:z||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.De,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,
|
|
714
714
|
spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([af(z||"","")])},c.m==Fp?c.qd.push(D):c.i.imageStreams.push(D),ip(c),A.return(mg(D))}})};
|
|
715
|
-
q.rh=function(a,b,c){var d=this,e,f,g,h;return P(function(k){switch(k.g){case 1:if(d.m!=sp&&d.m!=Fp)throw new T(1,7,7004);if(c){k.u(2);break}return G(k,Sp(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),G(k,Tp(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.ug();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return G(k,new Promise(function(l,m){d.l.
|
|
715
|
+
q.rh=function(a,b,c){var d=this,e,f,g,h;return P(function(k){switch(k.g){case 1:if(d.m!=sp&&d.m!=Fp)throw new T(1,7,7004);if(c){k.u(2);break}return G(k,Sp(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),G(k,Tp(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.ug();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return G(k,new Promise(function(l,m){d.l.ra(f,"load",l);d.l.ra(f,"error",function(){m(new T(1,2,2015))})}),6);case 6:return ip(d),k.return(h);case 5:throw new T(1,
|
|
716
716
|
2,2012);}})};function Sp(a,b){var c;return P(function(d){switch(d.g){case 1:return va(d,2),G(d,Bn(b,a.F,a.g.streaming.retryParameters),4);case 4:c=d.h;xa(d,3);break;case 2:ya(d);case 3:if(c)return d.return(c);throw new T(1,2,2011,b);}})}
|
|
717
717
|
function Tp(a,b,c,d,e,f,g){var h,k,l,m;return P(function(n){if(1==n.g)return"text/vtt"!=e||g.length?G(n,Up(a,b,a.F,a.g.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=Vp(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=gk(l),e="text/vtt");m=document.createElement("track");var p=a.O,r=b;try{if(p.g.enabled){var u=go(p);u.ot=to;u.su=!0;var v=ko(u);var w=lo(r,v)}else w=r}catch(y){ab("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",y),w=r}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
|
|
718
718
|
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function Up(a,b,c,d){var e,f,g;return P(function(h){if(1==h.g){e=Ah;f=uh([b],d);f.method="GET";var k=a.O;try{k.g.enabled&&mo(k,f,{ot:to,su:!0})}catch(l){ab("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return G(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
|
|
719
|
-
function Vp(a,b,c,d){var e=qf[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Ab(b),b=c.parseMedia(b,a,null,[]),Xn(b,d);throw new T(2,2,2014,c);}q.
|
|
720
|
-
q.gf=function(){$a("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.
|
|
719
|
+
function Vp(a,b,c,d){var e=qf[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Ab(b),b=c.parseMedia(b,a,null,[]),Xn(b,d);throw new T(2,2,2014,c);}q.Xi=function(a,b){this.ga.width=a;this.ga.height=b};q.Jf=function(a){if(this.m==sp){var b=this.j;a=void 0===a?.1:a;if(b.m.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.gd||d.La||d.vb||(d.gd=!1,dm(b,d,a));b=!0}}else b=!1;return b};
|
|
720
|
+
q.gf=function(){$a("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.Qh=function(){return this.bb};
|
|
721
|
+
q.Lh=function(){var a={video:null,audio:null,text:null};if(this.m!=sp)return a;var b=this.j.j,c=this.h.currentTime;b=t([b.video,b.audio,this.j.s]);for(var d=b.next();!d.done;d=b.next())if((d=d.value)&&d.segmentIndex){var e=d.segmentIndex.find(c);e=d.segmentIndex.get(e);e={codecs:e.codecs||d.codecs,mimeType:e.mimeType||d.mimeType,bandwidth:e.bandwidth||d.bandwidth};"video"==d.type?(e.width=d.width,e.height=d.height,a.video=e):"audio"==d.type?a.audio=e:d.type==We&&(a.text=e)}return a};
|
|
721
722
|
function Go(a){var b=Om();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Jf(d))}};b.textDisplayFactory=function(){if(a.ee){var c=a.getConfiguration();return new On(a.h,a.ee,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new Jn(a.h,"Shaka Player TextTrack"):new Ln};return b}q.fh=function(a){this.ee=a};
|
|
722
723
|
function ep(a,b){for(var c=new Set,d=t(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=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(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 jl,l=e.closedCaptions.get(g);h={id:a.ag++,originalId:g,groupId:null,
|
|
723
724
|
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:We,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([af(h,"")])};b.textStreams.push(h);c.add(g)}}
|
|
@@ -744,17 +745,17 @@ function hp(a,b,c,d){d=void 0===d?!1:d;b=(new Map).set("mediaQuality",{bandwidth
|
|
|
744
745
|
function So(a,b){b=void 0===b?!0:b;if(!a.h.error)return b?new T(2,3,3016):null;var c=a.h.error.code;if(!b&&1==c)return null;if(b=a.h.error.msExtendedCode)0>b&&(b+=Math.pow(2,32)),b=b.toString(16);return new T(2,3,3016,c,b,a.h.error.message)}function pp(a,b,c){0<b&&(a.U()||a.eh(b));b=a.getDuration();c<b&&(a.U()||a.Za(c))}function Wp(a,b){P(function(c){if(1==c.g)return G(c,Promise.resolve(),2);a.m!=Po&&a.dispatchEvent(b);H(c)})}
|
|
745
746
|
function Qp(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Gf(c.language)):b.add("und");return b}
|
|
746
747
|
function Pp(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Gf(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
|
|
747
|
-
h.push({language:l,role:m,label:n})}});return h}S("shaka.Player",X);X.prototype.addFont=X.prototype.addFont;X.prototype.setVideoContainer=X.prototype.fh;X.prototype.getManifestParserFactory=X.prototype.
|
|
748
|
-
X.prototype.
|
|
749
|
-
X.prototype.
|
|
750
|
-
X.prototype.getVariantTracks=X.prototype.nc;X.prototype.cancelTrickPlay=X.prototype.Vc;X.prototype.trickPlay=X.prototype.vd;X.prototype.getPlaybackRate=X.prototype.gb;X.prototype.isBuffering=X.prototype.pf;X.prototype.getKeyStatuses=X.prototype.Jd;X.prototype.getActiveSessionsMetadata=X.prototype.ef;X.prototype.getExpiration=X.prototype.bd;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;
|
|
751
|
-
X.prototype.
|
|
752
|
-
X.prototype.
|
|
753
|
-
X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.xh;X.prototype.attach=X.prototype.Sb;
|
|
748
|
+
h.push({language:l,role:m,label:n})}});return h}S("shaka.Player",X);X.prototype.addFont=X.prototype.addFont;X.prototype.setVideoContainer=X.prototype.fh;X.prototype.getFetchedPlaybackInfo=X.prototype.Lh;X.prototype.getManifestParserFactory=X.prototype.Qh;X.prototype.getManifest=X.prototype.gf;X.prototype.retryStreaming=X.prototype.Jf;X.prototype.setMaxHardwareResolution=X.prototype.Xi;X.prototype.addChaptersTrack=X.prototype.rh;X.prototype.addThumbnailsTrack=X.prototype.th;
|
|
749
|
+
X.prototype.addTextTrackAsync=X.prototype.sh;X.prototype.getStats=X.prototype.getStats;X.prototype.getBufferedInfo=X.prototype.xb;X.prototype.getSegmentAvailabilityDuration=X.prototype.Ld;X.prototype.getPresentationStartTimeAsDate=X.prototype.yg;X.prototype.getPlayheadTimeAsDate=X.prototype.Vh;X.prototype.setTextTrackVisibility=X.prototype.ah;X.prototype.getChapters=X.prototype.Ih;X.prototype.getChaptersTracks=X.prototype.ug;X.prototype.isTextTrackVisible=X.prototype.rf;
|
|
750
|
+
X.prototype.selectVariantsByLabel=X.prototype.Si;X.prototype.selectTextLanguage=X.prototype.Lf;X.prototype.selectAudioLanguage=X.prototype.Ug;X.prototype.getTextLanguages=X.prototype.Zh;X.prototype.getAudioLanguages=X.prototype.Fh;X.prototype.getTextLanguagesAndRoles=X.prototype.$h;X.prototype.getAudioLanguagesAndRoles=X.prototype.Gh;X.prototype.selectVariantTrack=X.prototype.Mf;X.prototype.selectTextTrack=X.prototype.Vg;X.prototype.getThumbnails=X.prototype.zg;X.prototype.getAllThumbnails=X.prototype.Eh;
|
|
751
|
+
X.prototype.getImageTracks=X.prototype.Nh;X.prototype.getTextTracks=X.prototype.Ic;X.prototype.getVariantTracks=X.prototype.nc;X.prototype.cancelTrickPlay=X.prototype.Vc;X.prototype.trickPlay=X.prototype.vd;X.prototype.getPlaybackRate=X.prototype.gb;X.prototype.isBuffering=X.prototype.pf;X.prototype.getKeyStatuses=X.prototype.Jd;X.prototype.getActiveSessionsMetadata=X.prototype.ef;X.prototype.getExpiration=X.prototype.bd;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;
|
|
752
|
+
X.prototype.isFullyLoaded=X.prototype.ki;X.prototype.goToLive=X.prototype.gi;X.prototype.seekRange=X.prototype.Pb;X.prototype.isAudioOnly=X.prototype.ji;X.prototype.isInProgress=X.prototype.qc;X.prototype.isLive=X.prototype.U;X.prototype.getAdManager=X.prototype.sg;X.prototype.getAssetUri=X.prototype.Hc;X.prototype.getNetworkingEngine=X.prototype.yb;X.prototype.getMediaElement=X.prototype.Th;X.prototype.getManifestType=X.prototype.hf;X.prototype.getLoadMode=X.prototype.ff;
|
|
753
|
+
X.prototype.resetConfiguration=X.prototype.Mi;X.prototype.getBufferFullness=X.prototype.tg;X.prototype.getNonDefaultConfiguration=X.prototype.xg;X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.Ii;X.prototype.destroyAllPreloads=X.prototype.Pe;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.og;X.prototype.unloadAndSavePreload=X.prototype.$i;X.prototype.load=X.prototype.load;
|
|
754
|
+
X.prototype.updateStartTime=X.prototype.dj;X.prototype.unload=X.prototype.fc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.xh;X.prototype.attach=X.prototype.Sb;
|
|
754
755
|
X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return P(function(k){switch(k.g){case 1:b={};if(!a){k.u(2);break}return G(k,Fi(),3);case 3:b=k.h;case 2:var l={};if($b())for(var m in Ri)l[m]=!0;m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,l[n]=$b()?!!Ri[n]:ac(n);c=l;m='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(x(bf));
|
|
755
756
|
l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=pf(n)?!0:$b()?mb(n)||(ke(n)?!0:!1):ac(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return G(k,Bc(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=Yp;for(h in g)f[h]=g[h]();return k.return(f)}})};
|
|
756
757
|
X.isBrowserSupported=function(){window.Promise||$a("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||gc("Trident/"))return!1;var a=uc();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:$b()?!0:ac("application/x-mpegurl")};X.setAdManagerFactory=function(a){Jo=a};
|
|
757
|
-
X.registerSupportPlugin=function(a,b){Yp[a]=b};X.prototype.destroy=X.prototype.destroy;var Po=0,Fo=1,sp=2,Fp=3;X.LoadMode={DESTROYED:Po,NOT_LOADED:Fo,MEDIA_SOURCE:sp,SRC_EQUALS:Fp};X.version="v4.11.
|
|
758
|
+
X.registerSupportPlugin=function(a,b){Yp[a]=b};X.prototype.destroy=X.prototype.destroy;var Po=0,Fo=1,sp=2,Fp=3;X.LoadMode={DESTROYED:Po,NOT_LOADED:Fo,MEDIA_SOURCE:sp,SRC_EQUALS:Fp};X.version="v4.11.8";var Zp=["4","11"];sb=new function(a){this.g=a;this.i=tb;this.h=ub}(new qb(Number(Zp[0]),Number(Zp[1])));var Yp={},Jo=null;function $p(){this.g=[];this.i=this.l=this.j=this.h=0}function aq(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function bq(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new gb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=bq.prototype;q.needsSkipUI=function(){return!1};q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
|
|
758
759
|
q.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.h.getAdSkippableState()};q.skip=function(){return this.h.skip()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.resume()};q.getVolume=function(){return this.h.getVolume()};q.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
|
|
759
760
|
q.isMuted=function(){return 0==this.h.getVolume()};q.isLinear=function(){return this.g.isLinear()};q.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
|
|
760
761
|
q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
|
|
@@ -767,12 +768,12 @@ function dq(a,b){var c=[],d=0;null!=b&&(d=b);a=t(ed(a,"Ad"));for(var e=a.next();
|
|
|
767
768
|
0)-(parseInt(k.attributes.height,10)||0)});g=t(g);for(h=g.next();!h.done;h=g.next())if(h=fd(h.value)){c.push({id:null,startTime:d,endTime:null,uri:h,isSkippable:null!=f,skipOffset:f,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:null==b,post:Infinity==b,timelineRange:!1});break}}}}return c}S("shaka.ads.Utils",cq);cq.ADS_LOADED="ads-loaded";cq.AD_STARTED="ad-started";cq.AD_FIRST_QUARTILE="ad-first-quartile";cq.AD_MIDPOINT="ad-midpoint";cq.AD_THIRD_QUARTILE="ad-third-quartile";
|
|
768
769
|
cq.AD_COMPLETE="ad-complete";cq.AD_STOPPED="ad-stopped";cq.AD_SKIPPED="ad-skipped";cq.AD_VOLUME_CHANGED="ad-volume-changed";cq.AD_MUTED="ad-muted";cq.AD_PAUSED="ad-paused";cq.AD_RESUMED="ad-resumed";cq.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";cq.CUEPOINTS_CHANGED="ad-cue-points-changed";cq.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";cq.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";cq.AD_CLICKED="ad-clicked";cq.AD_PROGRESS="ad-progress";cq.AD_BUFFERING="ad-buffering";
|
|
769
770
|
cq.AD_IMPRESSION="ad-impression";cq.AD_DURATION_CHANGED="ad-duration-changed";cq.AD_CLOSED="ad-closed";cq.AD_LOADED="ad-loaded";cq.ALL_ADS_COMPLETED="all-ads-completed";cq.AD_LINEAR_CHANGED="ad-linear-changed";cq.AD_METADATA="ad-metadata";cq.AD_RECOVERABLE_ERROR="ad-recoverable-error";cq.AD_ERROR="ad-error";cq.AD_BREAK_READY="ad-break-ready";cq.AD_INTERACTION="ad-interaction";cq.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";cq.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";
|
|
770
|
-
cq.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function eq(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.F=!1;this.A=this.o=null;this.G=NaN;this.l=e;this.j=null;this.h=new gb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.s,this.i);this.C.initialize();this.m=new google.ima.AdsLoader(this.C);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.11.
|
|
771
|
-
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){fq(f,g)});this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){gq(f,g)});this.h.D(this.i,"ended",function(){f.m.contentComplete()});this.h.
|
|
771
|
+
cq.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function eq(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.F=!1;this.A=this.o=null;this.G=NaN;this.l=e;this.j=null;this.h=new gb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.s,this.i);this.C.initialize();this.m=new google.ima.AdsLoader(this.C);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.11.8");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.m,
|
|
772
|
+
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){fq(f,g)});this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){gq(f,g)});this.h.D(this.i,"ended",function(){f.m.contentComplete()});this.h.ra(this.i,"play",function(){f.F=!0})}eq.prototype.configure=function(a){this.o=a};eq.prototype.stop=function(){this.g&&this.g.stop();this.s&&Nn(this.s)};
|
|
772
773
|
eq.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.C.destroy()};function gq(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new V("ad-error",b));hq(a,null);a.l(new V("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
|
|
773
774
|
function fq(a,b){a.l(new V("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.o.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.B);a.l(new V("ima-ad-manager-loaded",(new Map).set("imaAdManager",
|
|
774
775
|
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.l(new V("ad-cue-points-changed",(new Map).set("cuepoints",b)))}iq(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,jq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,jq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
|
|
775
|
-
a.i.offsetHeight,jq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,jq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.F||a.o.skipPlayDetection?a.g.start():a.h.
|
|
776
|
+
a.i.offsetHeight,jq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,jq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.F||a.o.skipPlayDetection?a.g.start():a.h.ra(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){hq(a,null)}}
|
|
776
777
|
function jq(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
|
|
777
778
|
function iq(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new V(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){gq(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){kq(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){kq(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
|
|
778
779
|
function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){hq(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){hq(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
|
|
@@ -799,8 +800,8 @@ function pq(a,b,c,d,e,f){f=void 0===f?0:f;var g,h,k,l,m,n,p,r,u,v,w,y,z,D,A;P(fu
|
|
|
799
800
|
E.g)return"detach"!=C.state?E.u(0):xc()?G(E,new Promise(function(F){return(new Zb(F)).$(.1)}),3):E.u(3);h.resolve();a.j.$a(a.B,"onstatechange",k);H(E)})};a.j.D(a.B,"onstatechange",k);return G(B,h,2);case 2:return a.o||(a.h.pause(),null!=b.resumeOffset&&0!=b.resumeOffset&&(a.h.currentTime+=b.resumeOffset)),l=!1,m=null,n=function(){if(!a.o&&null==b.resumeOffset)if(b.timelineRange&&b.endTime&&Infinity!=b.endTime)a.h.currentTime!=b.endTime&&(a.h.currentTime=b.endTime);else{var C=Date.now();a.h.currentTime+=
|
|
800
801
|
(C-e)/1E3;e=C}},p=function(){var C,E;return P(function(F){if(1==F.g)return n(),m&&m.stop(),(C=oq(a,b.pre,d-f))?(a.g(new V("ad-stopped")),a.j.Qa(),pq(a,C,c,++d,e,f),F.u(0)):a.o?G(F,a.i.detach(),4):G(F,a.i.fc(),4);a.o&&(E=b.resumeOffset,null==E&&(E=b.timelineRange&&b.endTime&&Infinity!=b.endTime?b.endTime-(a.l||0):(Date.now()-e)/1E3),a.g(new V("ad-content-resume-requested",(new Map).set("offset",E))));a.g(new V("ad-stopped"));a.j.Qa();a.I=!1;a.o||(n(),a.h.ended||a.h.play());H(F)})},r=function(C){return P(function(E){if(l)return E.return();
|
|
801
802
|
l=!0;a.g(new V("ad-error",(new Map).set("originalEvent",C)));return G(E,p(),0)})},u=function(){return P(function(C){if(1==C.g){if(l)return C.return();l=!0;return G(C,p(),2)}a.g(new V("ad-complete"));H(C)})},v=function(){return P(function(C){if(l)return C.return();l=!0;a.g(new V("ad-skipped"));return G(C,p(),0)})},w=new lq(a.m,b.isSkippable,b.skipOffset,v,c,d),a.o||(w.setMuted(a.h.muted),w.setVolume(a.h.volume)),a.g(new V("ad-started",(new Map).set("ad",w))),w.canSkipNow()&&a.g(new V("ad-skip-state-changed")),
|
|
802
|
-
y=new Set,a.j.
|
|
803
|
-
a.j.
|
|
803
|
+
y=new Set,a.j.ra(a.i,"error",r),a.j.D(a.m,"timeupdate",function(){var C=a.m.duration;C&&(b.isSkippable&&b.skipOffset&&w.canSkipNow()&&0<w.getRemainingTime()&&0<w.getDuration()&&a.g(new V("ad-skip-state-changed")),C=100*a.m.currentTime/C,25<=C&&!y.has("firstquartile")?(n(),a.g(new V("ad-first-quartile")),y.add("firstquartile")):50<=C&&!y.has("midpoint")?(n(),a.g(new V("ad-midpoint")),y.add("midpoint")):75<=C&&!y.has("thirdquartile")&&(n(),a.g(new V("ad-third-quartile")),y.add("thirdquartile")))}),
|
|
804
|
+
a.j.ra(a.i,"complete",u),a.j.D(a.m,"play",function(){a.g(new V("ad-resumed"))}),a.j.D(a.m,"pause",function(){a.g(new V("ad-paused"))}),a.j.D(a.m,"volumechange",function(){a.m.muted?a.g(new V("ad-muted")):a.g(new V("ad-volume-changed"))}),va(B,4),b.playoutLimit&&(m=(new Zb(function(){w.skip()})).$(b.playoutLimit)),nq(a),G(B,a.i.Sb(a.m),6);case 6:return a.s.has(b)?G(B,a.s.get(b),10):G(B,a.i.load(b.uri),8);case 10:return z=B.h,a.s.delete(b),z?G(B,a.i.load(z),8):G(B,a.i.load(b.uri),8);case 8:D=(Date.now()-
|
|
804
805
|
g)/1E3;a.g(new V("ads-loaded",(new Map).set("loadTime",D)));a.o&&a.h.play();xa(B,0);break;case 4:A=ya(B),r(A),H(B)}})}
|
|
805
806
|
function sq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,D,A,B,C,E,F,J,K,L,I,O,M,N,Q,R;return P(function(U){switch(U.g){case 1:c=[];if(!b)return U.return(c);d=b.values.find(function(aa){return"X-ASSET-URI"==aa.key});e=b.values.find(function(aa){return"X-ASSET-LIST"==aa.key});if(!d&&!e)return U.return(c);f=null;if(g=b.values.find(function(aa){return"ID"==aa.key}))f=g.data;h=b.values.find(function(aa){return"X-RESTRICT"==aa.key});l=k=!0;h&&h.data&&(m=h.data,k=!m.includes("SKIP"),l=!m.includes("JUMP"));
|
|
806
807
|
n=null;if(p=b.values.find(function(aa){return"X-RESUME-OFFSET"==aa.key}))r=p.data,n=parseFloat(r),isNaN(n)&&(n=null);u=null;if(v=b.values.find(function(aa){return"X-PLAYOUT-LIMIT"==aa.key}))w=v.data,u=parseFloat(w),isNaN(u)&&(u=null);D=z=y=!1;if(A=b.values.find(function(aa){return"CUE"==aa.key}))B=A.data,y=B.includes("ONCE"),z=B.includes("PRE"),D=B.includes("POST");C=!1;(E=b.values.find(function(aa){return"X-TIMELINE-OCCUPIES"==aa.key}))?(F=E.data,C=F.includes("RANGE")):!p&&a.B.U()&&(C=!z&&!D);if(d){J=
|
|
@@ -843,13 +844,13 @@ e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was
|
|
|
843
844
|
var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new V("ad-first-quartile"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new V("ad-midpoint"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new V("ad-third-quartile"))});
|
|
844
845
|
this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new V("ad-complete"));e.i(new V("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new V("ad-skipped"));e.i(new V("ad-stopped"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.C=
|
|
845
846
|
f;e.i(new V("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}q=Iq.prototype;q.configure=function(){};q.stop=function(){this.B="";this.o=null;this.C=[]};q.release=function(){this.stop();this.h&&this.h.release()};q.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};q.getCuePoints=function(){return this.C};
|
|
846
|
-
function Jq(a,b){a.i(new V("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){mh.call(this);this.g=this.i=this.j=this.h=null;this.m=new $p;this.o=navigator.language;this.l=null}
|
|
847
|
+
function Jq(a,b){a.i(new V("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){mh.call(this);this.g=this.i=this.j=this.h=null;this.m=new $p;this.o=navigator.language;this.l=null}pa(Y,mh);q=Y.prototype;q.setLocale=function(a){this.o=a};q.configure=function(a){this.l=a;this.h&&this.h.configure(this.l);this.j&&this.j.configure(this.l);this.g&&this.g.configure(this.l)};q.initInterstitial=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new mq(a,b,c,function(e){return Kq(d,e)});this.h.configure(this.l)};
|
|
847
848
|
q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new T(2,10,1E4);this.j&&this.j.release();this.j=new eq(a,b,this.o,c,function(e){return Kq(d,e)});this.j.configure(this.l)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);mh.prototype.release.call(this)};
|
|
848
849
|
q.onAssetUnload=function(){this.h&&this.h.stop();this.j&&this.j.stop();this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new V("ad-stopped"));this.dispatchEvent(new V("ad-content-attach-requested"));this.m=new $p};q.requestClientSideAds=function(a){if(!this.j)throw new T(1,10,10001);var b=this.j;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.G=Date.now()/1E3;b.m.requestAds(a)};
|
|
849
850
|
q.updateClientSideAdsRenderingSettings=function(a){if(!this.j)throw new T(1,10,10001);var b=this.j;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};q.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new wq(a,b,c,function(e){return Kq(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new T(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new ah,zq(d,a,b),d.H=c||"",d.R=Date.now()/1E3,a=d.l);return a};
|
|
850
851
|
q.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new T(1,10,10005);var b=this.i;b.G=a;b.i(new V("ads-loaded",(new Map).set("loadTime",0)))};q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.g&&this.g.release();this.g=new Iq(a,b,this.o,function(d){return Kq(c,d)});this.g.configure(this.l)};
|
|
851
|
-
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&$a('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.11.
|
|
852
|
-
(c.G=!0),c.j=new ah,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&$a('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.11.
|
|
852
|
+
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&$a('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.11.8";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
|
|
853
|
+
(c.G=!0),c.j=new ah,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&$a('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.11.8";this.g.g.replaceAdTagParameters(a)};
|
|
853
854
|
q.getServerSideCuePoints=function(){rb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};q.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:aq(a),started:a.h,playedCompletely:a.j,skipped:a.l,errors:a.i}};q.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
|
|
854
855
|
q.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};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)};q.onHLSInterstitialMetadata=function(a,b,c){this.h||this.initInterstitial(null,a,b);this.h&&rq(this.h,c)};
|
|
855
856
|
q.onDASHInterstitialMetadata=function(a,b,c){if("urn:mpeg:dash:event:alternativeMPD:2022"==c.schemeIdUri&&(this.h||this.initInterstitial(null,a,b),this.h)){a=this.h;b=t(c.eventNode.children);for(var d=b.next();!d.done;d=b.next()){var e=d.value;if("AlternativeMPD"==e.tagName&&(d=e.attributes.uri,e=e.attributes.mode,d)){var f=d;var g=e;break}}f?(b="replace"==g,g="insert"==g,(b||g)&&tq(a,[{id:null,startTime:c.startTime,endTime:b?c.endTime:null,uri:f,isSkippable:!1,skipOffset:null,canJump:!0,resumeOffset:g?
|
|
@@ -871,13 +872,13 @@ p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},pla
|
|
|
871
872
|
q.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.xc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(ar),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new ah;d.s=!0;er(d,e)}},function(b){for(var c=t(ar),d=c.next();!d.done;d=c.next())d=d.value,fr="available"==b,d.l.xc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});fr&&this.l.$(gr);(a=cr)&&
|
|
872
873
|
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new ah,this.s=!0,er(this,a)):cr=null}else window.__onGCastApiAvailable!==hr&&(ir=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=hr)};q.Nf=function(a){this.o=a;this.h&&jr(this,{type:"appData",appData:this.o})};
|
|
873
874
|
q.cast=function(){var a=this;return P(function(b){if(!a.m)throw new T(1,8,8E3);if(!fr)throw new T(1,8,8001);if(a.h)throw new T(1,8,8002);a.j=new ah;chrome.cast.requestSession(function(c){return er(a,c)},function(c){return kr(a,c)});return G(b,a.j,0)})};function lr(a){a.h&&chrome.cast.requestSession(function(b){return er(a,b)},function(b){return kr(a,b)})}q.Gc=function(){if(this.h){br(this);if(cr){dr(this);try{cr.stop(function(){},function(){})}catch(a){}cr=null}$q(this)}};
|
|
874
|
-
q.get=function(a,b){var c=this;if("video"==a){if(Rq.includes(b))return function(){return c.Rg.apply(c,[a,b].concat(x(Ja.apply(0,arguments))))}}else if("player"==a){if(Uq[b]&&!this.get("player","isLive")())return function(){};if(Xq.includes(b))return function(){return c.Rg.apply(c,[a,b].concat(x(Ja.apply(0,arguments))))};if(Yq.includes(b))return function(){return c.
|
|
875
|
+
q.get=function(a,b){var c=this;if("video"==a){if(Rq.includes(b))return function(){return c.Rg.apply(c,[a,b].concat(x(Ja.apply(0,arguments))))}}else if("player"==a){if(Uq[b]&&!this.get("player","isLive")())return function(){};if(Xq.includes(b))return function(){return c.Rg.apply(c,[a,b].concat(x(Ja.apply(0,arguments))))};if(Yq.includes(b))return function(){return c.Ji.apply(c,[a,b].concat(x(Ja.apply(0,arguments))))};if(Sq[b]||Tq[b])return function(){return c.g[a][b]}}return this.g[a][b]};
|
|
875
876
|
q.set=function(a,b,c){this.g[a][b]=c;jr(this,{type:"set",targetName:a,property:b,value:c})};function er(a,b){var c=a.N();cr=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);$q(a);jr(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function kr(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new T(2,8,c,b))}
|
|
876
|
-
q.Rg=function(a,b){jr(this,{type:"call",targetName:a,methodName:b,args:Ja.apply(2,arguments)})};q.
|
|
877
|
+
q.Rg=function(a,b){jr(this,{type:"call",targetName:a,methodName:b,args:Ja.apply(2,arguments)})};q.Ji=function(a,b){var c=Ja.apply(2,arguments),d=new ah,e=this.H.toString();this.H++;this.i[e]=d;try{jr(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function dr(a){var b=cr;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
|
|
877
878
|
function $q(a){var b=cr?"connected"==cr.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};br(a)}a.h=b;a.I=b?cr.receiver.friendlyName:"";a.l.xc()}function br(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new T(1,7,7E3))}}function jr(a,b){b=Lq(b);var c=cr;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},cb)}catch(d){throw b=new T(2,8,8005,d),c=new V("error",(new Map).set("detail",b)),a.A("player",c),a.Gc(),b;}}var gr=.02,fr=!1,cr=null,ir=null,ar=new Set;
|
|
878
|
-
function hr(a){ir?window.__onGCastApiAvailable=ir:delete window.__onGCastApiAvailable;ir=null;if(a)for(var b=t(ar),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function mr(a,b,c,d){d=void 0===d?!1:d;mh.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.B=d;this.A=new Map;this.g=new Zq(c,function(){return nr(e)},function(){return or(e)},function(f,g){return pr(e,f,g)},function(){return qr(e)},function(){return rr(e)},d);sr(this)}
|
|
879
|
-
q.destroy=function(a){a&&this.g.Gc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;mh.prototype.release.call(this);return Promise.all(a)};q.
|
|
880
|
-
q.cast=function(){var a=this;return P(function(b){return 1==b.g?G(b,a.g.cast(),2):a.h?G(b,a.h.fc(),0):b.return()})};q.Nf=function(a){this.g.Nf(a)};q.
|
|
879
|
+
function hr(a){ir?window.__onGCastApiAvailable=ir:delete window.__onGCastApiAvailable;ir=null;if(a)for(var b=t(ar),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function mr(a,b,c,d){d=void 0===d?!1:d;mh.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.B=d;this.A=new Map;this.g=new Zq(c,function(){return nr(e)},function(){return or(e)},function(f,g){return pr(e,f,g)},function(){return qr(e)},function(){return rr(e)},d);sr(this)}pa(mr,mh);q=mr.prototype;
|
|
880
|
+
q.destroy=function(a){a&&this.g.Gc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;mh.prototype.release.call(this);return Promise.all(a)};q.ei=function(){return this.l};q.Uh=function(){return this.s};q.yh=function(){return this.g.m&&fr};q.hb=function(){return this.g.hb()};q.Gf=function(){return this.g.Gf()};
|
|
881
|
+
q.cast=function(){var a=this;return P(function(b){return 1==b.g?G(b,a.g.cast(),2):a.h?G(b,a.h.fc(),0):b.return()})};q.Nf=function(a){this.g.Nf(a)};q.Zi=function(){lr(this.g)};q.Gc=function(){this.g.Gc()};
|
|
881
882
|
q.zh=function(a,b){b=void 0===b?!1:b;var c=this;return P(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.Gc();return G(d,c.g.destroy(),2)}c.g=null;c.g=new Zq(a,function(){return nr(c)},function(){return or(c)},function(e,f){return pr(c,e,f)},function(){return qr(c)},function(){return rr(c)},b);c.g.init();H(d)})};
|
|
882
883
|
function sr(a){a.g.init();a.m=new gb;for(var b=t(Oq),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.hb()||(f=kh(f),a.j.dispatchEvent(f))});for(var d in lh)a.m.D(a.h,lh[d],function(f){a.g.hb()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b={ld:b.ld},b.ld=e,Object.defineProperty(a.l,b.ld,{configurable:!1,enumerable:!0,get:function(f){return function(){return tr(a,f.ld)}}(b),set:function(f){return function(g){var h=f.ld;a.g.hb()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.s={};ur(a,
|
|
883
884
|
function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return vr(a,f)}})});wr(a);a.j=new mh;a.j.oe=a.l;a.o=new mh;a.o.oe=a.s}function wr(a){var b=new Map;ur(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.A.set(c,d):a.A.set(d,c)):b.set(d,c)})}
|
|
@@ -889,9 +890,9 @@ d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(Qq),m=l.ne
|
|
|
889
890
|
function tr(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.hb()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.hb()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
|
|
890
891
|
function vr(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.yb()};if("getDrmEngine"==b)return function(){return a.h.B};if("getAdManager"==b)return function(){return a.h.sg()};
|
|
891
892
|
if("setVideoContainer"==b)return function(c){return a.h.fh(c)};if(a.g.hb()){if("getManifest"==b||"drmInfo"==b)return function(){$a(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){$a(b+"() does not work while casting!");return Promise.resolve()}}return a.g.hb()&&0==Object.keys(a.g.g.video).length&&(Sq[b]||Tq[b])||!a.g.hb()?a.h[b].bind(a.h):a.g.get("player",b)}
|
|
892
|
-
function pr(a,b,c){a.g.hb()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}S("shaka.cast.CastProxy",mr);mr.prototype.changeReceiverId=mr.prototype.zh;mr.prototype.forceDisconnect=mr.prototype.Gc;mr.prototype.suggestDisconnect=mr.prototype.
|
|
893
|
-
mr.prototype.getVideo=mr.prototype.
|
|
894
|
-
q.
|
|
893
|
+
function pr(a,b,c){a.g.hb()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}S("shaka.cast.CastProxy",mr);mr.prototype.changeReceiverId=mr.prototype.zh;mr.prototype.forceDisconnect=mr.prototype.Gc;mr.prototype.suggestDisconnect=mr.prototype.Zi;mr.prototype.setAppData=mr.prototype.Nf;mr.prototype.cast=mr.prototype.cast;mr.prototype.receiverName=mr.prototype.Gf;mr.prototype.isCasting=mr.prototype.hb;mr.prototype.canCast=mr.prototype.yh;mr.prototype.getPlayer=mr.prototype.Uh;
|
|
894
|
+
mr.prototype.getVideo=mr.prototype.ei;mr.prototype.destroy=mr.prototype.destroy;function xr(a,b,c,d){mh.call(this);var e=this;this.g=a;this.h=b;this.j=new gb;this.H={video:a,player:b};this.F=c||function(){};this.I=d||function(f){return f};this.i=null;this.G=!1;this.o=!0;this.m=0;this.B=!1;this.A=!0;this.s=this.l=null;this.C=new Zb(function(){yr(e)});zr(this)}pa(xr,mh);q=xr.prototype;q.isConnected=function(){return this.G};q.li=function(){return this.o};q.Vi=function(a){this.i=a};q.Bh=function(){this.i=null};
|
|
895
|
+
q.Wi=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.Ui=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Ti=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
|
|
895
896
|
q.destroy=function(){var a=this,b,c;return P(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.C&&(a.C.stop(),a.C=null),a.g=null,a.H=null,a.F=null,a.G=!1,a.o=!0,a.l=null,a.s=null,mh.prototype.release.call(a),G(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();H(d)})};
|
|
896
897
|
function zr(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Ar(a)};b.onSenderDisconnected=function(){return Ar(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Br(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Br(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return Cr(a,
|
|
897
898
|
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Dr(a,e)};b.start();b=t(Oq);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return Er(a,"video",e)});for(var d in lh)a.j.D(a.h,lh[d],function(e){return Er(a,"player",e)});a.j.D(a.g,"loadeddata",function(){a.B=!0});a.j.D(a.h,"loading",function(){a.o=!1;Fr(a)});a.j.D(a.g,"playing",function(){a.o=!1;Fr(a)});a.j.D(a.g,"pause",function(){Fr(a)});a.j.D(a.h,"unloading",function(){a.o=!0;Fr(a)});
|
|
@@ -905,7 +906,7 @@ function Dr(a,b){var c=Mq(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0
|
|
|
905
906
|
function Cr(a,b){var c=Mq(b.data);switch(c.type){case "PLAY":a.g.play();Ir(a);break;case "PAUSE":a.g.pause();Ir(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Ir(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Ir(a));break;case "STOP":a.h.fc().then(function(){a.h&&Ir(a)});break;case "GET_STATUS":Lr(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
|
|
906
907
|
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Ir(a);break;case "LOAD":a.m=0;a.B=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.I(b.contentId);f=c.autoplay||!0;a.F(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Lr(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Br(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:Br(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
|
|
907
908
|
function Mr(a,b,c,d){a.h&&Br(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Br(a,b,c,d){a.G&&(a=Lq(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Ir(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Nr:a.h.pf()?Or:a.g.paused?Pr:Qr,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Br(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
|
|
908
|
-
S("shaka.cast.CastReceiver",xr);xr.prototype.destroy=xr.prototype.destroy;xr.prototype.setContentArtist=xr.prototype.
|
|
909
|
+
S("shaka.cast.CastReceiver",xr);xr.prototype.destroy=xr.prototype.destroy;xr.prototype.setContentArtist=xr.prototype.Ti;xr.prototype.setContentImage=xr.prototype.Ui;xr.prototype.setContentTitle=xr.prototype.Wi;xr.prototype.clearContentMetadata=xr.prototype.Bh;xr.prototype.setContentMetadata=xr.prototype.Vi;xr.prototype.isIdle=xr.prototype.li;xr.prototype.isConnected=xr.prototype.isConnected;var Kr=.5,Gr=5,Nr="IDLE",Qr="PLAYING",Or="BUFFERING",Pr="PAUSED";function Rr(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Sr(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],r=-1,u=-1,v=0;v<p.length;v++)if(null!=p[v]&&""!==p[v].g.trim()){r=v;break}for(v=p.length-1;0<=v;v--)if(null!=p[v]&&""!==p[v].g.trim()){u=v;break}if(-1===
|
|
909
910
|
r||-1===u)p=Tr(d,e),a.nestedCues.push(p);else{for(;r<=u;r++)if(v=p[r]){var w=v.l,y=v.i,z=v.j,D=v.h;if(w!=h||y!=k||z!=l||D!=m)n.payload&&a.nestedCues.push(n),n=Sr(d,e,w,y,z,D),h=w,k=y,l=z,m=D;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Tr(d,e),a.nestedCues.push(n));n=Sr(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}function Sr(a,b,c,d,e,f){a=new Ed(a,b,"");c&&a.textDecoration.push(ce);d&&(a.fontStyle=be);a.color=e;a.backgroundColor=f;return a}
|
|
910
911
|
function Tr(a,b){a=new Ed(a,b,"");a.lineBreak=!0;return a}function Ur(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Vr(a,b){this.i=[];this.g=1;this.h=0;this.C=a;this.B=b;this.j=this.m=!1;this.l="white";this.o="black";this.s=this.A=null;Wr(this)}function Xr(a,b,c){var d="CC"+((a.C<<1|a.B)+1),e=new Ed(b,c,"");e.lineInterpretation=1;var f=Yr.get(a.g);f&&(e.line=f);null!=a.s&&null!=a.A&&(e.position=10+Math.min(70,10*a.s)+2.5*a.A);(b=Rr(e,d,a.i,b,c))&&15<a.g+b.cue.nestedCues.length-3&&(f=Yr.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function Wr(a){Zr(a,0,15);a.g=1}
|
|
911
912
|
function $r(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case 0:d=as.has(c)?as.get(c):String.fromCharCode(c);break;case 1:d=bs.get(c);break;case 2:a.i[a.g].pop();d=cs.get(c);break;case 3:a.i[a.g].pop(),d=ds.get(c)}d&&a.i[a.g].push(new Ur(d,a.m,a.j,a.o,a.l))}}function es(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Zr(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
|
|
@@ -913,7 +914,7 @@ var as=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u0
|
|
|
913
914
|
[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),ds=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],[39,"\u00d5"],[40,"\u00f5"],
|
|
914
915
|
[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),Yr=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function fs(a,b){this.h=0;this.o=new Vr(a,b);this.i=new Vr(a,b);this.g=this.j=new Vr(a,b);this.l=0;this.m=null}function gs(a,b,c){a.g=a.i;var d=a.g,e=null;3!==a.h&&4!==a.h&&(e=Xr(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,Zr(c,0,15),c=a.j,c.g=0<c.h?c.h:0,Zr(c,0,15),d.g=15);a.h=3;d.h=b;return e}function hs(a){a.h=1;a.g=a.j;a.g.h=0}function is(a){ab("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=4}var js="black green blue cyan red yellow magenta black".split(" "),ks="white green blue cyan red yellow magenta white_italics".split(" ");function ls(a,b){this.I=b;this.N=a;this.K=this.l=!1;this.m=this.o=this.G=this.L=this.H=0;this.F=2;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.s="black";ms(this)}function ms(a){a.i=[];for(var b=0;16>b;b++)a.i.push(ns())}function ns(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function os(a,b){ps(a)&&(a.i[a.h][a.g]=new Ur(b,a.C,a.A,a.s,a.B),a.g++)}function ps(a){var b=a.g<a.m&&0<=a.g;return a.h<a.o&&0<=a.h&&b}ls.prototype.isVisible=function(){return this.l};
|
|
915
916
|
function qs(a,b,c){var d=new Ed(a.j,b,"");d.textAlign=0===a.F?"left":1===a.F?"right":Gd;var e=d.region;a.I&&(e.id+="svc"+a.I);e.id+="win"+a.N;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?Lb:2;switch(a.G){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX=
|
|
916
|
-
50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=Rr(d,"svc"+c,a.i,a.j,b))a.j=b;return c}ls.prototype.display=function(){this.l=!0};function rs(){this.i=[];this.h=null;this.g=0}function ss(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new ts(a.h)),a.h=null,a.g=0))}function ts(a){this.g=0;this.h=a}ts.prototype.
|
|
917
|
+
50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=Rr(d,"svc"+c,a.i,a.j,b))a.j=b;return c}ls.prototype.display=function(){this.l=!0};function rs(){this.i=[];this.h=null;this.g=0}function ss(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new ts(a.h)),a.h=null,a.g=0))}function ts(a){this.g=0;this.h=a}ts.prototype.qa=function(){return this.g<this.h.length};ts.prototype.xa=function(){return this.g};function us(a){if(!a.qa())throw new T(2,2,3E3);return a.h[a.g++]}ts.prototype.skip=function(a){if(this.g+a>this.h.length)throw new T(2,2,3E3);this.g+=a};function vs(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
|
|
917
918
|
function ws(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=us(b).value;b=null;c=t(xs(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=qs(e,d,a.i)),ms(e);return b}if(137===c)for(b=us(b).value,b=t(xs(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.display();else{if(138===c){c=us(b).value;b=null;c=t(xs(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=qs(e,d,a.i)),e.l=!1;return b}if(139===c){c=us(b).value;
|
|
918
919
|
b=null;c=t(xs(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=qs(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=us(b).value,ys(a,b,d);if(143===c)return d=ys(a,255,d),zs(a),d;if(144===c)b.skip(1),d=us(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=us(b).value,c=us(b).value,b.skip(1),a.g&&(b=As((c&48)>>4,(c&12)>>2,c&3),a.g.B=As((d&48)>>4,(d&12)>>2,d&3),a.g.s=b);else if(146===c)d=us(b).value,b=us(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
|
|
919
920
|
b.skip(1),d=us(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new ls(c,a.i);f.j=d;a.h[c]=f}d=us(b).value;f=us(b).value;var g=us(b).value,h=us(b).value,k=us(b).value;b=us(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.L=f&127;b.H=g;b.G=(h&240)>>4;b.K=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null}
|
|
@@ -926,7 +927,7 @@ function Fs(a,b){var c=b.type;if(16===(b.cb&112)){var d=b.cb>>3&1;0===c?a.o=d:a.
|
|
|
926
927
|
null;var g=95<a?a-96:a-64;13>=g?d=ks[Math.floor(g/2)]:15>=g?e=!0:f=Math.floor((g-16)/2);a=1===(a&1);4!==c.h&&(g=c.g,3===c.h&&b!==g.g&&(c=1+b-g.h,es(g,c,1+g.g-g.h,g.h),Zr(g,0,c-1),Zr(g,b+1,15-b)),g.g=b,g.m=a,g.j=e,g.l=d,g.s=f,g.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",$r(c.g,0,32),d=!1,b=ks[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=js[(a&
|
|
927
928
|
14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))$r(c.g,1,a);else if(18===(d&246)&&32===(a&224))$r(c.g,d&1?3:2,a);else{if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.Cb){case 32:hs(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=gs(c,2,a);break;case 38:d=gs(c,3,a);break;case 39:d=gs(c,4,a);break;case 40:$r(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Wr(c.o);is(c);break;case 43:is(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=Xr(b,c.l,a));Zr(b,0,15);break;case 45:b=
|
|
928
929
|
c.g;3!==c.h?d=null:(d=Xr(b,c.l,a),e=b.g-b.h+1,es(b,e-1,e,b.h),Zr(b,0,e-1),Zr(b,b.g,15-b.g),c.l=a);break;case 46:Zr(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=Xr(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,hs(c),c.l=a,d=b}e=d;break a}(23==d||31==d)&&33<=a&&35>=a&&(c.g.A=a-32)}e=null}else a=b.Cb,$r(c.g,0,b.cb),$r(c.g,0,a);return e}
|
|
929
|
-
function Gs(a,b){var c=[];try{for(;b.
|
|
930
|
+
function Gs(a,b){var c=[];try{for(;b.qa();){var d=us(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=us(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new vs(e));for(var g=a.j.get(e),h=b.xa();b.xa()-h<f;){e=g;var k=b,l=us(k),m=l.value,n=l.pts;if(16===m){var p=us(k);m=m<<16|p.value}if(0<=m&&31>=m){k=e;var r=m,u=n;if(k.g){var v=k.g;e=null;switch(r){case 8:!ps(v)||0>=v.g&&0>=v.h||(0>=v.g?(v.g=v.m-1,v.h--):v.g--,v.i[v.h][v.g]=null);break;case 13:v.isVisible()&&(e=qs(v,u,k.i));if(v.h+1>=v.o){k=
|
|
930
931
|
v;r=0;for(u=1;16>u;u++,r++)k.i[r]=k.i[u];for(u=0;1>u;u++,r++)k.i[r]=ns()}else v.h++;v.g=0;break;case 14:v.isVisible()&&(e=qs(v,u,k.i));v.i[v.h]=ns();v.g=0;break;case 12:v.isVisible()&&(e=qs(v,u,k.i)),ms(v),k=v,k.h=0,k.g=0}var w=e}else w=null}else if(128<=m&&159>=m)w=ws(e,k,m,n);else{if(4096<=m&&4127>=m)e=k,k=m&255,8<=k&&15>=k?e.skip(1):16<=k&&23>=k?e.skip(2):24<=k&&31>=k&&e.skip(3);else if(4224<=m&&4255>=m)e=k,k=m&255,128<=k&&135>=k?e.skip(4):136<=k&&143>=k&&e.skip(5);else if(32<=m&&127>=m)k=m,e.g&&
|
|
931
932
|
(127===k?os(e.g,"\u266a"):os(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&os(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(Cs.has(k)){var y=Cs.get(k);os(e.g,y)}else os(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?os(e.g,"_"):os(e.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(z){if(z instanceof T&&3E3===z.code)ab("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw z;}return c}
|
|
932
933
|
function Hs(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}Ds.prototype.getStreams=function(){return Array.from(this.A)};S("shaka.cea.CeaDecoder",Ds);Jb=function(){return new Ds};function Is(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(x(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function Js(){this.j=new Map;this.i=this.h=0;this.g=Ks}
|
|
@@ -934,11 +935,11 @@ Js.prototype.init=function(a){function b(f){f=f.name;f in Ls&&(c.g=Ls[f])}var c=
|
|
|
934
935
|
function(f){f=sj(f.reader,f.version);e.push(f.timescale)}).box("minf",Qh).box("stbl",Qh).S("stsd",Sh).box("avc1",b).box("avc3",b).box("dvav",b).box("dva1",b).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("vvc1",b).box("vvi1",b).box("dvc1",b).box("dvi1",b).box("encv",Th).box("sinf",Qh).box("frma",function(f){f=vj(f.reader).codec;f in Ls&&(c.g=Ls[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new T(2,2,2010);this.g==Ks&&$a("Unable to determine bitstream format for CEA parsing!");
|
|
935
936
|
d.forEach(function(f,g){c.j.set(f,e[g])})};
|
|
936
937
|
Js.prototype.parse=function(a){var b=this;if(this.g==Ks)return[];var c=[],d=0,e=[];(new Lh).box("moof",function(f){d=f.start;e=[];Qh(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,$c:b.h,Gd:b.i,Mg:[],timescale:9E4});Qh(f)}).S("trun",function(f){var g=e[e.length-1];f=tj(f.reader,f.version,f.flags);g.Mg.push(f)}).S("tfhd",function(f){var g=e[e.length-1];f=qj(f.reader,f.flags);g.$c=f.$c||b.h;g.Gd=f.Gd||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).S("tfdt",function(f){var g=e[e.length-
|
|
937
|
-
1];f=rj(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.
|
|
938
|
-
function Ms(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Tg});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Dh);b.
|
|
938
|
+
1];f=rj(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.xa(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw $a("Unable to find base media decode time for CEA captions!"),new T(2,2,2010);f.reader.seek(h);Ms(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.$c,l.Gd,g,l.Mg,c)}}).parse(a,!1);return c};
|
|
939
|
+
function Ms(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Tg});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Dh);b.qa();){g=b.P();var p=b.T(),r=null;r=!1;h=1;switch(a.g){case Ns:r=p&31;r=6==r;break;case Os:h=2;b.skip(1);r=p>>1&63;r=39==r||40==r;break;case Ps:h=2;b.skip(1);r=p>>1&63;r=23==r||24==r;break;default:return}if(r)for(p=0,l<n.length&&(p=n[l].ke||0),p=(c+p)/d,h=t(Is(b.sb(g-h))),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:p});else try{b.skip(g-
|
|
939
940
|
h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?c+(n[l].Kf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",Js);var Ks=0,Ns=1,Os=2,Ps=3,Ls={avc1:Ns,avc3:Ns,dvav:Ns,dva1:Ns,hev1:Os,hvc1:Os,dvh1:Os,dvhe:Os,vvc1:Ps,vvi1:Ps,dvc1:Ps,dvi1:Ps};Ib["video/mp4"]=function(){return new Js};function Qs(){this.g=null}Qs.prototype.init=function(){};Qs.prototype.parse=function(a){this.g?this.g.clearData():this.g=new Rj;var b=[];a=Ab(a);if(!Zj(a))return b;a=this.g.parse(a);var c=a.ad(),d=a.Md();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(Is(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
|
|
940
941
|
S("shaka.cea.TsCeaParser",Qs);Ib["video/mp2t"]=function(){return new Qs};function Rs(a,b,c){var d=Ss(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new T(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Rc});if(1<f.length)throw new T(2,4,4050);f.length&&(g=Ts(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Rc}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Rc?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
|
|
941
|
-
l.Rc});f.length&&(a=Us(e,k,f,c,h),0==a.length&&(a=[Re("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Re(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{mg:h,
|
|
942
|
+
l.Rc});f.length&&(a=Us(e,k,f,c,h),0==a.length&&(a=[Re("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Re(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{mg:h,fk:e,drmInfos:a,Fe:g,rg:!0}}
|
|
942
943
|
function Vs(a,b,c,d){var e=Rs(a,c,d);if(b.rg){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.rg=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new T(2,4,4008);return e.mg||b.mg}
|
|
943
944
|
function Ws(a){var b=0,c=Fb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Ab(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Xs(a){a=t(hd(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.children){b=t(b.children);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"LA_URL"==c.tagName)return fd(c)}return""}
|
|
944
945
|
function Ys(a){var b=jd(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=fd(b)))return b;a=jd(a.node,"urn:microsoft:playready","pro");if(!a||!fd(a))return"";a=fd(a);a=Me(a);a=Ws(a).filter(function(c){return c.type===Zs})[0];if(!a)return"";a=Ec(a.value,!0);return(a=Xc(a,"WRMHEADER"))?Xs(a):""}
|
|
@@ -946,49 +947,49 @@ function Us(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=
|
|
|
946
947
|
172,227,60,30,82,226,251,75]),p=new Uint8Array([]);l=[{initData:Xh(p,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=Re(h,b,g.init||a||k||l);if(h=$s.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function Ss(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=at(c.value))&&b.push(c);return b}
|
|
947
948
|
function at(a){var b=a.attributes.schemeIdUri,c=md(a,"urn:mpeg:cenc:2013","default_KID"),d=kd(a,"urn:mpeg:cenc:2013","pssh").map(gd),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new T(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:Me(g),keyId:null}})}catch(g){throw new T(2,4,4007);}return{node:a,Rc:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
|
|
948
949
|
function Ts(a){if(!window.crypto||!window.crypto.subtle)throw $a("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var b=jd(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new T(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new T(2,4,4051);b=jd(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new T(2,4,4051);a=b.attributes.IV;b=Lc(b.attributes.keyUriTemplate);
|
|
949
|
-
if(!a||!b)throw new T(2,4,4051);a=Ne(a.substr(2));if(16!=a.byteLength)throw new T(2,4,4048);return{
|
|
950
|
+
if(!a||!b)throw new T(2,4,4051);a=Ne(a.substr(2));if(16!=a.byteLength)throw new T(2,4,4048);return{ri:b,iv:a}}
|
|
950
951
|
var Zs=1,$s=(new Map).set("com.widevine.alpha",function(a){var b=jd(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=fd(b))?b:(a=jd(a.node,"urn:microsoft","laurl"))?Lc(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",Ys).set("com.microsoft.playready.recommendation",Ys).set("com.microsoft.playready.software",Ys).set("com.microsoft.playready.hardware",Ys).set("org.w3.clearkey",function(a){var b=jd(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=fd(b))?b:(a=jd(a.node,"http://dashif.org/guidelines/clearKey",
|
|
951
952
|
"Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=fd(a))?a:""});function bt(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&$a("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
|
|
952
953
|
break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
|
|
953
954
|
function ct(a,b){var c=dt(a,b,"timescale"),d=1;c&&(d=sd(c)||1);c=dt(a,b,"duration");(c=sd(c||""))&&(c/=d);var e=dt(a,b,"startNumber"),f=Number(dt(a,b,"presentationTimeOffset"))||0,g=td(e||"");if(null==e||null==g)g=1;e=null;if(b=et(a,b,"SegmentTimeline")){b=ed(b,"S");e=d;a=a.ha.duration||Infinity;for(var h=g,k=[],l=-f,m=0;m<b.length;++m){var n=b[m],p=b[m+1],r=ld(n,"t",td),u=ld(n,"d",td),v=ld(n,"r",rd);n=ld(n,"k",rd)||0;null!=r&&(r-=f);if(u){r=null!=r?r:l;v=v||0;if(0>v)if(p){p=ld(p,"t",td);if(null==
|
|
954
|
-
p)break;else if(r>=p)break;v=Math.ceil((p-r)/u)-1}else{if(Infinity==a)break;else if(r/e>=a)break;v=Math.ceil((a*e-r)/u)-1}0<k.length&&r!=l&&(k[k.length-1].end=r/e);for(p=0;p<=v;++p)l=r+u,k.push({start:r/e,end:l/e,Zf:r,Ab:n,
|
|
955
|
+
p)break;else if(r>=p)break;v=Math.ceil((p-r)/u)-1}else{if(Infinity==a)break;else if(r/e>=a)break;v=Math.ceil((a*e-r)/u)-1}0<k.length&&r!=l&&(k[k.length-1].end=r/e);for(p=0;p<=v;++p)l=r+u,k.push({start:r/e,end:l/e,Zf:r,Ab:n,Ri:k.length+h}),r=l}}e=k}return{timescale:d,Ma:c,ud:g,Ob:f/d||0,Yf:f,timeline:e}}function ft(a,b){return[b(a.J),b(a.ia),b(a.na)].filter(zf)}function dt(a,b,c){b=ft(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
|
|
955
956
|
function et(a,b,c){b=ft(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=id(d.value,c));d=b.next());return a}
|
|
956
|
-
function gt(a,b,c,d,e,f){for(var g=md(a,"http://www.w3.org/1999/xlink","href"),h=md(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=$c("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return
|
|
957
|
+
function gt(a,b,c,d,e,f){for(var g=md(a,"http://www.w3.org/1999/xlink","href"),h=md(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=$c("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return ch(new T(2,4,4028));if("onLoad"!=h)return ch(new T(2,4,4027));var p=Qe([d],[g]);return e.request(0,uh(p,b)).Aa(function(r){r=Wc(r.data,a.tagName);if(!r)return ch(new T(2,4,4001,g));for(a.children=
|
|
957
958
|
[];r.children.length;){var u=r.children.shift();a.children.push(u)}u=t(Object.keys(r.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=r.attributes[v];return ht(a,b,c,p[0],e,f+1)})}
|
|
958
959
|
function ht(a,b,c,d,e,f){f=void 0===f?0:f;if(md(a,"http://www.w3.org/1999/xlink","href")){var g=gt(a,b,c,d,e,f);c&&(g=g.Aa(void 0,function(){return ht(a,b,c,d,e,f)}));return g}g=[];for(var h=t(dd(a)),k=h.next(),l={};!k.done;l={Wc:void 0},k=h.next())l.Wc=k.value,"urn:mpeg:dash:resolve-to-zero:2013"==md(l.Wc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Wc}}(l)):"SegmentTimeline"!=l.Wc.tagName&&g.push(ht(l.Wc,b,c,d,e,f));return ih(g).Aa(function(){return a})}
|
|
959
960
|
;function it(a,b,c,d,e,f,g){var h,k=(new Lh).S("sidx",function(l){h=jt(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new T(2,3,3004);}
|
|
960
|
-
function jt(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.P();if(0==k)throw new T(2,3,3005);if(0==g.version){var l=g.reader.P();var m=g.reader.P()}else l=g.reader.Qc(),m=g.reader.Qc();g.reader.skip(2);var n=g.reader.la();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.P(),r=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.P();g.reader.skip(4);if(1==r)throw new T(2,3,3006);h.push(new Yi(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();return h};function kt(a){this.h=Fb(a);this.g=new Ih(this.h,0)}kt.prototype.
|
|
961
|
-
function lt(a){var b=mt(a);if(7<b.length)throw new T(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=mt(a);a:{d=t(nt);for(var e=d.next();!e.done;e=d.next())if(yb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.
|
|
962
|
-
d)}function mt(a){var b=a.g.
|
|
963
|
-
function pt(a){if(8<a.g.byteLength)throw new T(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new T(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function qt(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new kt(a.g);for(var n=null,p=null;a.
|
|
964
|
-
function rt(a){var b=new kt(a.g);a=lt(b);if(179!=a.id)throw new T(2,3,3013);a=pt(a);b=lt(b);if(183!=b.id)throw new T(2,3,3012);b=new kt(b.g);for(var c=0;b.
|
|
961
|
+
function jt(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.P();if(0==k)throw new T(2,3,3005);if(0==g.version){var l=g.reader.P();var m=g.reader.P()}else l=g.reader.Qc(),m=g.reader.Qc();g.reader.skip(2);var n=g.reader.la();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.P(),r=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.P();g.reader.skip(4);if(1==r)throw new T(2,3,3006);h.push(new Yi(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();return h};function kt(a){this.h=Fb(a);this.g=new Ih(this.h,0)}kt.prototype.qa=function(){return this.g.qa()};
|
|
962
|
+
function lt(a){var b=mt(a);if(7<b.length)throw new T(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=mt(a);a:{d=t(nt);for(var e=d.next();!e.done;e=d.next())if(yb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.xa();else{if(8==b.length&&b[1]&224)throw new T(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.xa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.xa();d=Fb(a.h,a.g.xa(),b);a.g.skip(b);return new ot(c,
|
|
963
|
+
d)}function mt(a){var b=a.g.xa(),c=a.g.T();if(0==c)throw new T(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ab(a.h,b,c)}var nt=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function ot(a,b){this.id=a;this.g=b}
|
|
964
|
+
function pt(a){if(8<a.g.byteLength)throw new T(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new T(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function qt(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new kt(a.g);for(var n=null,p=null;a.qa();){var r=lt(a);if(187==r.id){var u=rt(r);u&&(r=c*u.cj,u=b+u.Hi,null!=n&&m.push(new Yi(n+g,r+g,l,p,u-1,f,g,h,k)),n=r,p=u)}}null!=n&&m.push(new Yi(n+g,d+g,l,p,null,f,g,h,k));return m}
|
|
965
|
+
function rt(a){var b=new kt(a.g);a=lt(b);if(179!=a.id)throw new T(2,3,3013);a=pt(a);b=lt(b);if(183!=b.id)throw new T(2,3,3012);b=new kt(b.g);for(var c=0;b.qa();){var d=lt(b);if(241==d.id){c=pt(d);break}}return{cj:a,Hi:c}};function st(a,b,c){b=et(a,b,"Initialization");if(!b)return null;var d=a.J.Ja(),e=b.attributes.sourceURL;e&&(d=Qe(d,[Lc(e)],a.mb()));e=0;var f=null;if(b=ld(b,"range",qd))e=b.start,f=b.end;c=new Wi(function(){return d},e,f,tt(a),null,null,c);c.codecs=a.J.codecs;c.mimeType=a.J.mimeType;return c}
|
|
965
966
|
function ut(a,b,c){var d=Number(dt(a,vt,"presentationTimeOffset"))||0,e=dt(a,vt,"timescale"),f=1;e&&(f=sd(e)||1);var g=d/f||0,h=st(a,vt,c);wt(a,h);var k=Vc(a);return{lc:function(){var l=et(k,vt,"RepresentationIndex");var m=k.J.Ja();l&&(l=Lc(l.attributes.sourceURL))&&(m=Qe(m,[l],k.mb()));l=xt(k);return yt(k,b,h,m,l.start,l.end,g)}}}
|
|
966
967
|
function yt(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,y,z,D,A,B,C,E,F;return P(function(J){if(1==J.g)return h=a.presentationTimeline,k=!a.wb||!a.ha.qf,l=a.ha.start,m=a.ha.duration,n=a.J.mimeType.split("/")[1],p=b,r=null,u=[p(d,e,f,!1),"webm"==n?p(c.M(),c.Ha,c.va,!0):null],p=null,G(J,Promise.all(u),2);v=J.h;w=v[0];y=v[1]||null;z=null;D=l-g;A=l;B=m?l+m:Infinity;if("mp4"==n)var K=it(w,e,d,c,D,A,B);else{K=w;var L=new kt(y);if(440786851!=lt(L).id)throw new T(2,3,3008);var I=lt(L);if(408125543!=I.id)throw new T(2,
|
|
967
|
-
3,3009);L=I.g.byteOffset;I=new kt(I.g);for(var O=null;I.
|
|
968
|
+
3,3009);L=I.g.byteOffset;I=new kt(I.g);for(var O=null;I.qa();){var M=lt(I);if(357149030==M.id){O=M;break}}if(!O)throw new T(2,3,3010);O=new kt(O.g);M=1E6;for(I=null;O.qa();){var N=lt(O);if(2807729==N.id)M=pt(N);else if(17545==N.id)if(4==N.g.byteLength)I=N.g.getFloat32(0);else if(8==N.g.byteLength)I=N.g.getFloat64(0);else throw new T(2,3,3003);}if(null==I)throw new T(2,3,3011);O=M/1E9;I*=O;K=lt(new kt(K));if(475249515!=K.id)throw new T(2,3,3007);K=qt(K,L,O,I,d,c,D,A,B)}z=K;C=t(z);for(E=C.next();!E.done;E=
|
|
968
969
|
C.next())F=E.value,F.codecs=a.J.codecs,F.mimeType=a.J.mimeType,F.bandwidth=a.bandwidth;h.rd(z);r=new gl(z);k&&r.Fc(A,B,!0);return J.return(r)})}function vt(a){return a.Tc}function xt(a){var b=et(a,vt,"RepresentationIndex");a=dt(a,vt,"indexRange");a=qd(a||"");b&&(a=ld(b,"range",qd,a));return a}function wt(a,b){zt(a,b);if(!xt(a))throw new T(2,4,4002);}
|
|
969
970
|
function zt(a,b){var c=a.J.mimeType.split("/")[1];if(a.J.contentType!=We&&"mp4"!=c&&"webm"!=c)throw new T(2,4,4006);if("webm"==c&&!b)throw new T(2,4,4005);}
|
|
970
971
|
function tt(a){var b=a.J;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.$d,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.ia.label||null,roles:a.roles||null,language:a.ia.language||null}};function At(a,b,c){var d=st(a,Bt,c),e=Ct(a);if(!e.Ma&&!e.timeline&&1<e.Mc.length)throw new T(2,4,4002);if(!e.Ma&&!a.ha.duration&&!e.timeline&&1==e.Mc.length)throw new T(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new T(2,4,4002);var f=null,g=null;a.na.id&&a.J.id&&(g=b[a.na.id+","+a.J.id])&&(f=g.segmentIndex);var h=Dt(a.ha.start,a.ha.duration,a.J.Ja,e,d,c,a.J.mimeType,a.J.codecs,a.bandwidth,a.mb);b=!f;f?f.pd(h,a.presentationTimeline.ob()):f=new gl(h);a.presentationTimeline.rd(h);a.wb&&a.ha.qf||
|
|
971
972
|
f.Fc(a.ha.start,a.ha.duration?a.ha.start+a.ha.duration:Infinity,b);g&&(g.segmentIndex=f);return{lc:function(){f&&0!=f.getNumReferences()||f.Wd(h);return Promise.resolve(f)}}}function Bt(a){return a.Qb}function Ct(a){var b=Et(a);a=ct(a,Bt);var c=a.ud;0==c&&(c=1);var d=0;a.Ma?d=a.Ma*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Ma:a.Ma,startTime:d,ud:c,Ob:a.Ob,timeline:a.timeline,Mc:b}}
|
|
972
|
-
function Dt(a,b,c,d,e,f,g,h,k,l){var m=d.Mc.length;d.timeline&&d.timeline.length!=d.Mc.length&&(m=Math.min(d.timeline.length,d.Mc.length));for(var n=a-d.Ob,p=b?a+b:Infinity,r=[],u=d.startTime,v={},w=0;w<m;v={se:void 0,le:void 0},w++){v.le=d.Mc[w];var y=u;u=void 0;u=null!=d.Ma?y+d.Ma:d.timeline?d.timeline[w].end:y+b;v.se=null;v=new Yi(a+y,a+u,function(z){return function(){null==z.se&&(z.se=Qe(c(),[z.le.
|
|
973
|
-
g;v.bandwidth=k;r.push(v)}return r}function Et(a){return[a.J.Qb,a.ia.Qb,a.na.Qb].filter(zf).map(function(b){return ed(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.lf&&(a.lf=!0);var c=Lc(b.attributes.media);b=ld(b,"mediaRange",qd,{start:0,end:null});return{
|
|
973
|
+
function Dt(a,b,c,d,e,f,g,h,k,l){var m=d.Mc.length;d.timeline&&d.timeline.length!=d.Mc.length&&(m=Math.min(d.timeline.length,d.Mc.length));for(var n=a-d.Ob,p=b?a+b:Infinity,r=[],u=d.startTime,v={},w=0;w<m;v={se:void 0,le:void 0},w++){v.le=d.Mc[w];var y=u;u=void 0;u=null!=d.Ma?y+d.Ma:d.timeline?d.timeline[w].end:y+b;v.se=null;v=new Yi(a+y,a+u,function(z){return function(){null==z.se&&(z.se=Qe(c(),[z.le.xi],l()));return z.se}}(v),v.le.start,v.le.end,e,n,a,p,[],"",null,null,aj,f);v.codecs=h;v.mimeType=
|
|
974
|
+
g;v.bandwidth=k;r.push(v)}return r}function Et(a){return[a.J.Qb,a.ia.Qb,a.na.Qb].filter(zf).map(function(b){return ed(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.lf&&(a.lf=!0);var c=Lc(b.attributes.media);b=ld(b,"mediaRange",qd,{start:0,end:null});return{xi:c,start:b.start,end:b.end}})};function Ft(a,b,c,d,e,f,g,h,k){k||a.J.Pd||(a.J.Pd=dt(a,Gt,"initialization"));var l=a.J.Pd?Ht(a,g):null,m=It(a);Jt(m);var n=Vc(a);if(m.hd)return zt(a,l),{lc:function(){var w=bt(m.hd,n.J.id,null,null,n.bandwidth||null,null);w=Qe(n.J.Ja(),[w]);return yt(n,b,l,w,0,null,m.Ob)}};if(m.Ma)return d||"image"===a.ia.contentType||(c=a.ha.start,d=a.na.id,k=a.ha.duration,d=(d=null!=d&&f[d]||k)?c+d:Infinity,a.presentationTimeline.yf(m.Ma),a.presentationTimeline.Kg(c,d)),{lc:function(){return Kt(n,m,e,l,f,g,h,a.J.me)}};
|
|
974
975
|
var p=null;d=d=null;a.na.id&&a.J.id&&(d=a.na.id+","+a.J.id,d=c[d])&&(p=d.segmentIndex);var r=a.ha.start,u=a.ha.duration?r+a.ha.duration:Infinity,v=!(a.wb&&a.ha.qf);p?(c=p,Lt(c,m,r,u,v,l),c.Ga(a.presentationTimeline.ob())):p=new Mt(m,a.J.id,a.bandwidth,a.J.Ja,a.mb,r,u,l,v,g,a.J.me);m.timeline&&"image"!==a.ia.contentType&&a.presentationTimeline.Lg(m.timeline,r);d&&a.wb&&(d.segmentIndex=p);return{lc:function(){p instanceof Mt&&0==p.getNumReferences()&&Lt(p,m,r,u,v,l);return Promise.resolve(p)}}}
|
|
975
|
-
function Gt(a){return a.dc}function It(a){var b=ct(a,Gt),c=dt(a,Gt,"media"),d=dt(a,Gt,"index"),e=dt(a,Gt,"k"),f=0;e&&(f=parseInt(e,10));return{Ma:b.Ma,timescale:b.timescale,ud:b.ud,Ob:b.Ob,Yf:b.Yf,timeline:b.timeline,bc:c&&Lc(c),hd:d,mimeType:a.J.mimeType,codecs:a.J.codecs,bandwidth:a.bandwidth,
|
|
976
|
-
function Kt(a,b,c,d,e,f,g,h){function k(O){var M=(O-w)*v,N=M+b.Ob,Q=M+p;M=Q+v;var R=Math.min(M,m()),U=[],aa=b.
|
|
977
|
-
|
|
976
|
+
function Gt(a){return a.dc}function It(a){var b=ct(a,Gt),c=dt(a,Gt,"media"),d=dt(a,Gt,"index"),e=dt(a,Gt,"k"),f=0;e&&(f=parseInt(e,10));return{Ma:b.Ma,timescale:b.timescale,ud:b.ud,Ob:b.Ob,Yf:b.Yf,timeline:b.timeline,bc:c&&Lc(c),hd:d,mimeType:a.J.mimeType,codecs:a.J.codecs,bandwidth:a.bandwidth,yi:f}}function Jt(a){var b=a.hd?1:0;b+=a.timeline?1:0;b+=a.Ma?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.hd&&(a.timeline=null),a.Ma=null);if(!a.hd&&!a.bc)throw new T(2,4,4002);}
|
|
977
|
+
function Kt(a,b,c,d,e,f,g,h){function k(O){var M=(O-w)*v,N=M+b.Ob,Q=M+p;M=Q+v;var R=Math.min(M,m()),U=[],aa=b.yi;if(aa)for(var fa=(R-Q)/aa,qa={},Aa=0;Aa<aa;qa={hh:void 0},Aa++){var Ha=Q+fa*Aa,Ya=Ha+fa;qa.hh=Aa+1;qa=new Yi(Ha,Ya,function(Pa){return function(){var ra=N*y;"BigInt"in window&&ra>Number.MAX_SAFE_INTEGER&&(ra=BigInt(N)*BigInt(y));ra=bt(z,A,O,Pa.hh,D,ra);return Qe(B(),[ra],C())}}(qa),0,null,d,E,p,m(),[],"",null,null,aj,f);qa.codecs=a.J.codecs;qa.mimeType=a.J.mimeType;0==h?0<Aa&&qa.Kc():0!=
|
|
978
|
+
Aa%h&&qa.Kc();U.push(qa)}Q=new Yi(Q,R,function(){if(aa)return[];var Pa=N*y;"BigInt"in window&&Pa>Number.MAX_SAFE_INTEGER&&(Pa=BigInt(N)*BigInt(y));Pa=bt(z,A,O,null,D,Pa);return Qe(B(),[Pa],C())},0,null,d,E,p,m(),U,"",null,null,aj,f,0<U.length);Q.codecs=a.J.codecs;Q.mimeType=a.J.mimeType;Q.bandwidth=a.bandwidth;Q.j=M;return Q}function l(){var O=[Math.max(n.ob(),p),Math.min(n.Xb(),m())].map(function(M){return M-p});O=[Math.ceil(O[0]/v),Math.ceil(O[1]/v)-1];a.J.Sa&&O[1]++;return O.map(function(M){return M+
|
|
978
979
|
w})}function m(){var O=null!=r&&e[r]||u;return O?p+O:Infinity}var n=a.presentationTimeline,p=a.ha.start,r=a.na.id,u=a.ha.duration,v=b.Ma,w=b.ud,y=b.timescale,z=b.bc,D=a.bandwidth||null,A=a.J.id,B=a.J.Ja,C=a.mb,E=p-b.Ob,F=l();c=a.wb?Math.max(F[0],F[1]-c+1):F[0];g=g||F[1];F=[];for(var J=c;J<=g;++J){var K=k(J);F.push(K)}var L=new gl(F);F=n.Xb()<m();J=n.U();if(F||J){var I=Math.max(c,g+1);c=v;a.J.Sa&&(c=.1);L.re(c,function(){var O=n.ob();L.Ga(O);var M=t(l());M.next();M=M.next().value;for(var N=[];I<=M;){var Q=
|
|
979
980
|
k(I);N.push(Q);I++}return O>m()&&!N.length?null:N})}return Promise.resolve(L)}function Ht(a,b){var c=a.J.Pd;c||(c=dt(a,Gt,"initialization"));if(!c)return null;c=Lc(c);var d=a.J.id,e=a.bandwidth||null,f=a.J.Ja,g=a.mb;b=new Wi(function(){var h=bt(c,d,null,null,e,null);return Qe(f(),[h],g())},0,null,tt(a),null,null,b);b.codecs=a.J.codecs;b.mimeType=a.J.mimeType;return b}
|
|
980
|
-
function Mt(a,b,c,d,e,f,g,h,k,l,m){gl.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.H=e;this.j=f;this.l=g;this.s=h;this.A=l;this.G=m;k&&Nt(this)}
|
|
981
|
+
function Mt(a,b,c,d,e,f,g,h,k,l,m){gl.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.H=e;this.j=f;this.l=g;this.s=h;this.A=l;this.G=m;k&&Nt(this)}pa(Mt,gl);q=Mt.prototype;q.getNumReferences=function(){return this.h?this.h.timeline.length:0};q.release=function(){gl.prototype.release.call(this);this.h=null};
|
|
981
982
|
q.Ga=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.j<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,0===this.getNumReferences()&&this.release())}};
|
|
982
|
-
function Lt(a,b,c,d,e,f){Ot(a,f);if(a.h){c=a.h.timeline;a.h.bc!==b.bc&&(a.h.bc=b.bc);if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.
|
|
983
|
+
function Lt(a,b,c,d,e,f){Ot(a,f);if(a.h){c=a.h.timeline;a.h.bc!==b.bc&&(a.h.bc=b.bc);if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.end>g.end})}else b=b.timeline.slice();0<b.length&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.j=c,a.l=d;e&&Nt(a)}function Ot(a,b){if(a.s!==b){a.s=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&cj(c,b)}}
|
|
983
984
|
function Nt(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.Ga(a.j)}}q.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var b=this.h.timeline;if(a<this.j||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.j;e=d<c?b[d+1].start+this.j:Infinity===this.l?e.end+this.j:this.l;if(a>=f&&a<e)return d+this.i}return null};
|
|
984
|
-
q.get=function(a){var b=this;a-=this.i;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.
|
|
985
|
-
null==y.te&&(y.te=Pt(b.h.bc,b.F,e,b.B,f,y.ih,b.C,b.H));return y.te}}(r),0,null,this.s,c,this.j,this.l,[],"",null,null,
|
|
985
|
+
q.get=function(a){var b=this;a-=this.i;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.Ri,f=this.h.Yf+d.Zf;c=this.j-this.h.Ob;var g=this.j+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=this.l);for(var k=this.h.codecs,l=this.h.mimeType,m=this.h.bandwidth,n=[],p=(d.end-d.start)/d.Ab,r={},u=0;u<d.Ab;r={te:void 0,ih:void 0},u++){var v=d.start+p*u,w=v+p;r.ih=u+1;r.te=null;r=new Yi(this.j+v,this.j+w,function(y){return function(){if(!b.h)return[];
|
|
986
|
+
null==y.te&&(y.te=Pt(b.h.bc,b.F,e,b.B,f,y.ih,b.C,b.H));return y.te}}(r),0,null,this.s,c,this.j,this.l,[],"",null,null,aj,this.A);r.codecs=k;r.mimeType=l;r.bandwidth=m;0==this.G?0<u&&r.Kc():0!=u%this.G&&r.Kc();n.push(r)}c=new Yi(this.j+d.start,h,function(){return 0<d.Ab||!b.h?[]:Pt(b.h.bc,b.F,e,b.B,f,null,b.C,b.H)},0,null,this.s,c,this.j,this.l,n,"",null,null,aj,this.A,0<d.Ab);c.codecs=k;c.mimeType=l;c.j=g;c.bandwidth=m;this.g[a]=c}return c};
|
|
986
987
|
function Pt(a,b,c,d,e,f,g,h){a=bt(a,b,c,f,d||null,e);return Qe(g(),[a],h()).map(function(k){return k.toString()})};function Qt(a){this.o=null;this.A=a;this.G=new nh;this.i=[];this.h=null;this.m=[];this.B=null;this.F=[];this.C=300;this.l=new Map;this.j=new Map;this.g=null;this.s="UNKNOWN"}Qt.prototype.configure=function(a){this.o=a};Qt.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};Qt.prototype.setManifestType=function(a){this.s=a};
|
|
987
988
|
function Rt(a,b){var c,d,e,f,g,h,k;return P(function(l){if(1==l.g)return c=Qe(a.i,[St(a,b)]),d=uh(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),oh(a.G,e),va(l,2),G(l,e.promise,4);if(2!=l.g)return f=l.h,g=Dc(f.data),h=JSON.parse(g),1==h.VERSION&&Tt(a,h,f.uri),xa(l,0);if((k=ya(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Zb(function(){Rt(a,b)});a.g.$(a.C);H(l)})}
|
|
988
989
|
function St(a,b){if(!a.m.length)return b;b=new te(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Ie(e)&&xe(b,e);return b.toString()}function Tt(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Zb(function(){Rt(a,d)});if(c=b.TTL)a.C=c;a.g.$(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
|
|
989
990
|
function Ut(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Qt.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
|
|
990
|
-
function Vt(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={Oc:void 0},f=e.next())if(g.Oc=f.value,f=b.get(g.Oc))d.push({Ef:g.Oc,location:f});else if(f=a.F.find(function(k){return function(l){return l.
|
|
991
|
-
h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new te(k.location)).Db))return!1;return!0});d.length&&(a.B=d[0].Ef);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.B=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Qe(a.i,d)};function Wt(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.s=this.o=!1;this.m=new Set}q=Wt.prototype;q.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.s=this.o=!1;this.m.clear()};q.
|
|
991
|
+
function Vt(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={Oc:void 0},f=e.next())if(g.Oc=f.value,f=b.get(g.Oc))d.push({Ef:g.Oc,location:f});else if(f=a.F.find(function(k){return function(l){return l.vj==k.Oc}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].ph?(h=new te(h),ve(h,f["URI-REPLACEMENT"].ph),d.push({Ef:g.Oc,location:h.toString()})):d.push({Ef:g.Oc,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
|
|
992
|
+
h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new te(k.location)).Db))return!1;return!0});d.length&&(a.B=d[0].Ef);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.B=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Qe(a.i,d)};function Wt(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.s=this.o=!1;this.m=new Set}q=Wt.prototype;q.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.s=this.o=!1;this.m.clear()};q.di=function(){return this.l};q.jf=function(){return this.j.slice()};q.Mh=function(){return this.i};
|
|
992
993
|
q.ng=function(a,b){if(a){if("audio"==a.type)for(var c=t(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("video"==a.type)for(c=t(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a}));else if(a.type==We)for(c=t(this.j),d=c.next();!d.done;d=c.next())d=
|
|
993
994
|
d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("image"==a.type)for(c=t(this.i),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});a.segmentIndex&&a.closeSegmentIndex();this.m.delete(b)}};
|
|
994
995
|
function Xt(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[Yt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Zt(n),n]})),l=new Map(h.textStreams.map(function(n){return[$t(n),n]}));h=new Map(h.imageStreams.map(function(n){return[au(n),n]}));if(b){var m=bu(We);l.set($t(m),m);m=bu("image");h.set(au(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{gg:c,nh:d,jh:e,Bg:f}}
|
|
@@ -1021,24 +1022,24 @@ function gu(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType
|
|
|
1021
1022
|
function bu(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new gl([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set}}
|
|
1022
1023
|
function zu(a,b,c){if(b==a&&a!=c)return Bu;if(c==a&&a!=b)return Au;if(b>a){if(c<=a||c-a<b-a)return Au;if(c-a>b-a)return Bu}else{if(c>a)return Bu;if(a-c<a-b)return Au;if(a-c>a-b)return Bu}return Du}function Cu(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Au:b<a?Bu:Du}function lu(a){switch(a.type){case We:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
|
|
1023
1024
|
function Zt(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,yu(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function Yt(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,yu(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function $t(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
|
|
1024
|
-
function au(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function yu(a){if(!Eu.has(a)){var b=hf(a);Eu.set(a,b)}return Eu.get(a)}S("shaka.util.PeriodCombiner",Wt);Wt.prototype.setUseStreamOnce=Wt.prototype.dh;Wt.prototype.setAllowMultiTypeVariants=Wt.prototype.Wg;Wt.prototype.combinePeriods=Wt.prototype.Je;Wt.prototype.deleteStream=Wt.prototype.ng;Wt.prototype.getImageStreams=Wt.prototype.
|
|
1025
|
+
function au(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function yu(a){if(!Eu.has(a)){var b=hf(a);Eu.set(a,b)}return Eu.get(a)}S("shaka.util.PeriodCombiner",Wt);Wt.prototype.setUseStreamOnce=Wt.prototype.dh;Wt.prototype.setAllowMultiTypeVariants=Wt.prototype.Wg;Wt.prototype.combinePeriods=Wt.prototype.Je;Wt.prototype.deleteStream=Wt.prototype.ng;Wt.prototype.getImageStreams=Wt.prototype.Mh;Wt.prototype.getTextStreams=Wt.prototype.jf;Wt.prototype.getVariants=Wt.prototype.di;
|
|
1025
1026
|
var Au=1,Du=0,Bu=-1,Eu=new Map;function Fu(a,b){var c=new DOMParser,d=Gu.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function Hu(a,b){try{var c=Hc(a);return Fu(c,b)}catch(d){return null}}
|
|
1026
|
-
var Gu=new Sb(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 Iu(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.sa=1;this.F=[];this.l={Yd:"",type:"",profiles:[],Lb:null,Sa:0,Ja:null,sd:0};this.s=new Map;this.o={};this.B={};this.ka={};this.m=new Wt;this.K=0;this.oa=new Ua(5);this.L=new Zb(function(){if(a.I&&!a.g.continueLoadingWhenPaused&&(a.G.$a(a.I,"timeupdate"),a.I.paused)){a.G.
|
|
1027
|
-
new gb;this.I=null;this.
|
|
1027
|
+
var Gu=new Sb(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 Iu(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.sa=1;this.F=[];this.l={Yd:"",type:"",profiles:[],Lb:null,Sa:0,Ja:null,sd:0};this.s=new Map;this.o={};this.B={};this.ka={};this.m=new Wt;this.K=0;this.oa=new Ua(5);this.L=new Zb(function(){if(a.I&&!a.g.continueLoadingWhenPaused&&(a.G.$a(a.I,"timeupdate"),a.I.paused)){a.G.ra(a.I,"timeupdate",function(){return Ju(a)});return}Ju(a)});this.R=new nh;this.O=null;this.C=[];this.ea=Infinity;this.H=!1;this.h=null;this.N=0;this.ga=!1;this.G=
|
|
1028
|
+
new gb;this.I=null;this.X=!1;this.ba="";this.fa=function(){return!1};this.aa=[]}q=Iu.prototype;q.configure=function(a,b){var c=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&(this.fa=b);c&&this.i&&this.i.presentationTimeline.U()&&this.L.xc();this.h&&this.h.configure(this.g);this.m&&(this.m.Wg(this.g.dash.multiTypeVariantsAllowed&&pb()),this.m.dh(this.g.dash.useStreamOnceInPeriodFlattening))};
|
|
1028
1029
|
q.start=function(a,b){var c=this,d;return P(function(e){if(1==e.g)return c.H=b.isLowLatencyMode(),c.A=[a],c.j=b,G(e,Ku(c),2);d=e.h;c.j&&Lu(c,d);if(!c.j)throw new T(2,7,7001);return e.return(c.i)})};
|
|
1029
1030
|
q.stop=function(){for(var a=t(Object.values(this.o)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.A=[];this.i=null;this.o={};this.B={};this.s.clear();this.l={Yd:"",type:"",profiles:[],Lb:null,Sa:0,Ja:null,sd:0};this.m=null;null!=this.L&&(this.L.stop(),this.L=null);this.h&&this.h.destroy();this.G&&(this.G.release(),this.G=null);return this.R.destroy()};
|
|
1030
1031
|
q.update=function(){var a=this,b;return P(function(c){if(1==c.g)return va(c,2),G(c,Ku(a),4);if(2!=c.g)return xa(c,0);b=ya(c);if(!a.j||!b)return c.return();a.j.onError(b);H(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.U()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.Xb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.K=b.endTime-a,Lu(this,0))}}};
|
|
1031
1032
|
q.banLocation=function(a){this.h&&this.h.banLocation(a)};q.setMediaElement=function(a){this.I=a};
|
|
1032
|
-
function Ku(a){var b,c,d,e,f,g,h,k,l,m,n;return P(function(p){if(1==p.g)return b=4,c="MPD",d=Mu(a),e=a.A,d.length?(e=d,c="Patch",b=6):1<a.A.length&&a.h&&(f=Vt(a.h,"Location",!0),f.length&&(e=f)),g=uh(e,a.g.retryParameters),h=Date.now(),G(p,Nu(a,g,0,{type:b}),2);if(3!=p.g){k=p.h;if(!a.j)return p.return(0);k.uri&&k.uri!=k.originalUri&&!a.A.includes(k.uri)&&a.A.unshift(k.uri);l=new te(k.uri);a.
|
|
1033
|
+
function Ku(a){var b,c,d,e,f,g,h,k,l,m,n;return P(function(p){if(1==p.g)return b=4,c="MPD",d=Mu(a),e=a.A,d.length?(e=d,c="Patch",b=6):1<a.A.length&&a.h&&(f=Vt(a.h,"Location",!0),f.length&&(e=f)),g=uh(e,a.g.retryParameters),h=Date.now(),G(p,Nu(a,g,0,{type:b}),2);if(3!=p.g){k=p.h;if(!a.j)return p.return(0);k.uri&&k.uri!=k.originalUri&&!a.A.includes(k.uri)&&a.A.unshift(k.uri);l=new te(k.uri);a.ba=l.g.toString();return G(p,Ou(a,k.data,k.uri,c),3)}m=Date.now();n=(m-h)/1E3;a.oa.sample(1,n);return p.return(n)})}
|
|
1033
1034
|
function Ou(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u;return P(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=Pm;if(f!=g){rb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=Hu(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=Ic(h.outerHTML)}k=Wc(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=Qm;l!=m&&l(k);if("Patch"===d)return v.return(Pu(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(Qu(a,k,c));
|
|
1034
1035
|
p=a.g.dash.xlinkFailGracefully;r=ht(k,a.g.retryParameters,p,c,a.j.networkingEngine);oh(a.R,r);return G(v,r.promise,2)}u=v.h;return v.return(Qu(a,u,c))})}
|
|
1035
|
-
function Qu(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,D,A,B,C,E,F,J,K,L,I,O,M,N,Q,R,U,aa,fa,
|
|
1036
|
+
function Qu(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,D,A,B,C,E,F,J,K,L,I,O,M,N,Q,R,U,aa,fa,qa,Aa,Ha,Ya,Pa,ra,Sa,qc,hb,cc,Gc,nb,Rc,oe,Od,uf,pe,Zi,Qg,$i,Rg;return P(function(dc){switch(dc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=ed(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=gd(l))p=Qe(d,[n])[0],m&&(a.h?Ut(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=Vt(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.l.Yd=b.attributes.id||
|
|
1036
1037
|
"";a.l.sd=ld(b,"publishTime",od)||0;a.F=ed(b,"PatchLocation");u=Promise.resolve();if((v=id(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new Qt(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,y=gd(v))(z=ld(v,"queryBeforeStart",vd,!1))?u=Rt(a.h,y):Rt(a.h,y);D=t(f.keys());for(A=D.next();!A.done;A=D.next())B=A.value,C=f.get(B),Ut(a.h,"Location",B,C)}E=ed(b,"BaseURL");F=!1;if(a.h)for(J=t(E),K=J.next();!K.done;K=J.next())L=K.value,
|
|
1037
|
-
I=L.attributes.serviceLocation,O=gd(L),I&&O&&(Ut(a.h,"BaseURL",I,O),F=!0);a.
|
|
1038
|
-
pd));Ha=a.g.dash.ignoreMaxSegmentDuration;Ya=null;Ha||(Ya=ld(b,"maxSegmentDuration",pd));Pa=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.
|
|
1039
|
-
|
|
1040
|
-
a.H=a.j.isLowLatencyMode());a.H&&
|
|
1041
|
-
nextUrl:Vu(b),periodCount:pe.length,gapCount:a.N,isLowLatency:a.
|
|
1038
|
+
I=L.attributes.serviceLocation,O=gd(L),I&&O&&(Ut(a.h,"BaseURL",I,O),F=!0);a.aa=null;F&&a.h||(M=E.map(gd),a.aa=Qe(d,M));N=function(){return a.h&&F?Vt(a.h,"BaseURL"):a.aa?a.aa:[]};a.l.Ja=N;Q=0;E&&E.length&&(Q=ld(E[0],"availabilityTimeOffset",ud)||0);a.l.Sa=Q;R=a.g.dash.ignoreMinBufferTime;U=0;R||(U=ld(b,"minBufferTime",pd)||0);a.K=ld(b,"minimumUpdatePeriod",pd,-1);aa=ld(b,"availabilityStartTime",od);fa=ld(b,"timeShiftBufferDepth",pd);qa=a.g.dash.ignoreSuggestedPresentationDelay;Aa=null;qa||(Aa=ld(b,
|
|
1039
|
+
"suggestedPresentationDelay",pd));Ha=a.g.dash.ignoreMaxSegmentDuration;Ya=null;Ha||(Ya=ld(b,"maxSegmentDuration",pd));Pa=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.X=a.i.presentationTimeline.U()&&"static"==Pa);a.l.type=Pa;Ru(a);if(a.i)for(ra=a.i.presentationTimeline,Sa=t(Object.values(a.o)),qc=Sa.next();!qc.done;qc=Sa.next())hb=qc.value,hb.segmentIndex&&hb.segmentIndex.Ga(ra.ob());else cc=a.g.defaultPresentationDelay||1.5*U,Gc=null!=Aa?Aa:cc,ra=new Lk(aa,Gc,a.g.dash.autoCorrectDrift);
|
|
1040
|
+
ra.wc("static"==Pa);(nb=ra.U())&&!isNaN(a.g.availabilityWindowOverride)&&(fa=a.g.availabilityWindowOverride);null==fa&&(fa=Infinity);ra.ne(fa);Rc=b.attributes.profiles||"";a.l.profiles=Rc.split(",");oe={wb:"static"!=Pa,presentationTimeline:ra,na:null,ha:null,ia:null,J:null,bandwidth:0,lf:!1,Sa:Q,Lb:null,profiles:Rc.split(","),roles:null,mb:function(){return""}};a.N=0;Od=Su(a,oe,N,b,!1);uf=Od.duration;pe=Od.periods;("static"!=Pa||a.X)&&Od.pg||ra.Za(uf||Infinity);a.ga&&!a.H&&(Zi=a.j.isAutoLowLatencyMode())&&
|
|
1041
|
+
(a.j.enableLowLatencyMode(),a.H=a.j.isLowLatencyMode());a.H&&ra.Xg(a.ea);ra.yf(Ya||1);return G(dc,u,2);case 2:a.H&&(U=0,Qg=null!=Aa?Aa:a.g.defaultPresentationDelay,ra.Of(Qg));if(!a.i)return G(dc,a.m.Je(pe,oe.wb),6);a.i.periodCount=pe.length;a.i.gapCount=a.N;return G(dc,Tu(a,pe,!1),4);case 6:a.i={presentationTimeline:ra,variants:a.m.l,textStreams:a.m.jf(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:U||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",
|
|
1042
|
+
serviceDescription:Uu(b),nextUrl:Vu(b),periodCount:pe.length,gapCount:a.N,isLowLatency:a.ga,startTime:null};if(!ra.lh()){dc.u(7);break}$i=ed(b,"UTCTiming");return G(dc,Wu(a,N,$i),8);case 8:Rg=dc.h;if(!a.j)return dc.return();ra.Yg(Rg);case 7:ra.Ud();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),H(dc)}})}function Tu(a,b,c){var d;return P(function(e){if(1==e.g)return G(e,a.m.Je(b,!0,c),2);a.i.variants=a.m.l;d=a.m.jf();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);H(e)})}
|
|
1042
1043
|
function Pu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,D,A,B,C,E,F,J,K,L,I;return P(function(O){if(1==O.g){c=b.attributes.mpdId;d=ld(b,"originalPublishTime",od);if(!c||c!==a.l.Yd||d!==a.l.sd)throw a.F=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(dd(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=xd(l.attributes.sel||""),n=m[m.length-1],p=gd(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.Tb){r=gd(l)||"";var M=pd(r);if(null!=M){a.l.Lb=M;for(var N=t(a.s.values()),Q=N.next();!Q.done;Q=N.next())Q.value.Lb=
|
|
1043
1044
|
M}}else if("type"===n.Tb){a.i.presentationTimeline.wc("static"==p);a.l.type=p;M=t(a.s.values());for(N=M.next();!N.done;N=M.next())N.value.wb="dynamic"==p;"static"==p&&(a.K=-1)}else"publishTime"===n.Tb?a.l.sd=od(p)||0:null===n.Tb&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)zd(a.F,l);else if("Period"===n.name)"add"===l.tagName?f.push(l):"remove"===l.tagName&&n.id&&Xu(a,n.id);else if("SegmentTemplate"===n.name){N=xd(l.attributes.sel||"");M=N[N.length-1];if(M.Tb){N=Yu(a,N);Q=gd(l)||
|
|
1044
1045
|
"";for(var R=t(N),U=R.next();!U.done;U=R.next())U=a.s.get(U.value),Bd(U.J.dc,l.tagName,M.Tb,Q);M=N}else M=[];u=M;v=t(u);for(w=v.next();!w.done;w=v.next())y=w.value,g.add(y)}else if("SegmentTimeline"===n.name||"S"===n.name){M=xd(l.attributes.sel||"");M=Yu(a,M);N=t(M);for(Q=N.next();!Q.done;Q=N.next())Q=a.s.get(Q.value),Q=et(Q,Gt,"SegmentTimeline"),R=ed(Q,"S"),zd(R,l),Q.children=R;z=M;D=t(z);for(A=D.next();!A.done;A=D.next())B=A.value,g.add(B)}C=t(g);for(E=C.next();!E.done;E=C.next())F=E.value,Zu(a,
|
|
@@ -1048,11 +1049,11 @@ function Yu(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.n
|
|
|
1048
1049
|
","+a.J.id);return b}function Zu(a,b){var c=a.s.get(b),d=a.o[b];d.segmentIndex&&d.segmentIndex.Ga(a.i.presentationTimeline.ob());try{var e=Ft(c,function(f,g,h,k){return av(a,f,g,h,k)},a.o,!0,a.g.dash.initialSegmentLimit,a.ka,c.J.aesKey,null,!0);d.createSegmentIndex=function(){return P(function(f){if(1==f.g)return d.segmentIndex?f.u(0):G(f,e.lc(),3);d.segmentIndex=f.h;H(f)})}}catch(f){if(b=c.J.contentType,b!=We&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
|
|
1049
1050
|
function Uu(a){var b=id(a,"ServiceDescription");if(!b)return null;a=id(b,"Latency");b=id(b,"PlaybackRate");if(!a&&!b)return null;var c={};a&&("target"in a.attributes&&(c.targetLatency=parseInt(a.attributes.target,10)/1E3),"max"in a.attributes&&(c.maxLatency=parseInt(a.attributes.max,10)/1E3),"min"in a.attributes&&(c.minLatency=parseInt(a.attributes.min,10)/1E3));b&&("max"in b.attributes&&(c.maxPlaybackRate=parseFloat(b.attributes.max)),"min"in b.attributes&&(c.minPlaybackRate=parseFloat(b.attributes.min)));
|
|
1050
1051
|
return c}function Vu(a){a=ed(a,"SupplementalProperty");if(!a.length)return null;a=t(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,"urn:mpeg:dash:chaining:2016"==b.attributes.schemeIdUri)return b.attributes.value;return null}
|
|
1051
|
-
function Su(a,b,c,d,e){var f=b.Lb;f||(f=ld(d,"mediaPresentationDuration",pd),a.l.Lb=f);var g=0;a.i&&a.i.presentationTimeline&&a.
|
|
1052
|
-
d.length){null!==p&&(null===a.O||p>a.O)&&(a.O=p);k=nv(a,b,c,{start:p,duration:v,node:m,qf:null==v||!n});h.push(k);b.na.id&&v&&(a.ka[b.na.id]=v);if(null==v){k=null;break}k=p+v}}if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.C.includes(c)||a.C.push(c);else a.C=h.map(function(y){return y.id});return null!=f?{periods:h,duration:f+g,pg:!1}:{periods:h,duration:k,pg:!0}}
|
|
1052
|
+
function Su(a,b,c,d,e){var f=b.Lb;f||(f=ld(d,"mediaPresentationDuration",pd),a.l.Lb=f);var g=0;a.i&&a.i.presentationTimeline&&a.X&&(g=a.i.presentationTimeline.Jb());var h=[],k=g;d=ed(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],p=ld(m,"start",pd,k),r=m.attributes.id,u=ld(m,"duration",pd);p=0==l&&0==p&&a.X?g:p;var v=null;if(n){var w=ld(n,"start",pd);null!=w&&(v=w-p+g)}else null!=f&&(v=f-p+g);w=Ze;v&&u&&Math.abs(v-u)>w&&v>u&&a.N++;null==v&&(v=u);if(!(null!==a.O&&null!==r&&null!==p&&p<
|
|
1053
|
+
a.O)||a.C.includes(r)||l+1==d.length){null!==p&&(null===a.O||p>a.O)&&(a.O=p);k=nv(a,b,c,{start:p,duration:v,node:m,qf:null==v||!n});h.push(k);b.na.id&&v&&(a.ka[b.na.id]=v);if(null==v){k=null;break}k=p+v}}if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.C.includes(c)||a.C.push(c);else a.C=h.map(function(y){return y.id});return null!=f?{periods:h,duration:f+g,pg:!1}:{periods:h,duration:k,pg:!0}}
|
|
1053
1054
|
function Ru(a){var b=Object.keys(a.B).filter(function(f){return!a.C.includes(f)});b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=t(a.B[c]),e=d.next();!e.done;e=d.next())e=e.value,a.m&&a.m.ng(a.o[e],c),delete a.o[e];delete a.B[c]}}
|
|
1054
1055
|
function nv(a,b,c,d){b.na=ov(a,d.node,null,c);b.ha=d;b.na.Sa=b.Sa;b.na.id||(b.na.id="__shaka_period_"+d.start);var e=ed(d.node,"EventStream");c=b.presentationTimeline.ob();e=t(e);for(var f=e.next();!f.done;f=e.next())pv(a,d.start,d.duration,f.value,c);c=ed(d.node,"SupplementalProperty");c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri&&(e=qv(a,e)))b.mb=e;c=ed(d.node,"AdaptationSet").map(function(l,m){return rv(a,b,m,l)}).filter(zf);if(b.wb){d=
|
|
1055
|
-
[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.
|
|
1056
|
+
[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Li);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new T(2,4,4018);}d=c.filter(function(l){return!l.Xf});c=c.filter(function(l){return l.Xf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Xf.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id)){h=t(h.streams);for(var k=h.next();!k.done;k=h.next())xg(k.value,e.streams)}}c=sv(a.g.disableAudio,d,"audio");e=sv(a.g.disableVideo,
|
|
1056
1057
|
d,"video");f=sv(a.g.disableText,d,We);d=sv(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new T(2,4,4004);return{id:b.na.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function sv(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
|
|
1057
1058
|
function rv(a,b,c,d){function e(L){var I=L.attributes["dvb:fontFamily"];L=L.attributes["dvb:url"];I&&L&&(L=Qe(b.ia.Ja(),[L],b.mb()),a.j.addFont(I,L[0]))}function f(L){switch(L){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function g(L){switch(L){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ia=ov(a,d,b.na,null);b.ia.position=c;var h=!1;c=ed(d,"Role");var k=c.map(function(L){return L.attributes.value}).filter(zf),
|
|
1058
1059
|
l=void 0,m=b.ia.contentType==We;m&&(l="subtitle");c=t(c);for(var n=c.next();!n.done;n=c.next()){n=n.value;var p=n.attributes.schemeIdUri;if(null==p||"urn:mpeg:dash:role:2011"==p)switch(n=n.attributes.value,n){case "main":h=!0;break;case "caption":case "subtitle":l=n}}var r=ed(d,"EssentialProperty");c=null;var u=!1;n=null;p=!1;r=t(r);for(var v=r.next();!v.done;v=r.next()){v=v.value;var w=v.attributes.schemeIdUri;if("http://dashif.org/guidelines/trickmode"==w)c=v.attributes.value;else if("urn:mpeg:mpegB:cicp:TransferCharacteristics"==
|
|
@@ -1061,10 +1062,10 @@ v?D=parseInt(r.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristi
|
|
|
1061
1062
|
p||a.g.disableText)"urn:mpeg:dash:role:2011"==p?null!=r&&(k.push(r),"captions"==r&&(l="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==r?B="visually impaired":"2"==r&&(B="hard of hearing"));else if(p=1,null!=r)for(r=t(r.split(";")),v=r.next();!v.done;v=r.next()){w=v.value;var C=v=void 0;w.includes("=")?(w=w.split("="),v="svc"+w[0],C=w[1].split(",")[0].split(":").pop()):(v="svc"+p,p++,C=w);A.set(v,Gf(C))}else A.set("svc1","und");else if(p=1,null!=r)for(r=r.split(";"),v=t(r),w=v.next();!w.done;w=
|
|
1062
1063
|
v.next()){C=w.value;var E=w=void 0;C.includes("=")?(C=C.split("="),w=C[0].startsWith("CC")?C[0]:"CC"+C[0],E=C[1]||"und"):(w="CC"+p,2==r.length?p+=2:p++,E=C);A.set(w,Gf(E))}else A.set("CC1","und");n=ed(d,"ContentProtection");var F=Rs(n,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),J=Gf(b.ia.language||"und"),K=b.ia.label;n=ed(d,"Representation");d=n.map(function(L){if(L=tv(a,b,F,l,J,K,h,k,A,L,B,D))L.hdr=L.hdr||y,L.colorGamut=L.colorGamut||z,L.fastSwitching=u;return L}).filter(function(L){return!!L});
|
|
1063
1064
|
if(0==d.length){c="image"==b.ia.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||m||c)return null;throw new T(2,4,4003);}if(!b.ia.contentType||"application"==b.ia.contentType)for(b.ia.contentType=uv(d[0].mimeType,d[0].codecs),m=t(d),p=m.next();!p.done;p=m.next())p.value.type=b.ia.contentType;m=b.ia.id||"__fake__"+a.sa++;p=t(d);for(r=p.next();!r.done;r=p.next()){r=r.value;v=t(F.drmInfos);for(w=v.next();!w.done;w=v.next())w=w.value,w.keyIds=w.keyIds&&r.keyIds?new Set([].concat(x(w.keyIds),x(r.keyIds))):
|
|
1064
|
-
w.keyIds||r.keyIds;a.g.dash.enableAudioGroups&&(r.groupId=m)}n=n.map(function(L){return L.attributes.id}).filter(zf);return{id:m,contentType:b.ia.contentType,language:J,
|
|
1065
|
-
function qv(a,b){if((b=jd(b,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&ld(b,"useMPDUrlQuery",vd,!1)){var c=b.attributes.queryTemplate;if(c)return function(){return"$querypart$"==c?a.
|
|
1066
|
-
function tv(a,b,c,d,e,f,g,h,k,l,m,n){b.J=ov(a,l,b.ia,null);var p=b.J.id;a.
|
|
1067
|
-
"application"==y;y="image"==y;try{var z=void 0;if(c.Fe){var D=b.J.Ja,A=b.mb,B=Qe(D(),[c.Fe.
|
|
1065
|
+
w.keyIds||r.keyIds;a.g.dash.enableAudioGroups&&(r.groupId=m)}n=n.map(function(L){return L.attributes.id}).filter(zf);return{id:m,contentType:b.ia.contentType,language:J,gk:h,streams:d,drmInfos:F.drmInfos,Xf:c,Li:n}}
|
|
1066
|
+
function qv(a,b){if((b=jd(b,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&ld(b,"useMPDUrlQuery",vd,!1)){var c=b.attributes.queryTemplate;if(c)return function(){return"$querypart$"==c?a.ba:c.split("&").map(function(d){if("$querypart$"==d)return a.ba;var e=/\$query:(.*?)\$/g.exec(d);if(e&&2==e.length){e=e[1];var f=(new ze(a.ba)).get(e);if(f.length)return e+"="+f[0]}return d}).join("&")}}return null}
|
|
1067
|
+
function tv(a,b,c,d,e,f,g,h,k,l,m,n){b.J=ov(a,l,b.ia,null);var p=b.J.id;a.ea=Math.min(a.ea,b.J.Sa);a.ga=0<a.ea;if(!vv(b.J))return null;var r=b.ha.start;b.bandwidth=ld(l,"bandwidth",sd)||0;b.roles=h;var u=ed(l,"SupplementalProperty"),v=ed(l,"EssentialProperty"),w=null,y=v.find(function(N){return"urn:mpeg:dash:urlparam:2014"==N.attributes.schemeIdUri});y?w=qv(a,y):(y=u.find(function(N){return"urn:mpeg:dash:urlparam:2014"==N.attributes.schemeIdUri}))&&(w=qv(a,y));w&&(b.mb=w);y=b.J.contentType;w=y==We||
|
|
1068
|
+
"application"==y;y="image"==y;try{var z=void 0;if(c.Fe){var D=b.J.Ja,A=b.mb,B=Qe(D(),[c.Fe.ri],A()),C=uh(B,a.g.retryParameters);z={bitsKey:128,blockCipherMode:"CBC",iv:c.Fe.iv,firstMediaSequenceNumber:0,fetchKey:function(){var N,Q,R;return P(function(U){if(1==U.g)return G(U,Nu(a,C,6),2);if(3!=U.g){N=U.h;if(!N.data||16!=N.data.byteLength)throw new T(2,4,4049);Q={name:"AES-CBC"};R=z;return G(U,window.crypto.subtle.importKey("raw",N.data,Q,!0,["decrypt"]),3)}R.cryptoKey=U.h;z.fetchKey=void 0;H(U)})}}}b.J.aesKey=
|
|
1068
1069
|
z;D=function(N,Q,R,U){return av(a,N,Q,R,U)};if(b.J.Tc)var E=ut(b,D,z);else if(b.J.Qb)E=At(b,a.o,z);else if(b.J.dc)E=Ft(b,D,a.o,!!a.i,a.g.dash.initialSegmentLimit,a.ka,z,n,!1);else{var F=b.ha.duration||0,J=b.J.Ja,K=b.J.mimeType,L=b.J.codecs;E={lc:function(){var N=il(r,F,J());N.Gb(function(Q){Q.mimeType=K;Q.codecs=L});return Promise.resolve(N)}}}}catch(N){if((w||y)&&4002==N.code)return null;throw N;}l=ed(l,"ContentProtection");l=Vs(l,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);l=new Set(l?[l]:
|
|
1069
1070
|
[]);n=!1;u.some(function(N){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==N.attributes.schemeIdUri&&"JOC"==N.attributes.value})&&(n=!0);u=!1;w&&(u=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var I;if(y&&((v=v.find(function(N){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(N.attributes.schemeIdUri)}))&&(I=v.attributes.value),!I))return null;var O;w=b.J.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&
|
|
1070
1071
|
(w.includes("hvc1.2.4.L153.B0")||w.includes("hev1.2.4.L153.B0"))&&(O="PQ");v=b.J.id?b.na.id+","+b.J.id:"";a.F.length&&p&&a.s.set(b.na.id+","+p,wv(b));var M=v&&a.o[v]?a.o[v]:{id:a.sa++,originalId:b.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){M.segmentIndex&&(M.segmentIndex.release(),M.segmentIndex=null)},segmentIndex:null,mimeType:b.J.mimeType,codecs:w,frameRate:b.J.frameRate,pixelAspectRatio:b.J.pixelAspectRatio,bandwidth:b.bandwidth,width:b.J.width,
|
|
@@ -1077,35 +1078,35 @@ ud)||0:0;z=c.Sa+A+z+D;D=null;(A=id(b,"SegmentSequenceProperties"))&&(A=id(A,"SAP
|
|
|
1077
1078
|
Sa:z,Pd:null,me:D||c.me,label:A||null}}function xv(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
|
|
1078
1079
|
function yv(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.attributes.schemeIdUri)if(c=c.attributes.value)switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
|
|
1079
1080
|
parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function vv(a){var b=a.Tc?1:0;b+=a.Qb?1:0;b+=a.dc?1:0;if(0==b)return a.contentType==We||"application"==a.contentType?!0:!1;1!=b&&(a.Tc&&(a.Qb=null),a.dc=null);return!0}
|
|
1080
|
-
function zv(a,b,c,d){var e,f,g,h,k,l,m;return P(function(n){if(1==n.g)return e=[Lc(c)],f=Qe(b(),e),g=uh(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g,{isPreload:a.
|
|
1081
|
+
function zv(a,b,c,d){var e,f,g,h,k,l,m;return P(function(n){if(1==n.g)return e=[Lc(c)],f=Qe(b(),e),g=uh(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g,{isPreload:a.fa()}),oh(a.R,h),G(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=Dc(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
|
|
1081
1082
|
function Wu(a,b,c){var d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.attributes.schemeIdUri,value:p.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.u(4);break}h=g.value;va(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.u(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.u(8);
|
|
1082
1083
|
case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":$a("NTP UTCTiming scheme is not supported");break;default:$a("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return G(n,zv(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return G(n,zv(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:xa(n,
|
|
1083
1084
|
3);break;case 5:ya(n);case 3:g=f.next();n.u(2);break;case 4:return $a("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
|
|
1084
1085
|
function pv(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=ld(d,"timescale",td)||1,k=ld(d,"presentationTimeOffset",td)||0;d=t(ed(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=ld(l,"presentationTime",td)||0,n=ld(l,"duration",td)||0;m=Math.max((m-k)/h+b,b);n=m+n/h;null!=c&&(m=Math.min(m,b+c),n=Math.min(n,b+c));n<e||(l={schemeIdUri:f,value:g,startTime:m,endTime:n,id:l.attributes.id||"",eventElement:Cd(l),eventNode:Dd(l)},a.j.onTimelineRegionAdded(l))}}
|
|
1085
|
-
function av(a,b,c,d,e){var f,g,h,k;return P(function(l){if(1==l.g)return f=Ah,g=e?0:1,h=Tl(b,c,d,a.g.retryParameters),G(l,Nu(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function uv(a,b){b=af(a,b);return pf(b)?We:a.split("/")[0]}function Nu(a,b,c,d){d||(d={});d.isPreload=a.
|
|
1086
|
-
function Mu(a){var b=a.l.sd;if(!a.l.Yd||!b||!a.F.length)return[];var c=Date.now()/1E3,d=a.F.filter(function(e){e=td(e.attributes.ttl);return!e||b+e>c}).map(gd).filter(zf);return d.length?Qe(a.A,d):[]}S("shaka.dash.DashParser",Iu);Ri["application/dash+xml"]=function(){return new Iu};Ri["video/vnd.mpeg.dash.mpd"]=function(){return new Iu};function Av(){}S("shaka.dependencies",Av);Av.has=function(a){return Bv.has(a)};Av.add=function(a,b){if(!Cv[a])throw Error(a+" is not supported");a==Dv?rb("mux.js","mux.js is no longer used in Shaka Player."):Bv.set(a,function(){return b})};var Dv="muxjs",Cv={
|
|
1086
|
+
function av(a,b,c,d,e){var f,g,h,k;return P(function(l){if(1==l.g)return f=Ah,g=e?0:1,h=Tl(b,c,d,a.g.retryParameters),G(l,Nu(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function uv(a,b){b=af(a,b);return pf(b)?We:a.split("/")[0]}function Nu(a,b,c,d){d||(d={});d.isPreload=a.fa();b=a.j.networkingEngine.request(c,b,d);oh(a.R,b);return b.promise}
|
|
1087
|
+
function Mu(a){var b=a.l.sd;if(!a.l.Yd||!b||!a.F.length)return[];var c=Date.now()/1E3,d=a.F.filter(function(e){e=td(e.attributes.ttl);return!e||b+e>c}).map(gd).filter(zf);return d.length?Qe(a.A,d):[]}S("shaka.dash.DashParser",Iu);Ri["application/dash+xml"]=function(){return new Iu};Ri["video/vnd.mpeg.dash.mpd"]=function(){return new Iu};function Av(){}S("shaka.dependencies",Av);Av.has=function(a){return Bv.has(a)};Av.add=function(a,b){if(!Cv[a])throw Error(a+" is not supported");a==Dv?rb("mux.js","mux.js is no longer used in Shaka Player."):Bv.set(a,function(){return b})};var Dv="muxjs",Cv={hk:Dv,ISOBoxer:"ISOBoxer"};Av.Allowed=Cv;var Bv=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function Ev(a,b,c){this.type=a;this.W=b;this.segments=c||null}function Fv(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}Fv.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
|
|
1087
1088
|
function Gv(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function Hv(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Z(a,b,c){return(a=Hv(a,b))?a.value:c||null}function Iv(a,b){a=Hv(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function Jv(a,b,c){c=void 0===c?[]:c;this.W=b;this.g=a;this.Ab=c}function Kv(a,b){this.name=a;this.value=b};function Lv(a,b){return a.filter(function(c){return c.name==b})}function Mv(a,b){return a.filter(function(c){return Iv(c,"TYPE")==b})}function Nv(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Ov(a,b,c){c=void 0===c?0:c;return(a=Nv(a,b))?Number(a.value):c}function Pv(a,b,c){return b?Qv(a,[b],c):[]}function Qv(a,b,c){if(!b.length)return[];b=Qe(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next())a.push(Rv(d.value,c));return a}
|
|
1088
1089
|
function Rv(a,b){if(!b||!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new T(2,4,4039,e);}}return a};function Sv(){this.g=0}
|
|
1089
1090
|
function Tv(a,b){b=Dc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new T(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=Uv(a,f),--a.g,Vv.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=Uv(a,g);if(Wv.includes(g.name)){if(1!=b)throw new T(2,4,4017);g=
|
|
1090
1091
|
c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=Uv(a,k),Vv.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==Z(k,"TYPE")?f.push(k):"MAP"==Z(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new Jv(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new Jv("",d,f)));return new Ev(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
|
|
1091
1092
|
g.name&&(g.attributes.push(new Kv("URI",h)),d=!0)}}return new Ev(b,e)}function Uv(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new T(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Mc(d);var f;(f=Oc(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Oc(d,g);)c.push(new Kv(f[1],f[2]||f[3])),Nc(d)}return new Fv(a,b,c,e)}
|
|
1092
|
-
var Vv="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 EXT-X-DATERANGE".split(" "),Wv="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP".split(" ");function Xv(){}function Yv(a){try{var b=Zv(a);return gh({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return
|
|
1093
|
-
function Zv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(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=Me(a):e=Ic(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",Xv);Xv.parse=Yv;qh("data",Yv);function $v(){var a=this;this.g=this.h=null;this.C=1;this.A=new Map;this.H=new Map;this.O=new Map;this.O.set("video",new Map);this.O.set("audio",new Map);this.O.set(We,new Map);this.O.set("image",new Map);this.fb=new Set;this.i=new Map;this.l=null;this.N="";this.Ta=new Sv;this.I=-1;this.ga=Infinity;this.fa=this.$b=this.ac=!1;this.B=new Zb(function(){if(a.ba&&!a.g.continueLoadingWhenPaused&&(a.aa.$a(a.ba,"timeupdate"),a.ba.paused)){a.aa.
|
|
1094
|
-
this.
|
|
1093
|
+
var Vv="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 EXT-X-DATERANGE".split(" "),Wv="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP".split(" ");function Xv(){}function Yv(a){try{var b=Zv(a);return gh({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return ch(c)}}
|
|
1094
|
+
function Zv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(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=Me(a):e=Ic(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",Xv);Xv.parse=Yv;qh("data",Yv);function $v(){var a=this;this.g=this.h=null;this.C=1;this.A=new Map;this.H=new Map;this.O=new Map;this.O.set("video",new Map);this.O.set("audio",new Map);this.O.set(We,new Map);this.O.set("image",new Map);this.fb=new Set;this.i=new Map;this.l=null;this.N="";this.Ta=new Sv;this.I=-1;this.ga=Infinity;this.fa=this.$b=this.ac=!1;this.B=new Zb(function(){if(a.ba&&!a.g.continueLoadingWhenPaused&&(a.aa.$a(a.ba,"timeupdate"),a.ba.paused)){a.aa.ra(a.ba,"timeupdate",function(){return aw(a)});return}aw(a)});
|
|
1095
|
+
this.za=bw;this.m=null;this.bb=0;this.o=Infinity;this.Fa=this.Ea=this.X=0;this.ea=new nh;this.F=new Map;this.G=new Map;this.ta=new Map;this.ka=new Map;this.L=new Map;this.oa=new Map;this.sa=new Map;this.Hb=this.K=!1;this.Eb=new Ua(5);this.j=null;this.R=!0;this.Da=new Set;this.aa=new gb;this.s=this.ba=null;this.Fb=function(){return!1}}q=$v.prototype;q.configure=function(a,b){this.g=a;b&&(this.Fb=b);this.j&&this.j.configure(this.g)};
|
|
1095
1096
|
q.start=function(a,b){var c=this,d;return P(function(e){return 1==e.g?(c.h=b,c.K=b.isLowLatencyMode(),G(e,cw(c,[a]).promise,2)):3!=e.g?(d=e.h,c.N=d.uri,G(e,dw(c,d.data,a),3)):e.return(c.m)})};
|
|
1096
1097
|
q.stop=function(){this.B&&(this.B.stop(),this.B=null);var a=[];this.ea&&(a.push(this.ea.destroy()),this.ea=null);this.g=this.h=null;this.fb.clear();this.m=null;this.i.clear();this.H.clear();this.G.clear();this.A.clear();this.ta.clear();this.ka.clear();this.L.clear();this.oa.clear();this.sa.clear();this.Da.clear();this.j&&this.j.destroy();this.aa&&(this.aa.release(),this.aa=null);return Promise.all(a)};
|
|
1097
1098
|
q.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n,p;return P(function(r){if(1==r.g){if(!ew(a))return r.return();b=[];c=Array.from(a.i.values());a.o=Infinity;a.m.gapCount=0;d=c.filter(function(u){return u.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(fw(a,g));return G(r,Promise.all(b),2)}gw(a,d.map(function(u){return u.stream}));h=d.some(function(u){return 0==u.fd});d.length&&!h&&(k=hw,iw(a,k.qh),l=d.map(function(u){return u.Kb}),a.l.Za(Math.min.apply(Math,x(l))),
|
|
1098
1099
|
a.h.updateDuration());h&&jw(a);m=t(d);for(n=m.next();!n.done;n=m.next())p=n.value,p.stream.segmentIndex&&!ng(p.stream.segmentIndex)&&a.h.disableStream(p.stream);H(r)})};function kw(a,b){return ew(a)?a.O.get(b.type):b.Vd}
|
|
1099
|
-
function fw(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,D,A,B,C,E,F,J,K,L,I,O,M,N,Q,R,U,aa,fa;return P(function(
|
|
1100
|
-
m=Tv(a.Ta,k.data);if(1!=m.type)throw new T(2,4,4017);n=k.uri;n==k.originalUri||b.M().includes(n)||b.Qg.push(n);p=Lv(m.W,"EXT-X-DEFINE");r=lw(a,p,n);u=b.stream;v=kw(a,b);return G(
|
|
1101
|
-
F.next())K=J.value,K.Z&&(K.Z.Lc=E);u.segmentIndex.pd(B,a.l.ob());B.length&&(L=Ov(m.W,"EXT-X-MEDIA-SEQUENCE",0),O=(I=Nv(m.W,"EXT-X-SKIP"))?Number(Z(I,"SKIPPED-SEGMENTS")):0,M=ow(L,B),N=M.qb,Q=M.rb,b.qb=N+O,b.rb=Q,R=v.get(L),u.segmentIndex.Ga(R));if(U=ng(u.segmentIndex))b.sc=U.startTime,aa=B[B.length-1],b.Kb=aa.endTime;if(fa=Nv(m.W,"EXT-X-ENDLIST"))b.fd=!0;pw(a,m);qw(a,m.W,u.type,r,b.M);H(
|
|
1100
|
+
function fw(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,D,A,B,C,E,F,J,K,L,I,O,M,N,Q,R,U,aa,fa;return P(function(qa){switch(qa.g){case 1:c=[];d=t(b.M());for(e=d.next();!e.done;e=d.next())f=e.value,g=new te(f),h=g.g,b.Dd&&(0<=b.qb&&h.add("_HLS_msn",String(b.qb)),0<=b.rb&&h.add("_HLS_part",String(b.rb))),b.Ed&&h.add("_HLS_skip","YES"),Ie(h)&&xe(g,h),c.push(g.toString());va(qa,2);return G(qa,cw(a,c,!0).promise,4);case 4:k=qa.h;xa(qa,3);break;case 2:throw l=ya(qa),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return qa.return();
|
|
1101
|
+
m=Tv(a.Ta,k.data);if(1!=m.type)throw new T(2,4,4017);n=k.uri;n==k.originalUri||b.M().includes(n)||b.Qg.push(n);p=Lv(m.W,"EXT-X-DEFINE");r=lw(a,p,n);u=b.stream;v=kw(a,b);return G(qa,mw(a,m,u.mimeType,b.M,r),5);case 5:w=qa.h;y=w.keyIds;z=w.drmInfos;D=function(Aa,Ha){return Aa.size===Ha.size&&[].concat(x(Aa)).every(function(Ya){return Ha.has(Ya)})};D(u.keyIds,y)||(u.keyIds=y,u.drmInfos=z,a.h.newDrmInfo(u));A=nw(a,m,v,r,b.M,b.type);B=A.segments;if(C=A.bandwidth)u.bandwidth=C;E=Ml(u);F=t(B);for(J=F.next();!J.done;J=
|
|
1102
|
+
F.next())K=J.value,K.Z&&(K.Z.Lc=E);u.segmentIndex.pd(B,a.l.ob());B.length&&(L=Ov(m.W,"EXT-X-MEDIA-SEQUENCE",0),O=(I=Nv(m.W,"EXT-X-SKIP"))?Number(Z(I,"SKIPPED-SEGMENTS")):0,M=ow(L,B),N=M.qb,Q=M.rb,b.qb=N+O,b.rb=Q,R=v.get(L),u.segmentIndex.Ga(R));if(U=ng(u.segmentIndex))b.sc=U.startTime,aa=B[B.length-1],b.Kb=aa.endTime;if(fa=Nv(m.W,"EXT-X-ENDLIST"))b.fd=!0;pw(a,m);qw(a,m.W,u.type,r,b.M);H(qa)}})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};
|
|
1102
1103
|
q.banLocation=function(a){this.j&&this.j.banLocation(a)};q.setMediaElement=function(a){this.ba=a};
|
|
1103
1104
|
function rw(a,b,c){c=void 0===c?!1:c;for(var d=-1==a.I,e=t(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=kw(a,f);if(g=ng(g)){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=t(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.I=Math.max(a.I,l));f.Qe=l;break}}}}if(!(0>a.I))for(b=t(b),d=b.next();!d.done;d=b.next())if(d=d.value,sw(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.I-d.Qe,0<f&&(e.g.splice(0,f),e=ng(e)))e=-e.startTime,d.stream.segmentIndex.offset(e),
|
|
1104
1105
|
tw(a,d,e)}
|
|
1105
1106
|
function uw(a,b){if(Infinity==a.ga){b=t(b);for(var c=b.next();!c.done;c=b.next())c=ng(c.value.stream.segmentIndex),null!=c&&null!=c.h&&(a.ga=Math.min(a.ga,c.h))}b=a.ga;if(Infinity!=b){c=t(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!sw(a,d.type)){var e=d.stream.segmentIndex;if(null!=e){var f=ng(e);if(f)if(null==f.h)Za("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.M(),"Expect AV sync issues!");else for(tw(a,d,f.h-b-f.startTime),d=t(e),e=d.next();!e.done;e=d.next())e.value.Uf(b)}}}}
|
|
1106
1107
|
function tw(a,b,c){b.sc+=c;b.Kb+=c;a=kw(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.M()}
|
|
1107
1108
|
function dw(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,D,A,B,C,E,F,J,K,L,I,O,M,N,Q,R,U,aa;return P(function(fa){switch(fa.g){case 1:d=Ye;e=Tv(a.Ta,b);f=Lv(e.W,"EXT-X-DEFINE");g=[];h=[];k=[];a.l=new Lk(null,0);a.l.wc(!0);l=function(){return[c]};m=null;n=new Map;if(1==e.type)return a.R=!1,A=Lv(e.W,"EXT-X-DEFINE"),n=lw(a,A,a.N),m=d.ja,B="",C=new Map,G(fa,vw(a,a.C++,n,e,l,"",m,B,!0,"Media Playlist",null,C,null,!1,null,!1),7);ww(a,f);p=Lv(e.W,"EXT-X-MEDIA");r=Lv(e.W,"EXT-X-STREAM-INF");u=Lv(e.W,"EXT-X-IMAGE-STREAM-INF");
|
|
1108
|
-
v=Lv(e.W,"EXT-X-I-FRAME-STREAM-INF");w=Lv(e.W,"EXT-X-SESSION-KEY");y=Lv(e.W,"EXT-X-SESSION-DATA");z=Lv(e.W,"EXT-X-CONTENT-STEERING");xw(a,y);return G(fa,yw(a,z),4);case 4:return zw(a,r),Aw(a,p),D=Bw(a,v),G(fa,Cw(a,r,w,p,l,a.A,D),5);case 5:return g=fa.h,h=Dw(a,p),G(fa,Ew(a,u,v),6);case 6:k=fa.h;fa.u(3);break;case 7:E=fa.h,a.i.set(c,E),E.stream&&(F=Ml(E.stream),E.stream.segmentIndex.Gb(function(
|
|
1109
|
+
v=Lv(e.W,"EXT-X-I-FRAME-STREAM-INF");w=Lv(e.W,"EXT-X-SESSION-KEY");y=Lv(e.W,"EXT-X-SESSION-DATA");z=Lv(e.W,"EXT-X-CONTENT-STEERING");xw(a,y);return G(fa,yw(a,z),4);case 4:return zw(a,r),Aw(a,p),D=Bw(a,v),G(fa,Cw(a,r,w,p,l,a.A,D),5);case 5:return g=fa.h,h=Dw(a,p),G(fa,Ew(a,u,v),6);case 6:k=fa.h;fa.u(3);break;case 7:E=fa.h,a.i.set(c,E),E.stream&&(F=Ml(E.stream),E.stream.segmentIndex.Gb(function(qa){qa.Z&&(qa.Z.Lc=F)})),m=E.stream.type,g.push({id:0,language:Gf(B||"und"),disabledUntilTime:0,primary:!0,
|
|
1109
1110
|
audio:"audio"==m?E.stream:null,video:"video"==m?E.stream:null,bandwidth:E.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new T(2,7,7001);Fw(a,e);1==e.type&&(ew(a)&&(Gw(a,e),J=a.o,a.B.$(J)),K=Array.from(a.i.values()),Hw(a,K),jw(a),qw(a,e.W,m,n,l));a.m={presentationTimeline:a.l,variants:g,textStreams:h,imageStreams:k,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
|
|
1110
1111
|
type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:a.s};if(a.fa||!a.g.hls.disableCodecGuessing){fa.u(8);break}L=[];I=t(a.m.variants);for(O=I.next();!O.done;O=I.next())M=O.value,M.audio&&""===M.audio.codecs&&L.push(M.audio.createSegmentIndex()),M.video&&""===M.video.codecs&&L.push(M.video.createSegmentIndex());return G(fa,Promise.all(L),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m);if(1==g.length){N=[];Q=g[0];R=t([Q.video,Q.audio]);for(U=R.next();!U.done;U=
|
|
1111
1112
|
R.next())(aa=U.value)&&!aa.segmentIndex&&N.push(aa.createSegmentIndex());if(0<N.length)return G(fa,Promise.all(N),0)}fa.u(0)}})}
|
|
@@ -1113,7 +1114,7 @@ function Iw(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,D,A,B,C,E,F;return P(func
|
|
|
1113
1114
|
0),5);case 5:p=J.h;case 4:(r=w.headers["content-type"])&&(r=r.split(";")[0].toLowerCase());case 2:return y=Tl(e.M(),e.Yb(),e.Wb(),a.g.retryParameters),G(J,Lw(a,y,n,{type:1}).promise,6);case 6:z=J.h;D=z.data;if(!e.aesKey){J.u(7);break}return G(J,Sl(D,e.aesKey,f),8);case 8:D=J.h;case 7:(A=z.headers["content-type"])&&(A=A.split(";")[0].toLowerCase());B="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");C=["audio/mp4","video/mp4","video/iso.segment"];if(Zj(Ab(D))){var K=D;var L=Ab(K);L=(new Rj).parse(L);
|
|
1114
1115
|
var I=L.ad();L=L.kf();var O=[],M=!1,N=!1;switch(I.audio){case "aac":case "aac-loas":O.push("mp4a.40.2");M=!0;break;case "mp3":O.push("mp4a.40.34");M=!0;break;case "ac3":O.push("ac-3");M=!0;break;case "ec3":O.push("ec-3");M=!0;break;case "opus":O.push("opus"),M=!0}switch(I.video){case "avc":L.codec?O.push(L.codec):O.push("avc1.42E01E");N=!0;break;case "hvc":L.codec?O.push(L.codec):O.push("hvc1.1.6.L93.90");N=!0;break;case "av1":O.push("av01.0.01M.08"),N=!0}if(O.length){I=M&&!N;M=new Map;if(N){N=new Hb("video/mp2t");
|
|
1115
1116
|
N.i(K);K=t(N.j());for(var Q=K.next();!Q.done;Q=K.next())Q=Q.value,M.set(Q,Q);N.g()}L={type:I?"audio":"video",mimeType:"video/mp2t",codecs:O.join(", "),language:null,height:L.height,width:L.width,channelCount:null,sampleRate:null,closedCaptions:M,wd:null,colorGamut:null,frameRate:L.frameRate}}else L=null;if(E=L)return J.return(E)}else if(B.includes(l)||C.includes(A)||r&&C.includes(r))if(F=Ol(p,D))return J.return(F);return A?J.return(Nl(A)):r?J.return(Nl(r)):J.return(c)}})}
|
|
1116
|
-
function jw(a){if(ew(a)){if(a.
|
|
1117
|
+
function jw(a){if(ew(a)){if(a.za==Mw){for(var b=Infinity,c=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Kb),c=Math.min(c,e.sc));b=b-c||0;isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.ne(b)}}else a.l.Za(Nw(a));if(!a.l.s)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=ng(c.stream.segmentIndex))&&c.h&&a.l.Zg(c.h);
|
|
1117
1118
|
a.l.Ud()}function ww(a,b){var c=(new te(a.N)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.A.has(d)||a.A.set(d,f));e&&(d=c.get(e)[0])&&!a.A.has(d)&&a.A.set(e,d)}}
|
|
1118
1119
|
function lw(a,b,c){c=(new te(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Z(f,"NAME"),h=Z(f,"VALUE");e=Z(f,"QUERYPARAM");f=Z(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.A.get(f))&&d.set(f,e)}return d}
|
|
1119
1120
|
function zw(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=Ow(a,d);if(f){var g=Ue(We,d);a.G.set(f,g);Ob(d,g)}e&&(f=Ue("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Ue("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
|
|
@@ -1123,9 +1124,9 @@ function Dw(a,b){var c=Mv(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)
|
|
|
1123
1124
|
function Sw(a){var b=new Set([af(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Gb(function(c){c.mimeType&&b.add(af(c.mimeType,a.codecs))});a.fullMimeTypes=b}
|
|
1124
1125
|
function Ew(a,b,c){var d,e;return P(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return P(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);va(m,2);return G(m,Tw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=ya(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Uw(a,g);return"image"!==h.stream.type?null:h.stream}catch(k){if(a.g.hls.ignoreImageStreamFailures)return null;
|
|
1125
1126
|
throw k;}})),G(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}function Vw(a,b,c){b=b.filter(function(h){var k=Z(h,"URI")||"";return"SUBTITLES"!=Z(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Gv(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Pw(a,d[g],c)}function Bw(a,b){return b.map(function(c){c=Uw(a,c);return"video"!==c.stream.type?null:c.stream}).filter(function(c){return c})}
|
|
1126
|
-
function Cw(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,y,z,D,A,B,C,E,F,J,K,L,I,O,M,N,Q,R,U,aa,fa,
|
|
1127
|
-
(D=Xw[r])?D(n,""):null;
|
|
1128
|
-
|
|
1127
|
+
function Cw(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,y,z,D,A,B,C,E,F,J,K,L,I,O,M,N,Q,R,U,aa,fa,qa,Aa,Ha,Ya,Pa;return P(function(ra){switch(ra.g){case 1:h=[];k=new Set;if(!(0<c.length)){ra.u(2);break}l=t(c);m=l.next();case 3:if(m.done){ra.u(2);break}n=m.value;p=Iv(n,"METHOD");r=Z(n,"KEYFORMAT")||"identity";u=null;if("NONE"==p){ra.u(4);break}if(Ww(p)){v=Pv(e(),Iv(n,"URI"),f);w=v.sort().join("");a.L.has(w)||(y=uh(v,a.g.retryParameters),z=Lw(a,y,6).promise,a.L.set(w,z));ra.u(4);break}if("identity"!=r){u=
|
|
1128
|
+
(D=Xw[r])?D(n,""):null;ra.u(6);break}return G(ra,Yw(a,n,"",e,null,f),9);case 9:u=ra.h;case 6:if(u){if(u.keyIds)for(A=t(u.keyIds),B=A.next();!B.done;B=A.next())C=B.value,k.add(C);h.push(u)}case 4:m=l.next();ra.u(3);break;case 2:E={};F=t(b);for(J=F.next();!J.done;J=F.next())K=J.value,L=Gv(K,!a.j),E[L]?E[L].push(K):E[L]=[K];I=[];for(O in E)M=E[O],N=M[0],Q=Z(N,"FRAME-RATE"),R=Number(Z(N,"AVERAGE-BANDWIDTH"))||Number(Iv(N,"BANDWIDTH")),U=Z(N,"RESOLUTION"),aa=t(U?U.split("x"):[null,null]),fa=aa.next().value,
|
|
1129
|
+
qa=aa.next().value,Aa=Z(N,"VIDEO-RANGE"),(Ha=Z(N,"REQ-VIDEO-LAYOUT"))&&Ha.includes(",")&&(Ya=Ha.split(",").filter(function(Sa){return"CH-STEREO"==Sa||"CH-MONO"==Sa}),Ha=Ya[0]),Ha=Ha||"CH-MONO",Pa=Zw(a,M,d),I.push.apply(I,x($w(a,Pa.audio,Pa.video,R,fa,qa,Q,Aa,Ha,h,k,g)));return ra.return(I.filter(function(Sa){return null!=Sa}))}})}
|
|
1129
1130
|
function Zw(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Z(m,"AUDIO");var n=Z(m,"VIDEO"),p=l||n;p&&(f.includes(p)||f.push(p),(m=Z(m,"PATHWAY-ID"))&&e.set(p,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(k=c.filter(function(v){return f.includes(Iv(v,"GROUP-ID"))}),Vw(a,k,e));k=(e=f.sort().join(","))&&a.H.has(e)?a.H.get(e):[];g?d.audio.push.apply(d.audio,x(k)):h&&d.video.push.apply(d.video,x(k));l=!1;var r=b.map(function(v){return Iv(v,
|
|
1130
1131
|
"URI")});h=d.audio.find(function(v){return v&&v.M().find(function(w){return r.includes(w)})});g=Ow(a,b[0]);n=Ue("video",g);(p=Ue("audio",g))&&!n?(h="audio",l=0<d.audio.length):!d.audio.length&&!d.video.length&&p&&n?(h="video",g=[[n,p].join()]):d.audio.length&&h?(h="audio",l=!0):h=d.video.length&&!d.audio.length?"audio":"video";if(!l){var u=m=p=n=l=null;!k.length&&(c=c.find(function(v){var w=Z(v,"URI")||"",y=Z(v,"TYPE");v=Iv(v,"GROUP-ID");return"SUBTITLES"!=y&&""==w&&f.includes(v)}))&&(l=Z(c,"LANGUAGE"),
|
|
1131
1132
|
n=Z(c,"NAME"),p=ax(c),bx(c),m=Z(c,"CHARACTERISTICS"),u=cx(c));a=dx(a,b,g,h,l,n,p,m,u);e&&(a.stream.groupId=e);d[a.stream.type]=[a]}return d}
|
|
@@ -1141,17 +1142,17 @@ Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.
|
|
|
1141
1142
|
function Uw(a,b){var c="video",d=Iv(b,"URI"),e=Z(b,"CODECS")||"";"mjpg"==e&&(c="image");if(a.i.has(d))return a.i.get(d);var f=Z(b,"LANGUAGE"),g=Z(b,"NAME"),h=Z(b,"CHARACTERISTICS");c=fx(a,a.C++,[d],e,c,f,!1,g,null,null,h,!1,null,!1);e=Z(b,"RESOLUTION");f=t(e?e.split("x"):[null,null]);e=f.next().value;f=f.next().value;c.stream.width=Number(e)||void 0;c.stream.height=Number(f)||void 0;if(b=Z(b,"BANDWIDTH"))c.stream.bandwidth=Number(b);a.i.set(d,c);return c}
|
|
1142
1143
|
function dx(a,b,c,d,e,f,g,h,k){for(var l=a.C++,m=[],n=t(b),p=n.next();!p.done;p=n.next()){var r=p.value;p=Iv(r,"URI");r=Z(r,"PATHWAY-ID");a.j&&r&&Ut(a.j,l,r,p);m.push(p)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d){if(a.g.disableText){a.R=!1;b=null;break a}if(b){if("NONE"!=b){b=a.F.get(b);break a}a.R=!1}else if(!b&&a.F.size)for(b=t(a.F.keys()).next();!b.done;){b=a.F.get(b.value);break a}}b=null}c=Te(d,c);d=fx(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,
|
|
1143
1144
|
d);return d}
|
|
1144
|
-
function fx(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(B){var C,E,F,J,K,L,I,O,M,N,Q,R,U,aa,fa,
|
|
1145
|
+
function fx(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(B){var C,E,F,J,K,L,I,O,M,N,Q,R,U,aa,fa,qa,Aa,Ha,Ya,Pa,ra,Sa,qc;return P(function(hb){switch(hb.g){case 1:return C=Ye,va(hb,2),E=z.M(),G(hb,B.promise,4);case 4:F=hb.h;if(B.aborted)return hb.return();J=F.uri;J==F.originalUri||E.includes(J)||y.push(J);K=Tv(a.Ta,F.data);if(1!=K.type)throw new T(2,4,4017);L=Lv(K.W,"EXT-X-DEFINE");I=lw(a,L,J);O=!1;(!a.fa&&a.g.hls.disableCodecGuessing||a.R&&e==C.ja&&!a.g.hls.disableClosedCaptionsDetection)&&0<K.segments.length&&
|
|
1145
1146
|
(a.R=!1,O=!0);M=!a.fa&&a.g.hls.disableCodecGuessing;N=ew(a);return G(hb,vw(a,0,I,K,v,d,e,f,g,h,k,l,m,n,p,r,void 0,O,M),5);case 5:Q=hb.h;if(B.aborted)return hb.return();R=Q.stream;Fw(a,K);ew(a)&&!N&&Gw(a,K);z.sc=Q.sc;z.Kb=Q.Kb;z.Ed=Q.Ed;z.Dd=Q.Dd;z.fd=Q.fd;z.Vd=Q.Vd;z.qb=Q.qb;z.rb=Q.rb;z.wf=!0;w.segmentIndex=R.segmentIndex;w.encrypted=R.encrypted;w.drmInfos=R.drmInfos;w.keyIds=R.keyIds;w.mimeType=R.mimeType;w.bandwidth=w.bandwidth||R.bandwidth;w.codecs=w.codecs||R.codecs;w.closedCaptions=w.closedCaptions||
|
|
1146
1147
|
R.closedCaptions;w.width=w.width||R.width;w.height=w.height||R.height;w.hdr=w.hdr||R.hdr;w.colorGamut=w.colorGamut||R.colorGamut;w.frameRate=w.frameRate||R.frameRate;"und"==w.language&&"und"!=R.language&&(w.language=R.language);w.language=w.language||R.language;w.channelsCount=w.channelsCount||R.channelsCount;w.audioSamplingRate=w.audioSamplingRate||R.audioSamplingRate;Sw(w);w.drmInfos.length&&a.h.newDrmInfo(w);U=!1;if(!l&&w.closedCaptions||l&&w.closedCaptions&&l.size!=w.closedCaptions.size)U=!0;
|
|
1147
|
-
a.m&&U&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==C.ja||e==C.Y)for(aa=t(a.i.values()),fa=aa.next();!fa.done;fa=aa.next())
|
|
1148
|
+
a.m&&U&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==C.ja||e==C.Y)for(aa=t(a.i.values()),fa=aa.next();!fa.done;fa=aa.next())qa=fa.value,qa.wf||qa.type!=e||(qa.stream.mimeType=R.mimeType,Sw(qa.stream));e==C.wa&&(Aa=ng(R.segmentIndex))&&Aa.Z&&(w.mimeType="application/mp4",Sw(w));Ha=Ml(w);w.segmentIndex.Gb(function(cc){cc.Z&&(cc.Z.Lc=Ha)});gx(a)&&(a.$b?Hw(a,[z]):(a.$b=!0,Ya=Array.from(a.i.values()),Pa=Ya.filter(function(cc){return cc.stream.segmentIndex}),Hw(a,Pa),jw(a),ra=a.o,0<ra&&a.B.$(ra)));qw(a,
|
|
1148
1149
|
K.W,w.type,I,v);a.m&&(a.m.startTime=a.s);xa(hb,0);break;case 2:Sa=ya(hb);w.closeSegmentIndex();if(7001===Sa.code)return hb.return();qc=a.h.disableStream(w);if(!qc)throw Sa;H(hb)}})}function v(){return a.j&&1<c.length?Vt(a.j,b):y.concat(Qv([a.N],c,a.A))}var w=hx(a,d,e,f,g,h,k,l,m,n,p,r),y=[],z={stream:w,type:e,Qg:y,M:v,sc:0,Kb:0,Vd:new Map,Ed:!1,Dd:!1,fd:!1,Qe:-1,qb:-1,rb:-1,wf:!1},D=null,A;w.createSegmentIndex=function(){if(D)return D;A=cw(a,z.M(),!0);return D=new Promise(function(B){B(u(A))})};w.closeSegmentIndex=
|
|
1149
1150
|
function(){D&&!w.segmentIndex&&A.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);D=null};return z}function Nw(a){var b=Infinity;a=t(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Kb));return b}function gw(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Gb(function(e){c.push(e)});a.l.rd(c)}
|
|
1150
1151
|
function Hw(a,b){if(!ew(a))for(var c=Nw(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Fc(0,c);gw(a,b.map(function(f){return f.stream}));c=ew(a)&&!a.ac;a.g.hls.ignoreManifestProgramDateTime||c?rw(a,b,c):(uw(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&rw(a,b))}function sw(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}
|
|
1151
1152
|
function gx(a){if(!a.m)return!1;var b=[],c=[];a=t(a.m.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
|
|
1152
|
-
function vw(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z){y=void 0===y?!0:y;z=void 0===z?!0:z;var D,A,B,C,E,F,J,K,L,I,O,M,N,Q,R,U,aa,fa,
|
|
1153
|
+
function vw(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z){y=void 0===y?!0:y;z=void 0===z?!0:z;var D,A,B,C,E,F,J,K,L,I,O,M,N,Q,R,U,aa,fa,qa,Aa,Ha,Ya,Pa,ra,Sa,qc,hb,cc,Gc;return P(function(nb){switch(nb.g){case 1:D=d.segments||[];A=D.every(function(Rc){return Nv(Rc.W,"EXT-X-GAP")?!0:!1});if(!D.length||A)throw new T(2,4,4053);ix(a,d);ew(a)&&pw(a,d);B=ew(a)?a.O.get(g):new Map;C=nw(a,d,B,c,e,g);E=C.segments;F=C.bandwidth;O=I=L=K=J=null;if(!(0<E.length&&y)){nb.u(2);break}return G(nb,Iw(a,E),3);case 3:M=nb.h,g=
|
|
1153
1154
|
M.type,h=M.language,m=M.channelCount,u=M.sampleRate,a.g.disableText||(n=M.closedCaptions),K=M.height,J=M.width,L=M.wd,I=M.colorGamut,O=M.frameRate,z&&(w=M.mimeType,f=M.codecs);case 2:if(w){nb.u(4);break}return G(nb,jx(a,g,f,E),5);case 5:w=nb.h;case 4:return G(nb,mw(a,d,w,e,c),6);case 6:N=nb.h;Q=N.drmInfos;R=N.keyIds;U=N.encrypted;aa=N.uh;if(U&&!Q.length&&!aa)throw new T(2,4,4026);fa=hx(a,f,g,h,k,l,m,n,p,r,u,v);fa.encrypted=U;fa.drmInfos=Q;fa.keyIds=R;fa.mimeType=w;F&&(fa.bandwidth=F);Sw(fa);"video"==
|
|
1154
|
-
g&&(J||K||L||I)&&ex(fa,J,K,O,L,null,I);ew(a)&&pw(a,d);
|
|
1155
|
+
g&&(J||K||L||I)&&ex(fa,J,K,O,L,null,I);ew(a)&&pw(a,d);qa=E[0].startTime;Aa=E[E.length-1];Ha=Aa.endTime;Ya=new gl(E);fa.segmentIndex=Ya;ra=(Pa=Nv(d.W,"EXT-X-SERVER-CONTROL"))?null!=Hv(Pa,"CAN-SKIP-UNTIL"):!1;Sa=Pa?null!=Hv(Pa,"CAN-BLOCK-RELOAD"):!1;qc=Ov(d.W,"EXT-X-MEDIA-SEQUENCE",0);hb=ow(qc,E);cc=hb.qb;Gc=hb.rb;return nb.return({stream:fa,type:g,Qg:[],M:e,sc:qa,Kb:Ha,Ed:ra,Dd:Sa,fd:!1,Qe:-1,qb:cc,rb:Gc,Vd:B,wf:!1})}})}
|
|
1155
1156
|
function ow(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{qb:a,rb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{qb:a,rb:c};c=d.length-1;d[d.length-1].isPreload()||(a++,c=0);return{qb:a,rb:c}}
|
|
1156
1157
|
function hx(a,b,c,d,e,f,g,h,k,l,m,n){var p=Qw(c,b)||Rw(c),r=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())r.push(u.value)}k=void 0;u=null;c==We?k=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(u="visually impaired");r.length||"subtitle"!==k||r.push("subtitle");a={id:a.C++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
|
|
1157
1158
|
segmentIndex:null,mimeType:p,codecs:b,kind:c==We?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Gf(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:r,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,
|
|
@@ -1165,15 +1166,15 @@ function pw(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<
|
|
|
1165
1166
|
Hv(b,"HOLD-BACK"):null,a.Ea=c?Number(c.value):0);a.bb=Math.max(d,a.bb)}function Gw(a,b){var c=0;if(a.g.defaultPresentationDelay)c=a.g.defaultPresentationDelay;else if(a.Fa)c=a.Fa;else if(a.Ea)c=a.Ea;else{var d=b.segments.length,e=a.g.hls.liveSegmentsDelay;e>d-2&&(e=Math.max(1,d-2));for(e=d-e;e<d;e++){var f=Nv(b.segments[e].W,"EXTINF");c=f?c+Math.ceil(Number(f.value.split(",")[0])):c+a.bb}}a.s&&0>a.s&&(c=Math.min(-a.s,c),a.s+=c);a.l.$g(0);a.l.Of(c);a.l.wc(!1)}
|
|
1166
1167
|
function kx(a,b,c,d,e){var f=Nv(c,"EXT-X-MAP");if(!f)return null;var g=Iv(f,"URI"),h=Pv(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.ta.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?Ww(Iv(m,"METHOD"))&&m.id<f.id&&(k=lx(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=nx(h,f,l,k);a.ta.set(g,b)}return a.ta.get(g)}
|
|
1167
1168
|
function nx(a,b,c,d){var e=0,f=null;b=Z(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new Wi(function(){return a},e,f,null,null,null,d)}
|
|
1168
|
-
function ox(a,b,c,d,e,f,g,h,k){function l(U){U=(new te(U)).Pa.split(".").pop();var aa=px[g][U];aa||(aa=Kw[U]);return aa}var m=d.W,n=Nv(m,"EXTINF"),p=0,r=0,u=null;d.Ab.length&&(a.m.isLowLatency=!0);var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Nv(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=od(w.value),a.ac=!0)}var y=
|
|
1169
|
-
b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var C=v,E={},F=0;F<d.Ab.length;E={ue:void 0,de:void 0},F++){var J=d.Ab[F],K=0==F?c:z[z.length-1],L=0==F?e:K.endTime,I=Number(Z(J,"DURATION"))||a.X;if(I){var O=L+I,M=0,N=null;"EXT-X-PRELOAD-HINT"==J.name?(M=(M=Z(J,"BYTERANGE-START"))?Number(M):0,(K=Z(J,"BYTERANGE-LENGTH"))?N=M+Number(K)-1:M&&(N=Number.MAX_SAFE_INTEGER)):(M=Z(J,"BYTERANGE"),N=t(qx(K,M)),M=N.next().value,N=N.next().value);E.de=Z(J,"URI");if(E.de){K=
|
|
1169
|
+
function ox(a,b,c,d,e,f,g,h,k){function l(U){U=(new te(U)).Pa.split(".").pop();var aa=px[g][U];aa||(aa=Kw[U]);return aa}var m=d.W,n=Nv(m,"EXTINF"),p=0,r=0,u=null;d.Ab.length&&(a.m.isLowLatency=!0);var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Nv(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=od(w.value),a.ac=!0)}var y=aj;Nv(m,"EXT-X-GAP")&&(a.m.gapCount++,y=2);if(!n){if(0==d.Ab.length)throw new T(2,4,4024,"EXTINF");if(!a.K)return null}var z=[];w=!1;var D=null,A=!1,B=!1;if(a.K&&d.Ab.length){p=
|
|
1170
|
+
b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var C=v,E={},F=0;F<d.Ab.length;E={ue:void 0,de:void 0},F++){var J=d.Ab[F],K=0==F?c:z[z.length-1],L=0==F?e:K.endTime,I=Number(Z(J,"DURATION"))||a.X;if(I){var O=L+I,M=0,N=null;"EXT-X-PRELOAD-HINT"==J.name?(M=(M=Z(J,"BYTERANGE-START"))?Number(M):0,(K=Z(J,"BYTERANGE-LENGTH"))?N=M+Number(K)-1:M&&(N=Number.MAX_SAFE_INTEGER)):(M=Z(J,"BYTERANGE"),N=t(qx(K,M)),M=N.next().value,N=N.next().value);E.de=Z(J,"URI");if(E.de){K=aj;"YES"==
|
|
1170
1171
|
Z(J,"GAP")&&(a.m.gapCount++,K=2,A=!0);E.ue=null;var Q=function(U){return function(){null==U.ue&&(U.ue=Pv(h(),U.de,f));return U.ue}}(E);p&&0<=M&&null!=N&&(D=Q,w=!0);L=new Yi(L,O,Q,M,N,b,0,0,Infinity,[],"",null,C,K,k);"EXT-X-PRELOAD-HINT"==J.name&&(L.xf(),B=!0);"YES"!=Z(J,"INDEPENDENT")&&0<F&&L.Kc();if(E=l(E.de))L.mimeType=E,rx.has(E)&&(L.Z=null);z.push(L);C&&(C+=I)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;p=e+n}else if(z.length)p=z[z.length-1].endTime;else return null;w&&(A||0!=
|
|
1171
1172
|
z[0].Ha?(w=!1,D=null):z=[]);(n=Nv(m,"EXT-X-BYTERANGE"))?(u=t(qx(c,n.value)),r=u.next().value,u=u.next().value):z.length&&(r=z[0].Ha,u=z[z.length-1].va);c="";n=null;"image"==g&&(c="1x1",m=Nv(m,"EXT-X-TILES"))&&(c=Iv(m,"LAYOUT"),(m=Z(m,"DURATION"))&&(n=Number(m)));var R=null;b=new Yi(e,p,function(){if(D)return D();null==R&&(R=Pv(h(),d.g,f));return R||[]},r,u,b,0,0,Infinity,z,c,n,v,y,k,0<z.length&&!!d.g);if(e=l(d.g))b.mimeType=e,rx.has(e)&&(b.Z=null);w&&(a.Hb=!0,b.Fg(),B&&b.xf());return b}
|
|
1172
1173
|
function qx(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.va+1,d=c+b-1);return[c,d]}
|
|
1173
1174
|
function qw(a,b,c,d,e){if("video"==c||"audio"==c){var f=a.l.m;if(f&&!sw(a,c))for(b=Lv(b,"EXT-X-DATERANGE"),b=b.sort(function(v,w){v=Iv(v,"START-DATE");w=Iv(w,"START-DATE");return v<w?-1:v>w?1:0}),c=0;c<b.length;c++){var g=b[c],h=Iv(g,"ID");if(!a.Da.has(h)){var k=Iv(g,"START-DATE"),l=od(k);if(!isNaN(l)){k=Math.max(0,l-f);var m=null,n=Z(g,"END-DATE");if(n&&(n=od(n),!isNaN(n)&&(m=n-f,0>m)))continue;if(null==m&&(n=Z(g,"DURATION")||Z(g,"PLANNED-DURATION"))&&(n=parseFloat(n),isNaN(n)||(m=k+n),0>l-f+n))continue;
|
|
1174
1175
|
n=Z(g,"CLASS")||"com.apple.quicktime.HLS";var p="YES"==Z(g,"END-ON-NEXT");if(null==m&&p){for(p=c+1;p<b.length;p++){var r=Z(b[p],"CLASS")||"com.apple.quicktime.HLS";if(n==r&&(r=Iv(b[p],"START-DATE"),r=od(r),!isNaN(r)&&r&&r>l)){m=Math.max(0,r-f);break}}if(null==m)continue}l=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];p=[];g=t(g.attributes);for(r=g.next();!r.done;r=g.next())if(r=r.value,!l.includes(r.name)){var u=Rv(r.value,d);if("X-ASSET-URI"==r.name||"X-ASSET-LIST"==r.name)u=Pv(e(),
|
|
1175
1176
|
r.value,d)[0];p.push({key:r.name,description:"",data:u,mimeType:null,pictureType:null})}if(1<p.length)a.h.onMetadata(n,k,m,p);a.Da.add(h)}}}}}
|
|
1176
|
-
function nw(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Ov(b.W,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Ov(b.W,"EXT-X-MEDIA-SEQUENCE",0),m=Nv(b.W,"EXT-X-SKIP"),n=m?Number(Z(m,"SKIPPED-SEGMENTS")):0,p=l+n,r=0;ew(a)&&c.has(p)&&(r=c.get(p));0===r&&a.
|
|
1177
|
+
function nw(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Ov(b.W,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Ov(b.W,"EXT-X-MEDIA-SEQUENCE",0),m=Nv(b.W,"EXT-X-SKIP"),n=m?Number(Z(m,"SKIPPED-SEGMENTS")):0,p=l+n,r=0;ew(a)&&c.has(p)&&(r=c.get(p));0===r&&a.za==Mw&&0<c.size&&!c.has(p)&&null!=a.l.i&&(r=a.l.ob());var u=[],v=null;m=[];for(var w=0;w<g.length;w++){var y=g[w],z=0==w?r:v.endTime;p=l+n+w;Nv(y.W,"EXT-X-DISCONTINUITY")&&k++;var D=t(y.W);for(var A=D.next();!A.done;A=D.next())A=A.value,"EXT-X-KEY"==A.name&&(Ww(Iv(A,
|
|
1177
1178
|
"METHOD"))?h=lx(a,A,b,e,d):h=void 0);c.set(p,z);D=kx(a,b,y.W,e,d);!a.K&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.K=a.h.isLowLatencyMode());if(z=ox(a,D,v,y,z,d,f,e,h))(v=Ov(y.W,"EXT-X-BITRATE"))?m.push({bitrate:v,duration:z.endTime-z.startTime}):m.length&&(v=m.pop(),v.duration+=z.endTime-z.startTime,m.push(v)),v=z,z.i=k,sw(a,f)&&null!=a.I&&p<a.I||u.push(z)}b=void 0;m.length&&(b=m.reduce(function(B,C){return B+C.duration},0),b=Math.round(m.reduce(function(B,C){return B+C.bitrate*C.duration},
|
|
1178
1179
|
0)/b*1E3));if(m=u.some(function(B){return null!=B.h}))for(c={},d=0;d<u.length;c={Id:void 0,Hd:void 0,zd:void 0,uc:void 0,yd:void 0},d++)if(c.uc=u[d],null==c.uc.h)for(c.Hd=0,c.Id=d,e=function(B){return function(){var C=u[B.Id];if(C){if(null!=C.h)return C.h+B.Hd;B.Hd-=C.endTime-C.startTime;B.Id+=1}return null}}(c),c.yd=0,c.zd=d,g=function(B){return function(){var C=u[B.zd];if(C){C!=B.uc&&(B.yd+=C.endTime-C.startTime);if(null!=C.h)return C.h+B.yd;--B.zd}return null}}(c);null==c.uc.h;)c.uc.h=g(),null==
|
|
1179
1180
|
c.uc.h&&(c.uc.h=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.ga;if(m&&Infinity!=c&&!sw(a,f))for(a=t(u),f=a.next();!f.done;f=a.next())f.value.Uf(c);return{segments:u,bandwidth:b}}
|
|
@@ -1181,24 +1182,24 @@ function Qw(a,b){if(a==We){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)
|
|
|
1181
1182
|
function jx(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,y;return P(function(z){switch(z.g){case 1:e=Ah;f=Jw(a,d);g=f.segment;if(2==g.status)return z.return(Rw(b));h=g.M();k=new te(h[0]);l=k.Pa.split(".").pop();m=px[b];if((n=m[l])||(n=Kw[l])||(n=Qw(b,c)))return z.return(n);r=1;u=uh(h,a.g.retryParameters);va(z,2);u.method="HEAD";return G(z,Lw(a,u,e,{type:r}).promise,4);case 4:v=z.h;p=v.headers["content-type"];xa(z,3);break;case 2:w=ya(z);if(!w||1002!=w.code&&1001!=w.code){z.u(3);break}u.method="GET";return G(z,
|
|
1182
1183
|
Lw(a,u,e,{type:r}).promise,6);case 6:y=z.h,p=y.headers["content-type"];case 3:return p?z.return(p.toLowerCase().split(";")[0]):z.return(Rw(b))}})}function ex(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function cw(a,b,c){return Lw(a,uh(b,a.g.retryParameters),0,{type:c?2:3})}
|
|
1183
1184
|
function aw(a){var b,c,d,e,f,g;return P(function(h){switch(h.g){case 1:if(!a.h)return h.return();va(h,2);b=Date.now();return G(h,a.update(),4);case 4:c=Date.now();ew(a)&&(d=(c-b)/1E3,a.Eb.sample(1,d),e=a.o,f=Math.max(0,e-Va(a.Eb)),a.B.$(f));xa(h,3);break;case 2:g=ya(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.B.$(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();H(h)}})}
|
|
1184
|
-
function ew(a){return a.
|
|
1185
|
+
function ew(a){return a.za!=bw}function iw(a,b){a.za=b;a.l&&a.l.wc(!ew(a));ew(a)||a.B.stop()}function Lw(a,b,c,d){if(!a.ea)throw new T(2,7,7001);d||(d={});d.isPreload=a.Fb();b=a.h.networkingEngine.request(c,b,d);oh(a.ea,b);return b}function Ww(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
|
|
1185
1186
|
function Yw(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,y,z,D,A;return P(function(B){switch(B.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(Ac())throw new T(2,4,4041);g=Iv(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return B.return(null);k=Pv(d(),Iv(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Oe(Me(k[0].split("data:text/plain;base64,").pop()));B.u(2);break}m=k.sort().join("");a.oa.has(m)||(n=uh(k,a.g.retryParameters),p=Lw(a,n,6).promise,a.oa.set(m,p));return G(B,
|
|
1186
1187
|
a.oa.get(m),3);case 3:r=B.h,l=Oe(r.data);case 2:u="00000000000000000000000000000000";if(!e){B.u(4);break}if(a.sa.has(e)){v=a.sa.get(e);B.u(5);break}w=Tl(e.M(),e.Yb(),e.Wb(),a.g.retryParameters);y=Ah;return G(B,Lw(a,w,y,{type:0}).promise,6);case 6:z=B.h,v=Rl(z.data),a.sa.set(e,v);case 5:v&&(u=v);case 4:return D=new Map,D.set(u,l),A="cenc","SAMPLE-AES"==g&&(A="cbcs"),B.return(Se(D,A))}})}S("shaka.hls.HlsParser",$v);
|
|
1187
1188
|
var Kw={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},px={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
|
|
1188
1189
|
vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},rx=new Set(["video/mp2t"].concat(x(bf))),Xw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new T(2,4,4040);if(Ac())throw new T(2,4,4041);b=Iv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");return Re("com.apple.fps",c,[{initDataType:"sinf",initData:new Uint8Array(0),
|
|
1189
1190
|
keyId:null}],Iv(a,"URI"))},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Iv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Iv(a,"URI");b=Zv(b.split("?")[0]);b=Ab(b.data);c=Re("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Iv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
|
|
1190
|
-
var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");a=Iv(a,"URI");a=Zv(a.split("?")[0]);a=Ab(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Xh(a,b,new Set,0);return Re("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},bw="VOD",mx="EVENT",Mw="LIVE",hw={qh:bw,
|
|
1191
|
+
var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");a=Iv(a,"URI");a=Zv(a.split("?")[0]);a=Ab(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Xh(a,b,new Set,0);return Re("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},bw="VOD",mx="EVENT",Mw="LIVE",hw={qh:bw,pj:mx,xj:Mw};Ri["application/x-mpegurl"]=function(){return new $v};Ri["application/vnd.apple.mpegurl"]=function(){return new $v};function sx(a){var b=0,c=Fb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Ab(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function tx(a){if(a=ux(a))a:{a=t(hd(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=id(b.value,"LA_URL")){a=fd(b);break a}a=""}else a="";return a}
|
|
1191
1192
|
function ux(a){a=Me(fd(a));a=sx(a).filter(function(b){return b.type===vx})[0];if(!a)return null;a=Ec(a.value,!0);return(a=Xc(a,"WRMHEADER"))?a:null}var vx=1,wx=(new Map).set("com.microsoft.playready",tx).set("com.microsoft.playready.recommendation",tx).set("com.microsoft.playready.software",tx).set("com.microsoft.playready.hardware",tx);function xx(a){if(!yx){yx=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);zx=Ax("ftyp",b,d,b,c);b=Ax("dref",Bx);Cx=Ax("dinf",b)}this.g=a}
|
|
1192
1193
|
function Dx(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Ax;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(Ex+1));m=Math.floor(m%(Ex+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Fx(h,4)),[0,0,0,0],x(Fx(n,4)),x(Fx(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],x(Fx(k,2)),[0,0],x(Fx(l,
|
|
1193
1194
|
2)),[0,0]));h=Ax("tkhd",h);k=Ax;n=g.duration*g.timescale;l=Math.floor(n/(Ex+1));n=Math.floor(n%(Ex+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Fx(g.timescale,4)),x(Fx(l,4)),x(Fx(n,4)),x(Fx(m,2)),[0,0]));l=Ax("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Gx;break;case "audio":m=Hx}n=Ax("hdlr",m);a:{switch(g.type){case "video":g=Ax("minf",Ax("vmhd",Ix),Cx,Jx(g));break a;
|
|
1194
1195
|
case "audio":g=Ax("minf",Ax("smhd",Kx),Cx,Jx(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Pe.apply(Je,x(b));f=a.g[0];c=Ax;d=f.duration*f.timescale;e=Math.floor(d/(Ex+1));d=Math.floor(d%(Ex+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Fx(f.timescale,4)),x(Fx(e,4)),x(Fx(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,
|
|
1195
1196
|
255]));e=Ax("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(Fx(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=Ax("trex",k),h.call(g,k);a=Pe.apply(Je,x(d));a=Ax("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=Pe.apply(Je,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(zx.byteLength+
|
|
1196
1197
|
a.byteLength);b.set(zx);b.set(a,zx.byteLength);return b}
|
|
1197
|
-
function Jx(a){var b=Ax,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.
|
|
1198
|
+
function Jx(a){var b=Ax,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.ya.byteLength)var e=Ax("avcC",a.ya);else{e=Ax;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.ab.length;n++){var p=Lx(a.ab[n]);switch(p[0]&31){case 7:g.push(p);f+=p.length+2;break;case 8:h.push(p),f+=p.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
|
|
1198
1199
|
0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(Fx(c,2)),x(Fx(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=Mx(a);g=new Uint8Array([]);
|
|
1199
|
-
a.encrypted&&(g=Nx(a),d="encv");c=Ax(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.
|
|
1200
|
-
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=Ax(".mp3",Ox(a));else if(a.codecs.includes("ac-3"))c=Ax("dac3",a.
|
|
1201
|
-
a.
|
|
1200
|
+
a.encrypted&&(g=Nx(a),d="encv");c=Ax(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.ya.byteLength&&(c=Ax("hvcC",a.ya)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(Fx(d,2)),x(Fx(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=Mx(a),g=new Uint8Array([]),a.encrypted&&(g=Nx(a),e="encv"),c=Ax(e,d,
|
|
1201
|
+
c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=Ax(".mp3",Ox(a));else if(a.codecs.includes("ac-3"))c=Ax("dac3",a.pa),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=Nx(a),d="enca"),a=Ax(d,Ox(a),c,e);else if(a.codecs.includes("ec-3"))c=Ax("dec3",a.pa),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=Nx(a),d="enca"),a=Ax(d,Ox(a),c,e);else if(a.codecs.includes("opus"))c=Ax("dOps",a.pa),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=Nx(a),d="enca"),a=Ax(d,Ox(a),c,e);else{if(0<a.pa.byteLength)c=Ax("esds",
|
|
1202
|
+
a.pa);else{c=Ax;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Te("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(x(Fx(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=Nx(a),d="enca");
|
|
1202
1203
|
a=Ax(d,Ox(a),c,e)}c=a}a=Ax("stsd",Px,c);return b("stbl",a,Ax("stts",Qx),Ax("stsc",Rx),Ax("stsz",Sx),Ax("stco",Tx))}function Mx(a){if(!a.Ba&&!a.Ca)return new Uint8Array([]);var b=a.Ca;a=new Uint8Array([].concat(x(Fx(a.Ba,4)),x(Fx(b,4))));return Ax("pasp",a)}function Ox(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(x(Fx(a.stream.audioSamplingRate||44100,2)),[0,0]))}
|
|
1203
1204
|
function Nx(a){var b=Ax;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(x(Fx(d,4))));c=Ax("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=Ax("schm",d);e=Ax;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=Lx(h.value)}a=new Uint8Array([0,
|
|
1204
1205
|
0,0,0,0,0,1,8]);f=Ax("tenc",a,f);return b("sinf",c,d,e("schi",f))}
|
|
@@ -1221,7 +1222,7 @@ function $x(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"t
|
|
|
1221
1222
|
closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:Gf(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:r,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,
|
|
1222
1223
|
matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=ay[e])&&w.roles.push(e),"main"===e&&(w.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return $a('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!by.includes(e.toUpperCase()))return $a("Codec not supported:",
|
|
1223
1224
|
e),null;c=cy(c,g,e,w);w.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return $a("Quality unsupported without CodecPrivateData",g),null;w.type="audio";w.mimeType="mss/audio/mp4";w.codecs=dy(e,c);break;case "video":if(!c)return $a("Quality unsupported without CodecPrivateData",g),null;w.type="video";w.mimeType="mss/video/mp4";w.codecs=ey(c);break;case "text":if(w.type=We,w.mimeType="application/mp4","TTML"===e||"DFXP"===e)w.codecs="stpp"}w.fullMimeTypes.add(af(w.mimeType,w.codecs));
|
|
1224
|
-
w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var y=a.m.get(w.id);else y=[],"video"==w.type&&(y=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),y={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,ab:y,
|
|
1225
|
+
w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var y=a.m.get(w.id);else y=[],"video"==w.type&&(y=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),y={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,ab:y,pa:new Uint8Array([]),ya:new Uint8Array([]),Ba:0,Ca:0,data:null,stream:w},y=Dx(new xx([y])),a.m.set(w.id,y);y=fy(a,new Wi(function(){return[]},0,null,Ml(w),w.mssPrivateData.timescale,
|
|
1225
1226
|
y),w,b,d);w.segmentIndex=new gl(y);return Promise.resolve()};w.closeSegmentIndex=function(){w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null)};return w}
|
|
1226
1227
|
function cy(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
|
|
1227
1228
|
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function dy(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function ey(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
|
|
@@ -1246,18 +1247,18 @@ function Ny(a,b,c){var d,e,f,g,h,k,l;return P(function(m){if(1==m.g){d=Jy(a.h,b,
|
|
|
1246
1247
|
Py.prototype.remove=function(a){var b=this,c;return P(function(d){return 1==d.g?(c=Iy(b.g,"session-ids"),G(d,Gy(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):G(d,c.promise(),0)})};function Qy(){this.g=new Map}Qy.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Qy.prototype.init=function(){var a=this;Ry.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
|
|
1247
1248
|
function Sy(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{pb:d,Ia:f},Ia:e})})});if(b)return b;throw new T(2,9,9013,"Could not find a cell that supports add-operations");}function Ty(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({pb:d,Ia:f},e)})})}
|
|
1248
1249
|
function Uy(a,b,c){a=a.g.get(b);if(!a)throw new T(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new T(2,9,9013,"Could not find cell with name "+c);return b}function Vy(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Wy(a){var b=Array.from(a.g.keys());if(!b.length)throw new T(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
|
|
1249
|
-
function Xy(a){var b,c,d;return P(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Ry,d.forEach(function(f){(f=f())&&b.push(f)})),G(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.u(0):G(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Yy(a,b){Ry.set(a,b)}S("shaka.offline.StorageMuxer",Qy);Qy.unregister=function(a){Ry.delete(a)};Qy.register=Yy;Qy.prototype.destroy=Qy.prototype.destroy;var Ry=new Map;function Zy(){Ky.apply(this,arguments)}
|
|
1250
|
+
function Xy(a){var b,c,d;return P(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Ry,d.forEach(function(f){(f=f())&&b.push(f)})),G(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.u(0):G(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Yy(a,b){Ry.set(a,b)}S("shaka.offline.StorageMuxer",Qy);Qy.unregister=function(a){Ry.delete(a)};Qy.register=Yy;Qy.prototype.destroy=Qy.prototype.destroy;var Ry=new Map;function Zy(){Ky.apply(this,arguments)}pa(Zy,Ky);Zy.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return P(function(g){d=Iy(c.h,c.g);e=d.store();f=new ah;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new T(2,9,9012,"Could not find values for "+a))};return G(g,Promise.all([d.promise(),f]),0)})};
|
|
1250
1251
|
Zy.prototype.Yc=function(a){var b,c,d,e,f,g;return P(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=$y(a.periods[c],e),b.push(f);return G(h,fu(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})})};
|
|
1251
1252
|
function $y(a,b){az(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return bz(e,a.startTime,b)})}
|
|
1252
1253
|
function bz(a,b,c){var d=a.initSegmentUri?cz(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
|
|
1253
1254
|
cz(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}Zy.prototype.lg=function(a){return{data:a.data}};
|
|
1254
1255
|
function cz(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 T(2,9,9004,"Could not parse uri "+a);}
|
|
1255
1256
|
function az(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=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){d=c++;for(var e=t(a),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d)}if(!a.length&&b.length)for(d=c++,
|
|
1256
|
-
e=t(b),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function dz(){Ky.apply(this,arguments)}
|
|
1257
|
+
e=t(b),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function dz(){Ky.apply(this,arguments)}pa(dz,Ky);
|
|
1257
1258
|
dz.prototype.Yc=function(a){var b,c,d,e,f,g;return P(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=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(ez(n,k.startTime,k.startTime+e));f=l;b.push(f)}return G(h,fu(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
|
|
1258
1259
|
Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
|
|
1259
1260
|
function ez(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
|
|
1260
|
-
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function fz(){Ky.apply(this,arguments)}
|
|
1261
|
+
appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function fz(){Ky.apply(this,arguments)}pa(fz,Ky);q=fz.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 Oy(this,a,b)};q.Yc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function gz(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=gz.prototype;
|
|
1261
1262
|
q.init=function(){var a=this,b=new ah,c=!1,d=new Zb(function(){c=!0;b.reject(new T(2,9,9017))});d.$(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 Zy(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new dz(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
|
|
1262
1263
|
new dz(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new fz(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Py(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["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 T(2,
|
|
1263
1264
|
9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return P(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return G(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return G(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return G(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return G(b,a.j.destroy(),8);case 8:if(!a.m){b.u(10);break}return G(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),H(b)}})};
|
|
@@ -1272,10 +1273,10 @@ b.next())for(g=e.value,e=nz(a,g,d),g=t(g.variantIds),h=g.next();!h.done;h=g.next
|
|
|
1272
1273
|
function nz(a,b,c){var d=b.segments.map(function(e){return oz(a,e,b)});c.rd(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new gl(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,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
|
|
1273
1274
|
null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([af(b.mimeType,b.codecs)])}}
|
|
1274
1275
|
function oz(a,b,c){var d=new iz("segment",a.h,a.g,b.dataKey);a=new Yi(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?pz(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";return a}function pz(a,b){var c=new iz("segment",a.h,a.g,b);return new Wi(function(){return[c.toString()]},0,null)};function qz(){this.g=null}q=qz.prototype;q.configure=function(){};
|
|
1275
|
-
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:d=jz(a);c.g=d;if(null==d||"manifest"!=d.g)throw new T(2,1,9004,a);e=new Qy;wa(m,2);return G(m,e.init(),4);case 4:return G(m,Uy(e,d.pb(),d.Ia()),5);case 5:return f=m.h,G(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new kz(d.pb(),d.Ia()),l=lz(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return
|
|
1276
|
+
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:d=jz(a);c.g=d;if(null==d||"manifest"!=d.g)throw new T(2,1,9004,a);e=new Qy;wa(m,2);return G(m,e.init(),4);case 4:return G(m,Uy(e,d.pb(),d.Ia()),5);case 5:return f=m.h,G(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new kz(d.pb(),d.Ia()),l=lz(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return za(m),G(m,e.destroy(),7);case 7:Ba(m,0)}})};q.stop=function(){return Promise.resolve()};
|
|
1276
1277
|
q.update=function(){};
|
|
1277
|
-
q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:return d=c.g,e=new Qy,va(m,2,3),G(m,e.init(),5);case 5:return G(m,Uy(e,d.pb(),d.Ia()),6);case 6:return f=m.h,G(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.u(3);break}return G(m,f.updateManifestExpiration(d.key(),b),3);case 3:return
|
|
1278
|
-
q.onInitialVariantChosen=function(){};q.banLocation=function(){};q.setMediaElement=function(){};Ri["application/x-offline-manifest"]=function(){return new qz};function rz(){}function sz(a){var b=jz(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=gh(a)):a=b&&"segment"==b.g?tz(b.key(),b):
|
|
1278
|
+
q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:return d=c.g,e=new Qy,va(m,2,3),G(m,e.init(),5);case 5:return G(m,Uy(e,d.pb(),d.Ia()),6);case 6:return f=m.h,G(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.u(3);break}return G(m,f.updateManifestExpiration(d.key(),b),3);case 3:return za(m),G(m,e.destroy(),10);case 10:Ba(m,0);break;case 2:ya(m),m.u(3)}})};
|
|
1279
|
+
q.onInitialVariantChosen=function(){};q.banLocation=function(){};q.setMediaElement=function(){};Ri["application/x-offline-manifest"]=function(){return new qz};function rz(){}function sz(a){var b=jz(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=gh(a)):a=b&&"segment"==b.g?tz(b.key(),b):ch(new T(2,1,9004,a));return a}
|
|
1279
1280
|
function tz(a,b){var c=new Qy;return gh(void 0).Aa(function(){return c.init()}).Aa(function(){return Uy(c,b.pb(),b.Ia())}).Aa(function(d){return d.getSegments([b.key()])}).Aa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}S("shaka.offline.OfflineScheme",rz);rz.plugin=sz;qh("offline",sz);function uz(a,b,c){var d,e,f,g,h,k;return P(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var r=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,vz(v.info,p)){v.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=wz(a,b,g);return G(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})}
|
|
1280
1281
|
function wz(a,b,c){var d,e;return P(function(f){switch(f.g){case 1:return d=new Yh({Mb:b,onError:function(){},be:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),va(f,2),d.configure(a),G(f,fi(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:xa(f,3);break;case 2:return ya(f),G(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],G(f,Promise.all(c.sessionIds.map(function(g){return P(function(h){if(1==
|
|
1281
1282
|
h.g)return va(h,2),G(h,ri(d,g),4);if(2!=h.g)return e.push(g),xa(h,0);ya(h);H(h)})})),6);case 6:return G(f,d.destroy(),7);case 7:return f.return(e)}})}function vz(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Pb(a.audioCapabilities,b.audioCapabilities,c)&&Pb(a.videoCapabilities,b.videoCapabilities,c)};function xz(a,b,c){var d=b.presentationTimeline.getDuration();b=yz(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function zz(a,b){var c=lz(new kz(a.pb(),a.Ia()),b),d=b.appMetadata||{};c=yz(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
|
|
@@ -1283,7 +1284,7 @@ function yz(a){var b=[],c=ug(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.n
|
|
|
1283
1284
|
case 4:b.h=null,b.g=null,H(k)}})})}function Fz(){if($b())a:{var a=t(Ry.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=Ez.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Fm(a,b));return Sm(this.h,a)};q.getConfiguration=function(){var a=Om();Sm(a,this.h,Om());return a};q.yb=function(){return this.g};
|
|
1284
1285
|
q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new zy(this.g);this.j.push(f);b=Gz(this,a,b||{},function(){var g;return P(function(h){if(1==h.g)return c?h.u(2):G(h,Bn(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=Qi(a,c||null);return h.return(g())})},e,f);b=new bh(b,function(){return Ay(f)});b.finally(function(){Ob(d.j,f)});return Hz(this,b)};
|
|
1285
1286
|
function Gz(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,y,z,D;return P(function(A){switch(A.g){case 1:return Iz(),h=g=null,k=new Qy,n=m=l=null,va(A,2,3),G(A,d(),5);case 5:return g=A.h,G(A,Jz(a,b,g,e),6);case 6:p=A.h;Kz(a);r=!p.presentationTimeline.U()&&!p.presentationTimeline.qc();if(!r)throw new T(2,9,9005,b);return G(A,a.Cc(p,function(B){n=n||B},e),7);case 7:h=A.h;Kz(a);if(n)throw n;return G(A,Lz(p,h,e),8);case 8:return G(A,k.init(),9);case 9:return Kz(a),G(A,Sy(k),10);case 10:return l=A.h,Kz(a),u=Mz(h,
|
|
1286
|
-
p,b,c,e,f),v=u.
|
|
1287
|
+
p,b,c,e,f),v=u.si,w=u.Wf,G(A,l.Ia.addManifests([v]),11);case 11:y=A.h;Kz(a);m=y[0];Kz(a);if(n)throw n;return G(A,Nz(a,w,m,v,f,e,l.Ia,p,h),12);case 12:return Kz(a),Oz(p,v,h,e),G(A,l.Ia.updateManifest(m,v),13);case 13:return Kz(a),z=new iz("manifest",l.path.pb,l.path.Ia,m),A.return(zz(z,v));case 3:return za(A),G(A,k.destroy(),14);case 14:if(!g){A.u(15);break}return G(A,g.stop(),15);case 15:if(!h){A.u(17);break}return G(A,h.destroy(),17);case 17:Ba(A,0);break;case 2:D=ya(A);if(null==m){A.u(19);break}return G(A,
|
|
1287
1288
|
Pz(m),19);case 19:throw n||D;}})}
|
|
1288
1289
|
function Nz(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,v,w,y,z;return P(function(D){switch(D.g){case 1:l={};m=0;n=function(A,B){var C,E,F,J,K,L,I;return P(function(O){if(1==O.g){C=t(A);E=C.next();for(F={};!E.done;F={Ec:void 0},E=C.next())F.Ec=E.value,J=wy(F.Ec,f),K=F.Ec.i,L=F.Ec.h,I=function(M){return function(N){var Q,R,U;return P(function(aa){if(1==aa.g)return G(aa,g.addSegments([{data:N}]),2);Q=aa.h;Kz(a);R=M.Ec.g;U=vy(R);l[U]=Q[0];m+=N.byteLength;H(aa)})}}(F),Cy(e,F.Ec.groupId,J,K,L,I);return G(O,Ey(e),
|
|
1289
1290
|
2)}if(!B)return O.u(0);Kz(a);Oz(h,d,k,f);return G(O,g.updateManifest(c,d),0)})};p=!1;va(D,2);if(!Qz(h)||!p||Rz(h)){D.u(4);break}return G(D,n(b.filter(function(A){return A.h}),!0),5);case 5:return Kz(a),b=b.filter(function(A){return!A.h}),r=l,u=m,l={},m=0,G(D,Sz(g,c,d,r,u,function(){return Kz(a)}),6);case 6:Kz(a);case 4:if(p){D.u(7);break}return G(D,n(b,!1),8);case 8:return Kz(a),v=l,w=m,l={},m=0,G(D,Sz(g,c,d,v,w,function(){return Kz(a)}),9);case 9:Kz(a);case 7:xa(D,0);break;case 2:return y=ya(D),
|
|
@@ -1294,13 +1295,13 @@ function Lz(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,D,A,B,C,E,F,J,K,L,I,O,M,N
|
|
|
1294
1295
|
e.push(lg(r));u=t(a.imageStreams);for(v=u.next();!v.done;v=u.next())w=v.value,e.push(mg(w));return G(Q,c.offline.trackSelectionCallback(e),3);case 3:y=Q.h;z=a.presentationTimeline.getDuration();D=0;A=t(y);for(B=A.next();!B.done;B=A.next())C=B.value,E=C.bandwidth*z/8,D+=E;va(Q,4);return G(Q,c.offline.downloadSizeCallback(D),6);case 6:F=Q.h;if(!F)throw new T(2,9,9014);xa(Q,5);break;case 4:J=ya(Q);if(J instanceof T)throw J;throw new T(2,9,9015);case 5:K=new Set;L=new Set;I=new Set;O=t(y);for(M=O.next();!M.done;M=
|
|
1295
1296
|
O.next())N=M.value,"variant"==N.type&&K.add(N.id),"text"==N.type&&L.add(N.id),"image"==N.type&&I.add(N.id);a.variants=a.variants.filter(function(R){return K.has(R.id)});a.textStreams=a.textStreams.filter(function(R){return L.has(R.id)});a.imageStreams=a.imageStreams.filter(function(R){return I.has(R.id)});Tz(a);H(Q)}})}
|
|
1296
1297
|
function Mz(a,b,c,d,e,f){var g=xz(c,b,d),h=e.offline.progressCallback;By(f,function(r,u){g.size=u;h(g,r)},function(r,u){k&&e.offline.usePersistentLicense&&l==u&&ni(a,"cenc",r)});var k=Qz(b)&&!Rz(b),l=null;k&&(l=Uz.get(a.g.keySystem));for(var m=new Az,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Cz(m,p.value);n=t(b.variants);for(p=n.next();!p.done;p=n.next())Bz(m,p.value);m=Vz(f,m,b,e);f=m.streams;m=m.Wf;n=a.g;p=e.offline.usePersistentLicense;
|
|
1297
|
-
n&&p&&(n.initData=[]);return{
|
|
1298
|
+
n&&p&&(n.initData=[]);return{si:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.bd(),streams:f,sessionIds:p?wi(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Wf:m}}function Qz(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
|
|
1298
1299
|
function Rz(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Oz(a,b,c,d){b.expiration=c.bd();c=wi(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Qz(a)&&d.offline.usePersistentLicense&&!c.length)throw new T(2,9,9007);}q.remove=function(a){return Wz(this,Xz(this,a))};
|
|
1299
|
-
function Xz(a,b){var c,d,e,f,g,h;return P(function(k){switch(k.g){case 1:Iz();c=jz(b);if(null==c||"manifest"!=c.g)throw new T(2,9,9004,b);d=c;e=new Qy;wa(k,2);return G(k,e.init(),4);case 4:return G(k,Uy(e,d.pb(),d.Ia()),5);case 5:return f=k.h,G(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],G(k,Promise.all([Yz(a,h,e),Zz(f,d,h)]),2);case 2:return
|
|
1300
|
+
function Xz(a,b){var c,d,e,f,g,h;return P(function(k){switch(k.g){case 1:Iz();c=jz(b);if(null==c||"manifest"!=c.g)throw new T(2,9,9004,b);d=c;e=new Qy;wa(k,2);return G(k,e.init(),4);case 4:return G(k,Uy(e,d.pb(),d.Ia()),5);case 5:return f=k.h,G(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],G(k,Promise.all([Yz(a,h,e),Zz(f,d,h)]),2);case 2:return za(k),G(k,e.destroy(),8);case 8:Ba(k,0)}})}
|
|
1300
1301
|
function $z(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:af(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:af(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Yz(a,b,c){return P(function(d){return G(d,aA(a.g,a.h.drm,c,b),0)})}
|
|
1301
|
-
function Zz(a,b,c){function d(){}var e=bA(c);zz(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.
|
|
1302
|
-
function cA(a){var b,c,d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:return Iz(),b=a.g,c=a.h.drm,d=new Qy,e=!1,wa(n,2),G(n,d.init(),4);case 4:f=[],Vy(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return G(n,k.getAll(),8);case 8:return l=n.h,G(n,uz(c,b,l),9);case 9:return m=n.h,G(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.u(5);break;case 2:return
|
|
1303
|
-
q.list=function(){return Wz(this,dA())};function dA(){var a,b,c;return P(function(d){switch(d.g){case 1:return Iz(),a=[],b=new Qy,wa(d,2),G(d,b.init(),4);case 4:return c=Promise.resolve(),Ty(b,function(e,f){c=c.then(function(){var g;return P(function(h){if(1==h.g)return G(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=zz(new iz("manifest",e.pb,e.Ia,l),k);a.push(k)});H(h)})})}),G(d,c,2);case 2:return
|
|
1302
|
+
function Zz(a,b,c){function d(){}var e=bA(c);zz(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Ki=function(){return Wz(this,cA(this))};
|
|
1303
|
+
function cA(a){var b,c,d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:return Iz(),b=a.g,c=a.h.drm,d=new Qy,e=!1,wa(n,2),G(n,d.init(),4);case 4:f=[],Vy(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return G(n,k.getAll(),8);case 8:return l=n.h,G(n,uz(c,b,l),9);case 9:return m=n.h,G(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.u(5);break;case 2:return za(n),G(n,d.destroy(),11);case 11:Ba(n,3);break;case 3:return n.return(!e)}})}
|
|
1304
|
+
q.list=function(){return Wz(this,dA())};function dA(){var a,b,c;return P(function(d){switch(d.g){case 1:return Iz(),a=[],b=new Qy,wa(d,2),G(d,b.init(),4);case 4:return c=Promise.resolve(),Ty(b,function(e,f){c=c.then(function(){var g;return P(function(h){if(1==h.g)return G(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=zz(new iz("manifest",e.pb,e.Ia,l),k);a.push(k)});H(h)})})}),G(d,c,2);case 2:return za(d),G(d,b.destroy(),6);case 6:Ba(d,3);break;case 3:return d.return(a)}})}
|
|
1304
1305
|
function Jz(a,b,c,d){var e,f,g,h,k;return P(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate},
|
|
1305
1306
|
onMetadata:function(){},disableStream:function(){},addFont:function(){}},c.configure(d.manifest),Kz(a),G(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Kz(a),k=eA(h),G(l,Promise.all(Eh(k,function(m){return m.createSegmentIndex()})),3);Kz(a);if(e)throw e;return l.return(h)})}
|
|
1306
1307
|
q.Cc=function(a,b,c){var d=this,e;return P(function(f){return 1==f.g?(e=new Yh({Mb:d.g,onError:b,be:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),G(f,ci(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?G(f,pi(e),3):f.return(e)})};
|
|
@@ -1308,12 +1309,12 @@ function Vz(a,b,c,d){var e=new Map,f=eA(c),g=new Map;f=t(f);for(var h=f.next();!
|
|
|
1308
1309
|
function fA(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,
|
|
1309
1310
|
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0===h?d.id:0;gA(d,c.presentationTimeline.ob(),function(l){var m=vy(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Dz(b,d.id)*p;p=yy(a.g,p);f.set(m,new uy(l,p,k,!1))}l.Z&&(n=vy(l.Z),f.has(n)||(p=.5*Dz(b,d.id),p=yy(a.g,p),f.set(n,new uy(l.Z,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,
|
|
1310
1311
|
initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});0!==h&&(k=(k+1)%h)});return g}function gA(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 Kz(a){if(a.l.g)throw new T(2,9,7001);}
|
|
1311
|
-
function Iz(){if(!Fz())throw new T(2,9,9E3);}function Wz(a,b){return P(function(c){if(1==c.g)return a.i.push(b),wa(c,2),G(c,b,4);if(2!=c.g)return c.return(c.h);
|
|
1312
|
+
function Iz(){if(!Fz())throw new T(2,9,9E3);}function Wz(a,b){return P(function(c){if(1==c.g)return a.i.push(b),wa(c,2),G(c,b,4);if(2!=c.g)return c.return(c.h);za(c);Ob(a.i,b);return Ba(c,0)})}function Hz(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Ob(a.i,c)})}
|
|
1312
1313
|
function bA(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(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)}
|
|
1313
1314
|
function aA(a,b,c,d){var e,f,g;return P(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Wy(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:$z(d,!1),videoCapabilities:$z(d,!0)}});return G(h,uz(b,a,f),2)}return 3!=h.g?(g=h.h,G(h,e.remove(g),3)):G(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
|
|
1314
1315
|
function eA(a){for(var b=new Set,c=t(a.variants),d=c.next();!d.done;d=c.next())d=d.value,d.audio&&b.add(d.audio),d.video&&b.add(d.video);c=t(a.textStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.imageStreams);for(c=a.next();!c.done;c=a.next())b.add(c.value);return b}
|
|
1315
|
-
function Tz(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}S("shaka.offline.Storage",Ez);Ez.deleteAll=function(){var a;return P(function(b){return 1==b.g?(a=new Qy,wa(b,2),G(b,Xy(a),2)):5!=b.g?(
|
|
1316
|
-
Ez.prototype.list=Ez.prototype.list;Ez.prototype.removeEmeSessions=Ez.prototype.
|
|
1316
|
+
function Tz(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}S("shaka.offline.Storage",Ez);Ez.deleteAll=function(){var a;return P(function(b){return 1==b.g?(a=new Qy,wa(b,2),G(b,Xy(a),2)):5!=b.g?(za(b),G(b,a.destroy(),5)):Ba(b,0)})};
|
|
1317
|
+
Ez.prototype.list=Ez.prototype.list;Ez.prototype.removeEmeSessions=Ez.prototype.Ki;Ez.prototype.remove=Ez.prototype.remove;Ez.prototype.store=Ez.prototype.store;Ez.prototype.getNetworkingEngine=Ez.prototype.yb;Ez.prototype.getConfiguration=Ez.prototype.getConfiguration;Ez.prototype.configure=Ez.prototype.configure;Ez.prototype.destroy=Ez.prototype.destroy;Ez.support=Fz;
|
|
1317
1318
|
var Uz=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95");Yp.offline=Fz;function hA(){}function iA(a,b){a={priority:b||0,callback:a};for(b=0;b<jA.length;b++)if(jA[b].priority<a.priority){jA.splice(b,0,a);return}jA.push(a)}S("shaka.polyfill",hA);hA.register=iA;hA.installAll=function(){for(var a=t(jA),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){$a("Error installing polyfill!",c)}}};var jA=[];function kA(){}function lA(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())mA(b.value)}function mA(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}hA.Aria=kA;kA.install=lA;iA(lA);function nA(){}function oA(){rc()||gc("Sky_STB")||pA()}hA.EncryptionScheme=nA;nA.install=oA;iA(oA,-2);function qA(){}
|
|
1318
1319
|
function rA(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
|
|
1319
1320
|
Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",sA);document.addEventListener("webkitfullscreenerror",sA);document.addEventListener("mozfullscreenchange",sA);document.addEventListener("mozfullscreenerror",sA);document.addEventListener("MSFullscreenChange",sA);document.addEventListener("MSFullscreenError",sA)}}
|
|
@@ -1330,7 +1331,7 @@ function DA(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.
|
|
|
1330
1331
|
function GA(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=gf(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=gf(c)&&b(c)}}}
|
|
1331
1332
|
function FA(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=kf(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=kf(c)&&b(c)}}}
|
|
1332
1333
|
function HA(){var a=MediaSource.isTypeSupported;kc()||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}hA.MediaSource=BA;BA.install=CA;iA(CA);function IA(){}function JA(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?KA():void 0!=window.orientation&&LA())}function KA(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
|
|
1333
|
-
function LA(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new MA;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new V("change");b.dispatchEvent(c)})}hA.Orientation=IA;IA.install=JA;function MA(){mh.call(this);this.type="";this.angle=0}
|
|
1334
|
+
function LA(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new MA;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new V("change");b.dispatchEvent(c)})}hA.Orientation=IA;IA.install=JA;function MA(){mh.call(this);this.type="";this.angle=0}pa(MA,mh);
|
|
1334
1335
|
MA.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
|
|
1335
1336
|
MA.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};iA(JA);function NA(){}var OA,PA,QA,RA,SA,TA;function UA(a,b){try{var c=new VA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function WA(a){var b=this.mediaKeys;b&&b!=a&&XA(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?XA(a,this):Promise.resolve()}
|
|
1336
1337
|
function YA(a){a=Ab(a.initData);if(Fb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Ec(a.subarray(4),!0);a=Ic(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Bb(a);this.dispatchEvent(b)}hA.PatchedMediaKeysApple=NA;
|
|
@@ -1340,7 +1341,7 @@ UA;window.shakaMediaKeysPolyfill=$A}};
|
|
|
1340
1341
|
function VA(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
|
|
1341
1342
|
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
|
|
1342
1343
|
VA.prototype.createMediaKeys=function(){var a=new ZA(this.keySystem);return Promise.resolve(a)};VA.prototype.getConfiguration=function(){return this.g};function ZA(a){this.h=new WebKitMediaKeys(a);this.g=new gb}ZA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new aB(this.h,a)};ZA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
1343
|
-
function XA(a,b){a.g.Qa();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",YA);try{return Sk(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}ZA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function aB(a){mh.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new gb;this.sessionId="";this.expiration=NaN;this.closed=new ah;this.keyStatuses=new bB}
|
|
1344
|
+
function XA(a,b){a.g.Qa();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",YA);try{return Sk(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}ZA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function aB(a){mh.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new gb;this.sessionId="";this.expiration=NaN;this.closed=new ah;this.keyStatuses=new bB}pa(aB,mh);q=aB.prototype;
|
|
1344
1345
|
q.generateRequest=function(a,b){var c=this;this.h=new ah;try{var d=this.l.createSession("video/mp4",Ab(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Zb()?"license-request":"license-renewal").set("message",Bb(e.message));e=new V("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(cB(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
|
|
1345
1346
|
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:cB(c,"output-not-allowed");break;default:cB(c,"internal-error")}});cB(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
|
|
1346
1347
|
q.update=function(a){this.g=new ah;try{this.i.update(Ab(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Qa()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function cB(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new V("keystatuseschange");a.dispatchEvent(b)}
|
|
@@ -1355,7 +1356,7 @@ d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||
|
|
|
1355
1356
|
function wB(a,b){a.h=b;a.g.Qa();var c=pB;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Bb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=xB(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Zb()?"licenserequest":"licenserenewal").set("message",d.message),d=new V("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){(d=xB(a,d.sessionId))&&d.ready()}),
|
|
1356
1357
|
a.g.D(b,c+"keyerror",function(d){var e=xB(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?yB(e,"output-restricted"):1==f?yB(e,"expired"):yB(e,"internal-error"))}}))}
|
|
1357
1358
|
sB.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new zB(b,this.l,a);this.i.push(a);return a};sB.prototype.setServerCertificate=function(){return Promise.resolve(!1)};sB.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
|
|
1358
|
-
function xB(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function zB(a,b,c){mh.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new ah;this.keyStatuses=new AB}
|
|
1359
|
+
function xB(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function zB(a,b,c){mh.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new ah;this.keyStatuses=new AB}pa(zB,mh);q=zB.prototype;q.ready=function(){yB(this,"usable");this.g&&this.g.resolve();this.g=null};
|
|
1359
1360
|
function BB(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Ab(Ic("LOAD_SESSION|"+c));else{var e=Ic("PERSISTENT|");d=Pe(e,b)}else d=Ab(b)}catch(g){return Promise.reject(g)}a.h=new ah;var f=vB("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Zb(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).$(.01)}return a.h}
|
|
1360
1361
|
function CB(a,b,c){if(a.g)a.g.then(function(){return CB(a,b,c)}).catch(function(){return CB(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Dc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Me(e.keys[0].k);e=Me(e.keys[0].kid)}else d=Ab(c),e=null;var f=vB("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
|
|
1361
1362
|
function yB(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new V("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return BB(this,b,null)};q.load=function(a){return"persistent-license"==this.l?BB(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new ah;CB(this,b,a);return b};
|
|
@@ -1395,7 +1396,7 @@ IC.prototype.parseMedia=function(a,b){a=Dc(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm
|
|
|
1395
1396
|
d+=8589934592;a=b.periodStart+d/9E4-a}else a=b.segmentStart;b=[];d=t(c[0].split("\n"));for(e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new Mc(e);var f=new Kb;Pc(e);Nc(e);for(var g=Pc(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):
|
|
1396
1397
|
(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Nc(e);g=Pc(e)}b.push(f)}d=new Map;Ud(d);e=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=t(h);for(g=h.next();!g.done;g=
|
|
1397
1398
|
h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Ed(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var r=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=r;break;case "color":m=!0;l.color=r;break;case "font-family":m=!0;l.fontFamily=r;break;case "font-size":m=!0;l.fontSize=
|
|
1398
|
-
r;break;case "font-weight":if(700<=parseInt(r,10)||"bold"==r)m=!0,l.fontWeight=ae;break;case "font-style":switch(r){case "normal":m=!0;l.fontStyle=
|
|
1399
|
+
r;break;case "font-weight":if(700<=parseInt(r,10)||"bold"==r)m=!0,l.fontWeight=ae;break;case "font-style":switch(r){case "normal":m=!0;l.fontStyle=Nd;break;case "italic":m=!0;l.fontStyle=be;break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(r);break;case "text-combine-upright":m=!0;l.textCombineUpright=r;break;case "text-shadow":m=!0;l.textShadow=r;break;case "white-space":m=!0,l.wrapLine="noWrap"!=r}}}m&&d.set(g,l)}}l=f;m=a;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||
|
|
1399
1400
|
"STYLE"==l[0]||"REGION"==l[0])f=null;else if(f=null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new Mc(l[0]),g=Qc(h),n=Oc(h,/[ \t]+--\x3e[ \t]+/g),k=Qc(h),null==g||null==n||null==k)$a("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;m=l.slice(1).join("\n").trim();d.has("global")?(l=d.get("global").clone(),l.startTime=g,l.endTime=k,l.payload=m):l=new Ed(g,k,m);Nc(h);for(g=Pc(h);g;)JC(l,g,b),Nc(h),g=Pc(h);Td(l,d);null!=f&&(l.id=f);f=l}f&&e.push(f)}return e};
|
|
1400
1401
|
function JC(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Gd:a.textAlign=de[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
|
|
1401
1402
|
b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Fd);else if(d=/^region:(.*)$/.exec(b)){if(b=KC(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=fe[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Jd,a.line=Number(c[1]),c[2]&&(a.lineAlign=fe[c[2].toUpperCase()])}
|
|
@@ -1417,32 +1418,32 @@ function aD(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1
|
|
|
1417
1418
|
function bD(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
|
|
1418
1419
|
2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function cD(a){this.i=a;this.h=0;this.g=new Map}q=cD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(mf(b)||"mp4a.40.2")+'"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1419
1420
|
q.transmux=function(a,b,c,d){for(var e=Ab(a),f=pj(e),g=f.length;g<e.length&&!aD(e,g);g++);a=1E3*c.endTime;f=oj(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=$C(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=ZC(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var l=k.Nd+k.da;g+l<=e.length&&h.push({data:e.subarray(g+
|
|
1420
|
-
k.Nd,g+l),size:k.da,duration:1024,eb:0,flags:{ib:0,Xa:0,Wa:0,Ua:0,Va:2,jb:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,ab:[],
|
|
1421
|
+
k.Nd,g+l),size:k.da,duration:1024,eb:0,flags:{ib:0,Xa:0,Wa:0,Ua:0,Va:2,jb:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,ab:[],pa:new Uint8Array([]),ya:new Uint8Array([]),Ba:0,Ca:0,data:{ub:this.h,baseMediaDecodeTime:a,Ya:h},stream:b};d=new xx([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Dx(d),this.g.set(c,b));c=Ux(d);this.h++;b=Pe(b,c);return Promise.resolve(b)};
|
|
1421
1422
|
S("shaka.transmuxer.AacTransmuxer",cD);cD.prototype.transmux=cD.prototype.transmux;cD.prototype.getOriginalMimeType=cD.prototype.getOriginalMimeType;cD.prototype.convertCodecs=cD.prototype.convertCodecs;cD.prototype.isSupported=cD.prototype.isSupported;cD.prototype.destroy=cD.prototype.destroy;ie("audio/aac",function(){return new cD("audio/aac")},qe);function dD(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
|
|
1422
|
-
1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,
|
|
1423
|
+
1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,pa:a,da:e}}
|
|
1423
1424
|
function eD(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function fD(a){this.i=a;this.h=0;this.g=new Map}q=fD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1424
|
-
q.transmux=function(a,b,c,d){a=Ab(a);for(var e=pj(a),f=e.length;f<a.length&&!eD(a,f);f++);var g=1E3*c.endTime;e=oj(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=dD(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.
|
|
1425
|
-
eb:0,flags:{ib:0,Xa:0,Wa:0,Ua:0,Va:2,jb:0}});f+=l.da}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,ab:[],
|
|
1426
|
-
fD.prototype.getOriginalMimeType=fD.prototype.getOriginalMimeType;fD.prototype.convertCodecs=fD.prototype.convertCodecs;fD.prototype.isSupported=fD.prototype.isSupported;fD.prototype.destroy=fD.prototype.destroy;ie("audio/ac3",function(){return new fD("audio/ac3")},qe);function gD(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new zj(a.subarray(b+2));Bj(c,2);Bj(c,3);var d=Cj(c,11)+1<<1,e=Cj(c,2);if(3==e){e=Cj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Cj(c,2);var g=Cj(c,3),h=Cj(c,1);c=Cj(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,
|
|
1427
|
-
q.transmux=function(a,b,c,d){a=Ab(a);for(var e=pj(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=oj(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=gD(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.
|
|
1428
|
-
size:l.da,duration:1536,eb:0,flags:{ib:0,Xa:0,Wa:0,Ua:0,Va:2,jb:0}});f+=l.da}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,ab:[],
|
|
1429
|
-
hD.prototype.getOriginalMimeType=hD.prototype.getOriginalMimeType;hD.prototype.convertCodecs=hD.prototype.convertCodecs;hD.prototype.isSupported=hD.prototype.isSupported;hD.prototype.destroy=hD.prototype.destroy;ie("audio/ec3",function(){return new hD("audio/ec3")},qe);function iD(a){if(!a.length)return null;var b=a.find(function(v){return 7==v.type});a=a.find(function(v){return 8==v.type});if(!b||!a)return null;var c=new zj(b.data),d=Oj(c);Oj(c);Oj(c);Ej(c);if(jD.includes(d)&&(d=W(c),3===d&&Bj(c,1),Ej(c),Ej(c),Bj(c,1),
|
|
1430
|
-
|
|
1431
|
-
k[5],255,225].concat(k,[1],b));return{height:c,width:f,
|
|
1425
|
+
q.transmux=function(a,b,c,d){a=Ab(a);for(var e=pj(a),f=e.length;f<a.length&&!eD(a,f);f++);var g=1E3*c.endTime;e=oj(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=dD(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.pa;k.push({data:a.subarray(f,f+l.da),size:l.da,duration:1536,
|
|
1426
|
+
eb:0,flags:{ib:0,Xa:0,Wa:0,Ua:0,Va:2,jb:0}});f+=l.da}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,ab:[],pa:h,ya:new Uint8Array([]),Ba:0,Ca:0,data:{ub:this.h,baseMediaDecodeTime:a,Ya:k},stream:b};d=new xx([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Dx(d),this.g.set(c,b));c=Ux(d);this.h++;b=Pe(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ac3Transmuxer",fD);fD.prototype.transmux=fD.prototype.transmux;
|
|
1427
|
+
fD.prototype.getOriginalMimeType=fD.prototype.getOriginalMimeType;fD.prototype.convertCodecs=fD.prototype.convertCodecs;fD.prototype.isSupported=fD.prototype.isSupported;fD.prototype.destroy=fD.prototype.destroy;ie("audio/ac3",function(){return new fD("audio/ac3")},qe);function gD(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new zj(a.subarray(b+2));Bj(c,2);Bj(c,3);var d=Cj(c,11)+1<<1,e=Cj(c,2);if(3==e){e=Cj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Cj(c,2);var g=Cj(c,3),h=Cj(c,1);c=Cj(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,pa:a,da:d}};function hD(a){this.i=a;this.h=0;this.g=new Map}q=hD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1428
|
+
q.transmux=function(a,b,c,d){a=Ab(a);for(var e=pj(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=oj(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=gD(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.pa;k.push({data:a.subarray(f,f+l.da),
|
|
1429
|
+
size:l.da,duration:1536,eb:0,flags:{ib:0,Xa:0,Wa:0,Ua:0,Va:2,jb:0}});f+=l.da}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,ab:[],pa:h,ya:new Uint8Array([]),Ba:0,Ca:0,data:{ub:this.h,baseMediaDecodeTime:a,Ya:k},stream:b};d=new xx([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Dx(d),this.g.set(c,b));c=Ux(d);this.h++;b=Pe(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ec3Transmuxer",hD);hD.prototype.transmux=hD.prototype.transmux;
|
|
1430
|
+
hD.prototype.getOriginalMimeType=hD.prototype.getOriginalMimeType;hD.prototype.convertCodecs=hD.prototype.convertCodecs;hD.prototype.isSupported=hD.prototype.isSupported;hD.prototype.destroy=hD.prototype.destroy;ie("audio/ec3",function(){return new hD("audio/ec3")},qe);function iD(a){if(!a.length)return null;var b=a.find(function(v){return 7==v.type});a=a.find(function(v){return 8==v.type});if(!b||!a)return null;var c=new zj(b.data),d=Oj(c);Oj(c);Oj(c);Ej(c);if(jD.includes(d)&&(d=W(c),3===d&&Bj(c,1),Ej(c),Ej(c),Bj(c,1),Nj(c))){d=3!==d?8:12;for(var e=0;e<d;e++)Nj(c)&&(6>e?Pj(c,16):Pj(c,64))}Ej(c);d=W(c);if(0===d)W(c);else if(1===d)for(Bj(c,1),Ej(c),Ej(c),d=W(c),e=0;e<d;e++)Ej(c);Ej(c);Bj(c,1);var f=W(c),g=W(c),h=Cj(c,1);0===h&&Bj(c,1);Bj(c,1);var k=0,l=0,m=0,n=0;
|
|
1431
|
+
Nj(c)&&(k=W(c),l=W(c),m=W(c),n=W(c));e=d=1;if(Nj(c)&&Nj(c)){var p=Oj(c),r=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<p&&16>=p?(d=r[p-1],e=u[p-1]):255===p&&(d=Cj(c,16),e=Cj(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1,k[3],k[4],
|
|
1432
|
+
k[5],255,225].concat(k,[1],b));return{height:c,width:f,ya:a,Ba:d,Ca:e}}
|
|
1432
1433
|
function kD(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=Qj(new zj(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(h),c.push(f.fullData))}return c.length?
|
|
1433
1434
|
{data:Pe.apply(Je,x(c)),jd:b}:null}var jD=[100,110,122,244,44,83,86,118,128,138,139,134];function lD(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=mD(b.fullData);a=nD(c.fullData);var f=oD(d.fullData);b=pD(b.fullData,c.fullData,d.fullData,{zf:e.zf,Vf:e.Vf,cf:a.cf,df:a.df,Xe:a.Xe,bf:a.bf,Ye:a.Ye,Ze:a.Ze,$e:a.$e,af:a.af,Re:a.Re,Se:a.Se,Te:a.Te,Ue:a.Ue,Ve:a.Ve,We:a.We,Ke:a.Ke,Xd:a.Xd,Ie:a.Ie,He:a.He,Ge:a.Ge,Cf:f.Cf});return{height:a.height,width:a.width,
|
|
1434
|
-
|
|
1435
|
-
function nD(a){a=new zj(a,!0);Oj(a);Oj(a);var b=0,c=0,d=0,e=0;Cj(a,4);var f=Cj(a,3);
|
|
1436
|
-
W(a),W(a);W(a);W(a);W(a);W(a);W(a);W(a);if(
|
|
1437
|
-
J+4;I++)Cj(a,1);Cj(a,1)}K=J=1;L=0;
|
|
1438
|
-
Cj(a,4);Cj(a,5);Cj(a,5);Cj(a,5)}for(N=0;N<=f;N++){var R=!0;Q=1;
|
|
1439
|
-
function oD(a){var b=new zj(a,!0);Oj(b);Oj(b);W(b);W(b);
|
|
1435
|
+
ya:b,Ba:a.Qi,Ca:a.Pi}}function mD(a){var b=new zj(a,!0);Oj(b);Oj(b);Cj(b,4);Cj(b,2);Cj(b,6);a=Cj(b,3);b=Nj(b);return{zf:a+1,Vf:b}}
|
|
1436
|
+
function nD(a){a=new zj(a,!0);Oj(a);Oj(a);var b=0,c=0,d=0,e=0;Cj(a,4);var f=Cj(a,3);Nj(a);for(var g=Cj(a,2),h=Cj(a,1),k=Cj(a,5),l=Oj(a),m=Oj(a),n=Oj(a),p=Oj(a),r=Oj(a),u=Oj(a),v=Oj(a),w=Oj(a),y=Oj(a),z=Oj(a),D=Oj(a),A=[],B=[],C=0;C<f;C++)A.push(Nj(a)),B.push(Nj(a));if(0<f)for(C=f;8>C;C++)Cj(a,2);for(C=0;C<f;C++)A[C]&&Cj(a,88),B[C]&&Oj(a);W(a);A=W(a);3==A&&Cj(a,1);B=W(a);C=W(a);Nj(a)&&(b+=W(a),c+=W(a),d+=W(a),e+=W(a));var E=W(a),F=W(a),J=W(a);if(Nj(a))for(var K=0;K<=f;K++)W(a),W(a),W(a);else W(a),
|
|
1437
|
+
W(a),W(a);W(a);W(a);W(a);W(a);W(a);W(a);if(Nj(a)&&Nj(a))for(K=0;4>K;K++)for(var L=0;L<(3===K?2:6);L++)if(Nj(a)){var I=Math.min(64,1<<4+(K<<1));1<K&&Fj(a);for(var O=0;O<I;O++)Fj(a)}else W(a);Nj(a);Nj(a);Nj(a)&&(Oj(a),W(a),W(a),Nj(a));K=W(a);for(I=L=0;I<K;I++)if(O=!1,0!==I&&(O=Nj(a)),O){I===K&&W(a);Nj(a);W(a);for(var M=O=0;M<=L;M++){var N=Nj(a),Q=!1;N||(Q=Nj(a));(N||Q)&&O++}L=O}else{M=W(a);O=W(a);L=M+O;for(N=0;N<M;N++)W(a),Nj(a);for(M=0;M<O;M++)W(a),Nj(a)}if(Nj(a))for(K=W(a),L=0;L<K;L++){for(I=0;I<
|
|
1438
|
+
J+4;I++)Cj(a,1);Cj(a,1)}K=J=1;L=0;Nj(a);Nj(a);if(Nj(a)){Nj(a)&&(I=Oj(a),O=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],M=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<I&&16>=I?(J=O[I-1],K=M[I-1]):255===I&&(J=Cj(a,16),K=Cj(a,16)));Nj(a)&&Nj(a);Nj(a)&&(Cj(a,3),Nj(a),Nj(a)&&(Oj(a),Oj(a),Oj(a)));Nj(a)&&(W(a),W(a));Nj(a);Nj(a);Nj(a);if(I=Nj(a))W(a),W(a),W(a),W(a);if(Nj(a)&&(Cj(a,32),Cj(a,32),Nj(a)&&W(a),Nj(a))){M=!1;I=Nj(a);O=Nj(a);if(I||O){if(M=Nj(a))Oj(a),Cj(a,5),Nj(a),Cj(a,5);Cj(a,4);Cj(a,4);M&&
|
|
1439
|
+
Cj(a,4);Cj(a,5);Cj(a,5);Cj(a,5)}for(N=0;N<=f;N++){var R=!0;Q=1;Nj(a)||(R=Nj(a));var U=!1;R?W(a):U=Nj(a);U||(Q=W(a)+1);if(I){for(R=0;R<Q;R++)W(a),W(a),M&&(W(a),W(a));Nj(a)}if(O){for(R=0;R<Q;R++)W(a),W(a),M&&(W(a),W(a));Nj(a)}}}Nj(a)&&(Nj(a),Nj(a),Nj(a),L=W(a),W(a),W(a),W(a),W(a))}return{Xe:D,cf:g,df:h,bf:k,Ye:l,Ze:m,$e:n,af:p,Re:r,Se:u,Te:v,Ue:w,Ve:y,We:z,Xd:L,Ke:0,Ie:A,He:E,Ge:F,width:B-(b+c)*(1===A||2===A?2:1),height:C-(d+e)*(1===A?2:1),Qi:J,Pi:K}}
|
|
1440
|
+
function oD(a){var b=new zj(a,!0);Oj(b);Oj(b);W(b);W(b);Nj(b);Nj(b);Cj(b,3);Nj(b);Nj(b);W(b);W(b);Fj(b);Nj(b);Nj(b);Nj(b)&&W(b);Fj(b);Fj(b);Nj(b);Nj(b);Nj(b);Nj(b);a=Nj(b);b=Nj(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Cf:c}}
|
|
1440
1441
|
function pD(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.cf&3)<<6|(d.df?1:0)<<5|d.bf&31;e[2]=d.Ye;e[3]=d.Ze;e[4]=d.$e;e[5]=d.af;e[6]=d.Re;e[7]=d.Se;e[8]=d.Te;e[9]=d.Ue;e[10]=d.Ve;e[11]=d.We;e[12]=d.Xe;e[13]=240|(d.Xd&3840)>>8;e[14]=d.Xd&255;e[15]=252|d.Cf&3;e[16]=252|d.Ie&3;e[17]=248|d.He&7;e[18]=248|d.Ge&7;e[19]=0;e[20]=0;e[21]=(d.Ke&3)<<6|(d.zf&7)<<3|(d.Vf?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
|
|
1441
|
-
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function qD(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*rD[14*(3===c?3-d:3===d?3:4)+e-1];f=sD[3*(3===c?0:2===c?1:2)+f];c=tD[c][d];var h=uD[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,da:k,
|
|
1442
|
+
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function qD(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*rD[14*(3===c?3-d:3===d?3:4)+e-1];f=sD[3*(3===c?0:2===c?1:2)+f];c=tD[c][d];var h=uD[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,da:k,Oi:8*c*h}}return null}
|
|
1442
1443
|
function vD(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function wD(a,b){if(b+1<a.length&&vD(a,b)){var c=qD(a,b),d=4;c&&c.da&&(d=c.da);b+=d;return b===a.length||b+1<a.length&&vD(a,b)}return!1}
|
|
1443
1444
|
var rD=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],sD=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],tD=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],uD=[0,1,1,4];function xD(a){this.i=a;this.h=0;this.g=new Map}q=xD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOriginalMimeType=function(){return this.i};
|
|
1444
|
-
q.transmux=function(a,b,c,d){for(var e=Ab(a),f=pj(e).length;f<e.length&&!wD(e,f);f++);var g;for(a=[];f<e.length;){var h=qD(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));g||(g=h);f+h.da<=e.length&&a.push({data:e.subarray(f,f+h.da),size:h.da,duration:1152,eb:0,flags:{ib:0,Xa:0,Wa:0,Ua:0,Va:2,jb:0}});f+=h.da}if(!g)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));e=9E4*g.
|
|
1445
|
-
duration:d,ab:[],
|
|
1445
|
+
q.transmux=function(a,b,c,d){for(var e=Ab(a),f=pj(e).length;f<e.length&&!wD(e,f);f++);var g;for(a=[];f<e.length;){var h=qD(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));g||(g=h);f+h.da<=e.length&&a.push({data:e.subarray(f,f+h.da),size:h.da,duration:1152,eb:0,flags:{ib:0,Xa:0,Wa:0,Ua:0,Va:2,jb:0}});f+=h.da}if(!g)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));e=9E4*g.Oi/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
|
|
1446
|
+
duration:d,ab:[],pa:new Uint8Array([]),ya:new Uint8Array([]),Ba:0,Ca:0,data:{ub:this.h,baseMediaDecodeTime:e,Ya:a},stream:b};d=new xx([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Dx(d),this.g.set(c,b));c=Ux(d);this.h++;b=Pe(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Mp3Transmuxer",xD);xD.prototype.transmux=xD.prototype.transmux;xD.prototype.getOriginalMimeType=xD.prototype.getOriginalMimeType;xD.prototype.convertCodecs=xD.prototype.convertCodecs;xD.prototype.isSupported=xD.prototype.isSupported;
|
|
1446
1447
|
xD.prototype.destroy=xD.prototype.destroy;ie("audio/mpeg",function(){return new xD("audio/mpeg")},qe);function yD(a){this.h=a;this.g=null}q=yD.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=mf(a).split(","),c=Ue("audio",b);b=Ue("video",b);return!c||b||"mp3"!=hf(c)?!1:mb(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOriginalMimeType=function(){return this.h};
|
|
1447
1448
|
q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new Rj;a=Ab(a);a=this.g.parse(a);if("mp3"!=a.ad().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));c=new Uint8Array([]);e=t(a.Vb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=qD(a,b))?(b+d.da<=a.length&&(c=Pe(c,a.subarray(b,b+d.da))),b+=d.da):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",yD);yD.prototype.transmux=yD.prototype.transmux;
|
|
1448
1449
|
yD.prototype.getOriginalMimeType=yD.prototype.getOriginalMimeType;yD.prototype.convertCodecs=yD.prototype.convertCodecs;yD.prototype.isSupported=yD.prototype.isSupported;yD.prototype.destroy=yD.prototype.destroy;ie("video/mp2t",function(){return new yD("video/mp2t")},ne);/*
|
|
@@ -1464,19 +1465,19 @@ q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])retur
|
|
|
1464
1465
|
q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=mf(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return bg(c,"audio/mp4")}).map(ag).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOriginalMimeType=function(){return this.l};
|
|
1465
1466
|
q.transmux=function(a,b,c,d,e){var f=Ab(a);if("audio"==e&&!Zj(f)){for(var g=pj(f),h=g.length;h<f.length;h++)if(wD(f,h))return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));for(h=g.length;h<f.length;h++)if(aD(f,h))return this.h||(this.h=new cD("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.M()[0]:null))}this.j?this.j.clearData():this.j=new Rj;var k=this.j.parse(f),l=[],m=k.ad();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=[],v=k.oc();
|
|
1466
1467
|
if(!v.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var w=0;w<v.length;w++){var y=v[w],z=y.nalus;u.push.apply(u,x(z));var D=kD(z);if(D){null==r&&(r=y.dts);var A=void 0;A=w+1<v.length?(v[w+1].dts||0)-(y.dts||0):1<v.length?(y.dts||0)-(v[w-1].dts||0):9E4*(c.endTime-c.startTime);p.push({data:D.data,size:D.data.byteLength,duration:A,eb:Math.round((y.pts||0)-(y.dts||0)),flags:{ib:0,Xa:0,Wa:0,Ua:0,Va:D.jd?2:1,jb:D.jd?0:1}})}}var B=iD(u);if(!B||null==r)throw new T(2,3,3018,c?c.M()[0]:null);b.height=B.height;
|
|
1467
|
-
b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ab:[],
|
|
1468
|
-
N=!0;break;case 19:case 20:case 21:O=aa=N=!0;break;case 32:aa=!0;break;case 33:aa=!0;break;case 34:aa=!0;break;case 35:N=aa=!0;break;case 39:case 40:aa=!0;break;default:aa=!1}if(N&&aa){var fa=U.fullData.byteLength,
|
|
1469
|
-
1].dts||0):9E4*(c.endTime-c.startTime);C.push({data:
|
|
1470
|
-
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Pa=[],
|
|
1471
|
-
Xa:0,Wa:0,Ua:0,Va:2,jb:0}});nb+=oe}else nb++}}}if(!
|
|
1472
|
-
duration:1024,eb:0,flags:{ib:0,Xa:0,Wa:0,Ua:0,Va:2,jb:0}})
|
|
1473
|
-
ln.pts&&(
|
|
1474
|
-
Ba:0,Ca:0,data:{ub:this.g,baseMediaDecodeTime:VD,Ya:
|
|
1475
|
-
Df++}}if(0==
|
|
1476
|
-
se);Ef?(
|
|
1477
|
-
[],
|
|
1478
|
-
0,1,2,3,4];break;case 134:
|
|
1479
|
-
yd=
|
|
1468
|
+
b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ab:[],pa:new Uint8Array([]),ya:B.ya,Ba:B.Ba,Ca:B.Ca,data:{ub:this.g,baseMediaDecodeTime:r,Ya:p},stream:b};break;case "hvc":var C=[],E=null,F=[],J=k.oc();if(!J.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var K=0;K<J.length;K++){var L=J[K],I=L.nalus;F.push.apply(F,x(I));for(var O=!1,M=[],N=!1,Q=t(I),R=Q.next();!R.done;R=Q.next()){var U=R.value;switch(U.type){case 1:case 0:var aa=
|
|
1469
|
+
N=!0;break;case 19:case 20:case 21:O=aa=N=!0;break;case 32:aa=!0;break;case 33:aa=!0;break;case 34:aa=!0;break;case 35:N=aa=!0;break;case 39:case 40:aa=!0;break;default:aa=!1}if(N&&aa){var fa=U.fullData.byteLength,qa=new Uint8Array(4);qa[0]=fa>>24&255;qa[1]=fa>>16&255;qa[2]=fa>>8&255;qa[3]=fa&255;M.push(qa);M.push(U.fullData)}}var Aa=M.length?{data:Pe.apply(Je,x(M)),jd:O}:null;if(Aa){null==E&&null!=L.dts&&(E=L.dts);var Ha=void 0;Ha=K+1<J.length?(J[K+1].dts||0)-(L.dts||0):1<J.length?(L.dts||0)-(J[K-
|
|
1470
|
+
1].dts||0):9E4*(c.endTime-c.startTime);C.push({data:Aa.data,size:Aa.data.byteLength,duration:Ha,eb:Math.round((L.pts||0)-(L.dts||0)),flags:{ib:0,Xa:0,Wa:0,Ua:0,Va:Aa.jd?2:1,jb:Aa.jd?0:1}})}}var Ya=lD(F);if(!Ya||null==E)throw new T(2,3,3018,c?c.M()[0]:null);b.height=Ya.height;b.width=Ya.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ab:[],pa:new Uint8Array([]),ya:Ya.ya,Ba:Ya.Ba,Ca:Ya.Ca,data:{ub:this.g,baseMediaDecodeTime:E,Ya:C},stream:b}}n&&
|
|
1471
|
+
(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Pa=[],ra,Sa=null,qc=t(k.Vb()),hb=qc.next();!hb.done;hb=qc.next()){var cc=hb.value,Gc=cc.data;if(Gc){var nb=0;ra=$C(Gc,nb);if(!ra)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=ra.sampleRate;b.channelsCount=ra.channelCount;null==Sa&&null!==cc.pts&&(Sa=cc.pts);for(;nb<Gc.length;){var Rc=ZC(Gc,nb);if(Rc){var oe=Rc.Nd+Rc.da;nb+oe<=Gc.length&&Pa.push({data:Gc.subarray(nb+Rc.Nd,nb+oe),size:Rc.da,duration:1024,eb:0,flags:{ib:0,
|
|
1472
|
+
Xa:0,Wa:0,Ua:0,Va:2,jb:0}});nb+=oe}else nb++}}}if(!ra||null==Sa){if(!k.oc().length)throw new T(2,3,3018,c?c.M()[0]:null);Sa=9E4*c.startTime;var Od=Ue("audio",b.codecs.split(","));if(!Od||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.M()[0]:null);ra={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:Od};var uf=bD(Od,b.channelsCount);if(!uf)throw new T(2,3,3018,c?c.M()[0]:null);for(var pe=Sa+9E4*(c.endTime-c.startTime),Zi=Sa;Zi<pe;)Pa.push({data:uf,size:uf.byteLength,
|
|
1473
|
+
duration:1024,eb:0,flags:{ib:0,Xa:0,Wa:0,Ua:0,Va:2,jb:0}}),Zi+=1024/ra.sampleRate*9E4}var Qg=ra.sampleRate,$i=Sa/9E4*Qg;n={id:b.id,type:"audio",codecs:ra.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Qg,duration:d,ab:[],pa:new Uint8Array([]),ya:new Uint8Array([]),Ba:0,Ca:0,data:{ub:this.g,baseMediaDecodeTime:$i,Ya:Pa},stream:b};break;case "ac3":for(var Rg=[],dc=0,jn=new Uint8Array([]),Gj=null,bv=t(k.Vb()),kn=bv.next();!kn.done;kn=bv.next()){var ln=kn.value,mn=ln.data;null==Gj&&null!==
|
|
1474
|
+
ln.pts&&(Gj=ln.pts);for(var Cf=0;Cf<mn.length;){var Rd=dD(mn,Cf);Rd?(b.audioSamplingRate=Rd.sampleRate,b.channelsCount=Rd.channelCount,dc=Rd.sampleRate,jn=Rd.pa,Rg.push({data:mn.subarray(Cf,Cf+Rd.da),size:Rd.da,duration:1536,eb:0,flags:{ib:0,Xa:0,Wa:0,Ua:0,Va:2,jb:0}}),Cf+=Rd.da):Cf++}}if(0==dc||0==jn.byteLength||null==Gj)throw new T(2,3,3018,c?c.M()[0]:null);var VD=Gj/9E4*dc;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:dc,duration:d,ab:[],pa:jn,ya:new Uint8Array([]),
|
|
1475
|
+
Ba:0,Ca:0,data:{ub:this.g,baseMediaDecodeTime:VD,Ya:Rg},stream:b};break;case "ec3":for(var cv=[],Hj=0,nn=new Uint8Array([]),Ij=null,dv=t(k.Vb()),on=dv.next();!on.done;on=dv.next()){var pn=on.value,qn=pn.data;null==Ij&&null!==pn.pts&&(Ij=pn.pts);for(var Df=0;Df<qn.length;){var Sd=gD(qn,Df);Sd?(b.audioSamplingRate=Sd.sampleRate,b.channelsCount=Sd.channelCount,Hj=Sd.sampleRate,nn=Sd.pa,cv.push({data:qn.subarray(Df,Df+Sd.da),size:Sd.da,duration:1536,eb:0,flags:{ib:0,Xa:0,Wa:0,Ua:0,Va:2,jb:0}}),Df+=Sd.da):
|
|
1476
|
+
Df++}}if(0==Hj||0==nn.byteLength||null==Ij)throw new T(2,3,3018,c?c.M()[0]:null);var WD=Ij/9E4*Hj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Hj,duration:d,ab:[],pa:nn,ya:new Uint8Array([]),Ba:0,Ca:0,data:{ub:this.g,baseMediaDecodeTime:WD,Ya:cv},stream:b};break;case "mp3":for(var ev=[],Jj,Kj=null,fv=t(k.Vb()),rn=fv.next();!rn.done;rn=fv.next()){var sn=rn.value,dh=sn.data;if(dh){null==Kj&&null!==sn.pts&&(Kj=sn.pts);for(var se=0;se<dh.length;){var Ef=qD(dh,
|
|
1477
|
+
se);Ef?(Jj||(Jj=Ef),se+Ef.da<=dh.length&&ev.push({data:dh.subarray(se,se+Ef.da),size:Ef.da,duration:1152,eb:0,flags:{ib:0,Xa:0,Wa:0,Ua:0,Va:2,jb:0}}),se+=Ef.da):se++}}}if(!Jj||null==Kj)throw new T(2,3,3018,c?c.M()[0]:null);var gv=Jj.sampleRate,XD=Kj/9E4*gv;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:gv,duration:d,ab:[],pa:new Uint8Array([]),ya:new Uint8Array([]),Ba:0,Ca:0,data:{ub:this.g,baseMediaDecodeTime:XD,Ya:ev},stream:b};break;case "opus":var hv=
|
|
1478
|
+
[],Lj=null,Zc=k.F;if(!Zc)throw new T(2,3,3018,c?c.M()[0]:null);var Eb=[];switch(Zc.Ah){case 1:case 2:Eb=[0];break;case 0:Eb=[255,1,1,0,1];break;case 128:Eb=[255,2,0,0,1];break;case 3:Eb=[1,2,1,0,2,1];break;case 4:Eb=[1,2,2,0,1,2,3];break;case 5:Eb=[1,3,2,0,4,1,2,3];break;case 6:Eb=[1,4,2,0,4,1,2,3,5];break;case 7:Eb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Eb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Eb=[1,1,2,0,1];break;case 131:Eb=[1,1,3,0,1,2];break;case 132:Eb=[1,1,4,0,1,2,3];break;case 133:Eb=[1,1,5,
|
|
1479
|
+
0,1,2,3,4];break;case 134:Eb=[1,1,6,0,1,2,3,4,5];break;case 135:Eb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Eb=[1,1,8,0,1,2,3,4,5,6,7]}var iv=new Uint8Array([0,Zc.channelCount,0,0,Zc.sampleRate>>>24&255,Zc.sampleRate>>>17&255,Zc.sampleRate>>>8&255,Zc.sampleRate>>>0&255,0,0].concat(x(Eb)));for(var jv=Zc.sampleRate,kv=t(k.Vb()),tn=kv.next();!tn.done;tn=kv.next()){var un=tn.value,Ff=un.data;null==Lj&&null!==un.pts&&(Lj=un.pts);for(var eh=0;eh<Ff.length;){for(var YD=0!==(Ff[eh+1]&16),ZD=0!==(Ff[eh+1]&8),
|
|
1480
|
+
yd=eh+2,Mj=0;255===Ff[yd];)Mj+=255,yd+=1;Mj+=Ff[yd];yd+=1;yd+=YD?2:0;yd+=ZD?2:0;var lv=Ff.slice(yd,yd+Mj);hv.push({data:lv,size:lv.byteLength,duration:960,eb:0,flags:{ib:0,Xa:0,Wa:0,Ua:0,Va:2,jb:0}});eh=yd+Mj}}if(0==iv.byteLength||null==Lj)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=Zc.sampleRate;b.channelsCount=Zc.channelCount;var $D=Lj/9E4*jv;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:jv,duration:d,ab:[],pa:iv,ya:new Uint8Array([]),Ba:0,
|
|
1480
1481
|
Ca:0,data:{ub:this.g,baseMediaDecodeTime:$D,Ya:hv},stream:b}}n&&(l.push(n),n=null)}}catch(vn){return vn&&3023==vn.code?Promise.resolve(new Uint8Array([])):Promise.reject(vn)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var mv=new xx(l),wn=b.id+"_"+c.i;if(this.i.has(wn))var xn=this.i.get(wn);else xn=Dx(mv),this.i.set(wn,xn);var aE=Ux(mv);this.g++;var bE=Pe(xn,aE);return Promise.resolve(bE)};S("shaka.transmuxer.TsTransmuxer",DD);DD.prototype.transmux=DD.prototype.transmux;
|
|
1481
1482
|
DD.prototype.getOriginalMimeType=DD.prototype.getOriginalMimeType;DD.prototype.convertCodecs=DD.prototype.convertCodecs;DD.prototype.isSupported=DD.prototype.isSupported;DD.prototype.destroy=DD.prototype.destroy;var ED=["aac","ac-3","ec-3","mp3","opus"],FD=["avc","hevc"];ie("video/mp2t",function(){return new DD("video/mp2t")},me);/*
|
|
1482
1483
|
@license
|