10 lines
141 KiB
JavaScript
10 lines
141 KiB
JavaScript
(function(me,pe){typeof exports=="object"&&typeof module=="object"?module.exports=pe():typeof define=="function"&&define.amd?define([],pe):typeof exports=="object"?exports.flvjs=pe():me.flvjs=pe()})(self,function(){return function(){var me={264:function(W,K,T){/*!
|
|
* @overview es6-promise - a tiny implementation of Promises/A+.
|
|
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
|
|
* @license Licensed under MIT license
|
|
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
|
|
* @version v4.2.8+1e68dce6
|
|
*/W.exports=function(){"use strict";function N(b){var R=typeof b;return b!==null&&(R==="object"||R==="function")}function Z(b){return typeof b=="function"}var f=Array.isArray?Array.isArray:function(b){return Object.prototype.toString.call(b)==="[object Array]"},p=0,g=void 0,m=void 0,E=function(b,R){u[p]=b,u[p+1]=R,(p+=2)===2&&(m?m(d):k())};function M(b){m=b}function L(b){E=b}var D=typeof window!="undefined"?window:void 0,I=D||{},H=I.MutationObserver||I.WebKitMutationObserver,ee=typeof self=="undefined"&&typeof process!="undefined"&&{}.toString.call(process)==="[object process]",A=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function O(){return function(){return process.nextTick(d)}}function S(){return g!==void 0?function(){g(d)}:o()}function P(){var b=0,R=new H(d),B=document.createTextNode("");return R.observe(B,{characterData:!0}),function(){B.data=b=++b%2}}function y(){var b=new MessageChannel;return b.port1.onmessage=d,function(){return b.port2.postMessage(0)}}function o(){var b=setTimeout;return function(){return b(d,1)}}var u=new Array(1e3);function d(){for(var b=0;b<p;b+=2)(0,u[b])(u[b+1]),u[b]=void 0,u[b+1]=void 0;p=0}function l(){try{var b=Function("return this")().require("vertx");return g=b.runOnLoop||b.runOnContext,S()}catch(R){return o()}}var k=void 0;function i(b,R){var B=this,j=new this.constructor(n);j[r]===void 0&&re(j);var z=B._state;if(z){var q=arguments[z-1];E(function(){return X(z,j,q,B._result)})}else Q(B,j,b,R);return j}function e(b){var R=this;if(b&&typeof b=="object"&&b.constructor===R)return b;var B=new R(n);return x(B,b),B}k=ee?O():H?P():A?y():D===void 0?l():o();var r=Math.random().toString(36).substring(2);function n(){}var a=void 0,_=1,s=2;function t(){return new TypeError("You cannot resolve a promise with itself")}function h(){return new TypeError("A promises callback cannot return that same promise.")}function c(b,R,B,j){try{b.call(R,B,j)}catch(z){return z}}function v(b,R,B){E(function(j){var z=!1,q=c(B,R,function(te){z||(z=!0,R!==te?x(j,te):F(j,te))},function(te){z||(z=!0,U(j,te))},"Settle: "+(j._label||" unknown promise"));!z&&q&&(z=!0,U(j,q))},b)}function w(b,R){R._state===_?F(b,R._result):R._state===s?U(b,R._result):Q(R,void 0,function(B){return x(b,B)},function(B){return U(b,B)})}function C(b,R,B){R.constructor===b.constructor&&B===i&&R.constructor.resolve===e?w(b,R):B===void 0?F(b,R):Z(B)?v(b,R,B):F(b,R)}function x(b,R){if(b===R)U(b,t());else if(N(R)){var B=void 0;try{B=R.then}catch(j){return void U(b,j)}C(b,R,B)}else F(b,R)}function G(b){b._onerror&&b._onerror(b._result),Y(b)}function F(b,R){b._state===a&&(b._result=R,b._state=_,b._subscribers.length!==0&&E(Y,b))}function U(b,R){b._state===a&&(b._state=s,b._result=R,E(G,b))}function Q(b,R,B,j){var z=b._subscribers,q=z.length;b._onerror=null,z[q]=R,z[q+_]=B,z[q+s]=j,q===0&&b._state&&E(Y,b)}function Y(b){var R=b._subscribers,B=b._state;if(R.length!==0){for(var j=void 0,z=void 0,q=b._result,te=0;te<R.length;te+=3)j=R[te],z=R[te+B],j?X(B,j,z,q):z(q);b._subscribers.length=0}}function X(b,R,B,j){var z=Z(B),q=void 0,te=void 0,_e=!0;if(z){try{q=B(j)}catch(fe){_e=!1,te=fe}if(R===q)return void U(R,h())}else q=j;R._state!==a||(z&&_e?x(R,q):_e===!1?U(R,te):b===_?F(R,q):b===s&&U(R,q))}function ie(b,R){try{R(function(B){x(b,B)},function(B){U(b,B)})}catch(B){U(b,B)}}var se=0;function V(){return se++}function re(b){b[r]=se++,b._state=void 0,b._result=void 0,b._subscribers=[]}function $(){return new Error("Array Methods must be provided an Array")}var oe=function(){function b(R,B){this._instanceConstructor=R,this.promise=new R(n),this.promise[r]||re(this.promise),f(B)?(this.length=B.length,this._remaining=B.length,this._result=new Array(this.length),this.length===0?F(this.promise,this._result):(this.length=this.length||0,this._enumerate(B),this._remaining===0&&F(this.promise,this._result))):U(this.promise,$())}return b.prototype._enumerate=function(R){for(var B=0;this._state===a&&B<R.length;B++)this._eachEntry(R[B],B)},b.prototype._eachEntry=function(R,B){var j=this._instanceConstructor,z=j.resolve;if(z===e){var q=void 0,te=void 0,_e=!1;try{q=R.then}catch(ge){_e=!0,te=ge}if(q===i&&R._state!==a)this._settledAt(R._state,B,R._result);else if(typeof q!="function")this._remaining--,this._result[B]=R;else if(j===J){var fe=new j(n);_e?U(fe,te):C(fe,R,q),this._willSettleAt(fe,B)}else this._willSettleAt(new j(function(ge){return ge(R)}),B)}else this._willSettleAt(z(R),B)},b.prototype._settledAt=function(R,B,j){var z=this.promise;z._state===a&&(this._remaining--,R===s?U(z,j):this._result[B]=j),this._remaining===0&&F(z,this._result)},b.prototype._willSettleAt=function(R,B){var j=this;Q(R,void 0,function(z){return j._settledAt(_,B,z)},function(z){return j._settledAt(s,B,z)})},b}();function he(b){return new oe(this,b).promise}function ae(b){var R=this;return f(b)?new R(function(B,j){for(var z=b.length,q=0;q<z;q++)R.resolve(b[q]).then(B,j)}):new R(function(B,j){return j(new TypeError("You must pass an array to race."))})}function ce(b){var R=new this(n);return U(R,b),R}function ue(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function ne(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var J=function(){function b(R){this[r]=V(),this._result=this._state=void 0,this._subscribers=[],n!==R&&(typeof R!="function"&&ue(),this instanceof b?ie(this,R):ne())}return b.prototype.catch=function(R){return this.then(null,R)},b.prototype.finally=function(R){var B=this,j=B.constructor;return Z(R)?B.then(function(z){return j.resolve(R()).then(function(){return z})},function(z){return j.resolve(R()).then(function(){throw z})}):B.then(R,R)},b}();function de(){var b=void 0;if(T.g!==void 0)b=T.g;else if(typeof self!="undefined")b=self;else try{b=Function("return this")()}catch(j){throw new Error("polyfill failed because global object is unavailable in this environment")}var R=b.Promise;if(R){var B=null;try{B=Object.prototype.toString.call(R.resolve())}catch(j){}if(B==="[object Promise]"&&!R.cast)return}b.Promise=J}return J.prototype.then=i,J.all=he,J.race=ae,J.resolve=e,J.reject=ce,J._setScheduler=M,J._setAsap=L,J._asap=E,J.polyfill=de,J.Promise=J,J}()},716:function(W){"use strict";var K,T=typeof Reflect=="object"?Reflect:null,N=T&&typeof T.apply=="function"?T.apply:function(A,O,S){return Function.prototype.apply.call(A,O,S)};K=T&&typeof T.ownKeys=="function"?T.ownKeys:Object.getOwnPropertySymbols?function(A){return Object.getOwnPropertyNames(A).concat(Object.getOwnPropertySymbols(A))}:function(A){return Object.getOwnPropertyNames(A)};var Z=Number.isNaN||function(A){return A!=A};function f(){f.init.call(this)}W.exports=f,W.exports.once=function(A,O){return new Promise(function(S,P){function y(u){A.removeListener(O,o),P(u)}function o(){typeof A.removeListener=="function"&&A.removeListener("error",y),S([].slice.call(arguments))}ee(A,O,o,{once:!0}),O!=="error"&&function(u,d,l){typeof u.on=="function"&&ee(u,"error",d,l)}(A,y,{once:!0})})},f.EventEmitter=f,f.prototype._events=void 0,f.prototype._eventsCount=0,f.prototype._maxListeners=void 0;var p=10;function g(A){if(typeof A!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}function m(A){return A._maxListeners===void 0?f.defaultMaxListeners:A._maxListeners}function E(A,O,S,P){var y,o,u,d;if(g(S),(o=A._events)===void 0?(o=A._events=Object.create(null),A._eventsCount=0):(o.newListener!==void 0&&(A.emit("newListener",O,S.listener?S.listener:S),o=A._events),u=o[O]),u===void 0)u=o[O]=S,++A._eventsCount;else if(typeof u=="function"?u=o[O]=P?[S,u]:[u,S]:P?u.unshift(S):u.push(S),(y=m(A))>0&&u.length>y&&!u.warned){u.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+String(O)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=A,l.type=O,l.count=u.length,d=l,console&&console.warn&&console.warn(d)}return A}function M(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function L(A,O,S){var P={fired:!1,wrapFn:void 0,target:A,type:O,listener:S},y=M.bind(P);return y.listener=S,P.wrapFn=y,y}function D(A,O,S){var P=A._events;if(P===void 0)return[];var y=P[O];return y===void 0?[]:typeof y=="function"?S?[y.listener||y]:[y]:S?function(o){for(var u=new Array(o.length),d=0;d<u.length;++d)u[d]=o[d].listener||o[d];return u}(y):H(y,y.length)}function I(A){var O=this._events;if(O!==void 0){var S=O[A];if(typeof S=="function")return 1;if(S!==void 0)return S.length}return 0}function H(A,O){for(var S=new Array(O),P=0;P<O;++P)S[P]=A[P];return S}function ee(A,O,S,P){if(typeof A.on=="function")P.once?A.once(O,S):A.on(O,S);else{if(typeof A.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof A);A.addEventListener(O,function y(o){P.once&&A.removeEventListener(O,y),S(o)})}}Object.defineProperty(f,"defaultMaxListeners",{enumerable:!0,get:function(){return p},set:function(A){if(typeof A!="number"||A<0||Z(A))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+A+".");p=A}}),f.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},f.prototype.setMaxListeners=function(A){if(typeof A!="number"||A<0||Z(A))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+A+".");return this._maxListeners=A,this},f.prototype.getMaxListeners=function(){return m(this)},f.prototype.emit=function(A){for(var O=[],S=1;S<arguments.length;S++)O.push(arguments[S]);var P=A==="error",y=this._events;if(y!==void 0)P=P&&y.error===void 0;else if(!P)return!1;if(P){var o;if(O.length>0&&(o=O[0]),o instanceof Error)throw o;var u=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw u.context=o,u}var d=y[A];if(d===void 0)return!1;if(typeof d=="function")N(d,this,O);else{var l=d.length,k=H(d,l);for(S=0;S<l;++S)N(k[S],this,O)}return!0},f.prototype.addListener=function(A,O){return E(this,A,O,!1)},f.prototype.on=f.prototype.addListener,f.prototype.prependListener=function(A,O){return E(this,A,O,!0)},f.prototype.once=function(A,O){return g(O),this.on(A,L(this,A,O)),this},f.prototype.prependOnceListener=function(A,O){return g(O),this.prependListener(A,L(this,A,O)),this},f.prototype.removeListener=function(A,O){var S,P,y,o,u;if(g(O),(P=this._events)===void 0)return this;if((S=P[A])===void 0)return this;if(S===O||S.listener===O)--this._eventsCount==0?this._events=Object.create(null):(delete P[A],P.removeListener&&this.emit("removeListener",A,S.listener||O));else if(typeof S!="function"){for(y=-1,o=S.length-1;o>=0;o--)if(S[o]===O||S[o].listener===O){u=S[o].listener,y=o;break}if(y<0)return this;y===0?S.shift():function(d,l){for(;l+1<d.length;l++)d[l]=d[l+1];d.pop()}(S,y),S.length===1&&(P[A]=S[0]),P.removeListener!==void 0&&this.emit("removeListener",A,u||O)}return this},f.prototype.off=f.prototype.removeListener,f.prototype.removeAllListeners=function(A){var O,S,P;if((S=this._events)===void 0)return this;if(S.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):S[A]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete S[A]),this;if(arguments.length===0){var y,o=Object.keys(S);for(P=0;P<o.length;++P)(y=o[P])!=="removeListener"&&this.removeAllListeners(y);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(O=S[A])=="function")this.removeListener(A,O);else if(O!==void 0)for(P=O.length-1;P>=0;P--)this.removeListener(A,O[P]);return this},f.prototype.listeners=function(A){return D(this,A,!0)},f.prototype.rawListeners=function(A){return D(this,A,!1)},f.listenerCount=function(A,O){return typeof A.listenerCount=="function"?A.listenerCount(O):I.call(A,O)},f.prototype.listenerCount=I,f.prototype.eventNames=function(){return this._eventsCount>0?K(this._events):[]}},397:function(W,K,T){function N(E){var M={};function L(I){if(M[I])return M[I].exports;var H=M[I]={i:I,l:!1,exports:{}};return E[I].call(H.exports,H,H.exports,L),H.l=!0,H.exports}L.m=E,L.c=M,L.i=function(I){return I},L.d=function(I,H,ee){L.o(I,H)||Object.defineProperty(I,H,{configurable:!1,enumerable:!0,get:ee})},L.r=function(I){Object.defineProperty(I,"__esModule",{value:!0})},L.n=function(I){var H=I&&I.__esModule?function(){return I.default}:function(){return I};return L.d(H,"a",H),H},L.o=function(I,H){return Object.prototype.hasOwnProperty.call(I,H)},L.p="/",L.oe=function(I){throw console.error(I),I};var D=L(L.s=ENTRY_MODULE);return D.default||D}var Z="[\\.|\\-|\\+|\\w|/|@]+",f="\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)";function p(E){return(E+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function g(E,M,L){var D={};D[L]=[];var I=M.toString(),H=I.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!H)return D;for(var ee,A=H[1],O=new RegExp("(\\\\n|\\W)"+p(A)+f,"g");ee=O.exec(I);)ee[3]!=="dll-reference"&&D[L].push(ee[3]);for(O=new RegExp("\\("+p(A)+'\\("(dll-reference\\s('+Z+'))"\\)\\)'+f,"g");ee=O.exec(I);)E[ee[2]]||(D[L].push(ee[1]),E[ee[2]]=T(ee[1]).m),D[ee[2]]=D[ee[2]]||[],D[ee[2]].push(ee[4]);for(var S,P=Object.keys(D),y=0;y<P.length;y++)for(var o=0;o<D[P[y]].length;o++)S=D[P[y]][o],isNaN(1*S)||(D[P[y]][o]=1*D[P[y]][o]);return D}function m(E){return Object.keys(E).reduce(function(M,L){return M||E[L].length>0},!1)}W.exports=function(E,M){M=M||{};var L={main:T.m},D=M.all?{main:Object.keys(L.main)}:function(O,S){for(var P={main:[S]},y={main:[]},o={main:{}};m(P);)for(var u=Object.keys(P),d=0;d<u.length;d++){var l=u[d],k=P[l].pop();if(o[l]=o[l]||{},!o[l][k]&&O[l][k]){o[l][k]=!0,y[l]=y[l]||[],y[l].push(k);for(var i=g(O,O[l][k],l),e=Object.keys(i),r=0;r<e.length;r++)P[e[r]]=P[e[r]]||[],P[e[r]]=P[e[r]].concat(i[e[r]])}}return y}(L,E),I="";Object.keys(D).filter(function(O){return O!=="main"}).forEach(function(O){for(var S=0;D[O][S];)S++;D[O].push(S),L[O][S]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",I=I+"var "+O+" = ("+N.toString().replace("ENTRY_MODULE",JSON.stringify(S))+")({"+D[O].map(function(P){return JSON.stringify(P)+": "+L[O][P].toString()}).join(",")+`});
|
|
`}),I=I+"new (("+N.toString().replace("ENTRY_MODULE",JSON.stringify(E))+")({"+D.main.map(function(O){return JSON.stringify(O)+": "+L.main[O].toString()}).join(",")+"}))(self);";var H=new window.Blob([I],{type:"text/javascript"});if(M.bare)return H;var ee=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(H),A=new window.Worker(ee);return A.objectURL=ee,A}},118:function(W,K){"use strict";var T=function(){function N(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return N.prototype.isComplete=function(){var Z=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,f=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&Z&&f},N.prototype.isSeekable=function(){return this.hasKeyframesIndex===!0},N.prototype.getNearestKeyframe=function(Z){if(this.keyframesIndex==null)return null;var f=this.keyframesIndex,p=this._search(f.times,Z);return{index:p,milliseconds:f.times[p],fileposition:f.filepositions[p]}},N.prototype._search=function(Z,f){var p=0,g=Z.length-1,m=0,E=0,M=g;for(f<Z[0]&&(p=0,E=M+1);E<=M;){if((m=E+Math.floor((M-E)/2))===g||f>=Z[m]&&f<Z[m+1]){p=m;break}Z[m]<f?E=m+1:M=m-1}return p},N}();K.Z=T},51:function(W,K,T){"use strict";T.d(K,{Wk:function(){return N},Yy:function(){return Z},Vn:function(){return f},J1:function(){return p}});var N=function(g,m,E,M,L){this.dts=g,this.pts=m,this.duration=E,this.originalDts=M,this.isSyncPoint=L,this.fileposition=null},Z=function(){function g(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return g.prototype.appendSyncPoint=function(m){m.isSyncPoint=!0,this.syncPoints.push(m)},g}(),f=function(){function g(){this._list=[]}return g.prototype.clear=function(){this._list=[]},g.prototype.appendArray=function(m){var E=this._list;m.length!==0&&(E.length>0&&m[0].originalDts<E[E.length-1].originalDts&&this.clear(),Array.prototype.push.apply(E,m))},g.prototype.getLastSyncPointBeforeDts=function(m){if(this._list.length==0)return null;var E=this._list,M=0,L=E.length-1,D=0,I=0,H=L;for(m<E[0].dts&&(M=0,I=H+1);I<=H;){if((D=I+Math.floor((H-I)/2))===L||m>=E[D].dts&&m<E[D+1].dts){M=D;break}E[D].dts<m?I=D+1:H=D-1}return this._list[M]},g}(),p=function(){function g(m){this._type=m,this._list=[],this._lastAppendLocation=-1}return Object.defineProperty(g.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"length",{get:function(){return this._list.length},enumerable:!1,configurable:!0}),g.prototype.isEmpty=function(){return this._list.length===0},g.prototype.clear=function(){this._list=[],this._lastAppendLocation=-1},g.prototype._searchNearestSegmentBefore=function(m){var E=this._list;if(E.length===0)return-2;var M=E.length-1,L=0,D=0,I=M,H=0;if(m<E[0].originalBeginDts)return H=-1;for(;D<=I;){if((L=D+Math.floor((I-D)/2))===M||m>E[L].lastSample.originalDts&&m<E[L+1].originalBeginDts){H=L;break}E[L].originalBeginDts<m?D=L+1:I=L-1}return H},g.prototype._searchNearestSegmentAfter=function(m){return this._searchNearestSegmentBefore(m)+1},g.prototype.append=function(m){var E=this._list,M=m,L=this._lastAppendLocation,D=0;L!==-1&&L<E.length&&M.originalBeginDts>=E[L].lastSample.originalDts&&(L===E.length-1||L<E.length-1&&M.originalBeginDts<E[L+1].originalBeginDts)?D=L+1:E.length>0&&(D=this._searchNearestSegmentBefore(M.originalBeginDts)+1),this._lastAppendLocation=D,this._list.splice(D,0,M)},g.prototype.getLastSegmentBefore=function(m){var E=this._searchNearestSegmentBefore(m);return E>=0?this._list[E]:null},g.prototype.getLastSampleBefore=function(m){var E=this.getLastSegmentBefore(m);return E!=null?E.lastSample:null},g.prototype.getLastSyncPointBefore=function(m){for(var E=this._searchNearestSegmentBefore(m),M=this._list[E].syncPoints;M.length===0&&E>0;)E--,M=this._list[E].syncPoints;return M.length>0?M[M.length-1]:null},g}()},949:function(W,K,T){"use strict";T.d(K,{Z:function(){return k}});var N=T(716),Z=T.n(N),f=T(300),p=T(538),g=T(118);function m(i,e,r){var n=i;if(e+r<n.length){for(;r--;)if((192&n[++e])!=128)return!1;return!0}return!1}var E,M=function(i){for(var e=[],r=i,n=0,a=i.length;n<a;)if(r[n]<128)e.push(String.fromCharCode(r[n])),++n;else{if(!(r[n]<192)){if(r[n]<224){if(m(r,n,1)&&(_=(31&r[n])<<6|63&r[n+1])>=128){e.push(String.fromCharCode(65535&_)),n+=2;continue}}else if(r[n]<240){if(m(r,n,2)&&(_=(15&r[n])<<12|(63&r[n+1])<<6|63&r[n+2])>=2048&&(63488&_)!=55296){e.push(String.fromCharCode(65535&_)),n+=3;continue}}else if(r[n]<248){var _;if(m(r,n,3)&&(_=(7&r[n])<<18|(63&r[n+1])<<12|(63&r[n+2])<<6|63&r[n+3])>65536&&_<1114112){_-=65536,e.push(String.fromCharCode(_>>>10|55296)),e.push(String.fromCharCode(1023&_|56320)),n+=4;continue}}}e.push(String.fromCharCode(65533)),++n}return e.join("")},L=T(29),D=(E=new ArrayBuffer(2),new DataView(E).setInt16(0,256,!0),new Int16Array(E)[0]===256),I=function(){function i(){}return i.parseScriptData=function(e,r,n){var a={};try{var _=i.parseValue(e,r,n),s=i.parseValue(e,r+_.size,n-_.size);a[_.data]=s.data}catch(t){f.Z.e("AMF",t.toString())}return a},i.parseObject=function(e,r,n){if(n<3)throw new L.rT("Data not enough when parse ScriptDataObject");var a=i.parseString(e,r,n),_=i.parseValue(e,r+a.size,n-a.size),s=_.objectEnd;return{data:{name:a.data,value:_.data},size:a.size+_.size,objectEnd:s}},i.parseVariable=function(e,r,n){return i.parseObject(e,r,n)},i.parseString=function(e,r,n){if(n<2)throw new L.rT("Data not enough when parse String");var a=new DataView(e,r,n).getUint16(0,!D);return{data:a>0?M(new Uint8Array(e,r+2,a)):"",size:2+a}},i.parseLongString=function(e,r,n){if(n<4)throw new L.rT("Data not enough when parse LongString");var a=new DataView(e,r,n).getUint32(0,!D);return{data:a>0?M(new Uint8Array(e,r+4,a)):"",size:4+a}},i.parseDate=function(e,r,n){if(n<10)throw new L.rT("Data size invalid when parse Date");var a=new DataView(e,r,n),_=a.getFloat64(0,!D),s=a.getInt16(8,!D);return{data:new Date(_+=60*s*1e3),size:10}},i.parseValue=function(e,r,n){if(n<1)throw new L.rT("Data not enough when parse Value");var a,_=new DataView(e,r,n),s=1,t=_.getUint8(0),h=!1;try{switch(t){case 0:a=_.getFloat64(1,!D),s+=8;break;case 1:a=!!_.getUint8(1),s+=1;break;case 2:var c=i.parseString(e,r+1,n-1);a=c.data,s+=c.size;break;case 3:a={};var v=0;for((16777215&_.getUint32(n-4,!D))==9&&(v=3);s<n-4;){var w=i.parseObject(e,r+s,n-s-v);if(w.objectEnd)break;a[w.data.name]=w.data.value,s+=w.size}s<=n-3&&(16777215&_.getUint32(s-1,!D))==9&&(s+=3);break;case 8:for(a={},s+=4,v=0,(16777215&_.getUint32(n-4,!D))==9&&(v=3);s<n-8;){var C=i.parseVariable(e,r+s,n-s-v);if(C.objectEnd)break;a[C.data.name]=C.data.value,s+=C.size}s<=n-3&&(16777215&_.getUint32(s-1,!D))==9&&(s+=3);break;case 9:a=void 0,s=1,h=!0;break;case 10:a=[];var x=_.getUint32(1,!D);s+=4;for(var G=0;G<x;G++){var F=i.parseValue(e,r+s,n-s);a.push(F.data),s+=F.size}break;case 11:var U=i.parseDate(e,r+1,n-1);a=U.data,s+=U.size;break;case 12:var Q=i.parseString(e,r+1,n-1);a=Q.data,s+=Q.size;break;default:s=n,f.Z.w("AMF","Unsupported AMF value type "+t)}}catch(Y){f.Z.e("AMF",Y.toString())}return{data:a,size:s,objectEnd:h}},i}(),H=function(){function i(e){this.TAG="ExpGolomb",this._buffer=e,this._buffer_index=0,this._total_bytes=e.byteLength,this._total_bits=8*e.byteLength,this._current_word=0,this._current_word_bits_left=0}return i.prototype.destroy=function(){this._buffer=null},i.prototype._fillCurrentWord=function(){var e=this._total_bytes-this._buffer_index;if(e<=0)throw new L.rT("ExpGolomb: _fillCurrentWord() but no bytes available");var r=Math.min(4,e),n=new Uint8Array(4);n.set(this._buffer.subarray(this._buffer_index,this._buffer_index+r)),this._current_word=new DataView(n.buffer).getUint32(0,!1),this._buffer_index+=r,this._current_word_bits_left=8*r},i.prototype.readBits=function(e){if(e>32)throw new L.OC("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){var r=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,r}var n=this._current_word_bits_left?this._current_word:0;n>>>=32-this._current_word_bits_left;var a=e-this._current_word_bits_left;this._fillCurrentWord();var _=Math.min(a,this._current_word_bits_left),s=this._current_word>>>32-_;return this._current_word<<=_,this._current_word_bits_left-=_,n=n<<_|s},i.prototype.readBool=function(){return this.readBits(1)===1},i.prototype.readByte=function(){return this.readBits(8)},i.prototype._skipLeadingZero=function(){var e;for(e=0;e<this._current_word_bits_left;e++)if((this._current_word&2147483648>>>e)!=0)return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()},i.prototype.readUEG=function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1},i.prototype.readSEG=function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)},i}(),ee=function(){function i(){}return i._ebsp2rbsp=function(e){for(var r=e,n=r.byteLength,a=new Uint8Array(n),_=0,s=0;s<n;s++)s>=2&&r[s]===3&&r[s-1]===0&&r[s-2]===0||(a[_]=r[s],_++);return new Uint8Array(a.buffer,0,_)},i.parseSPS=function(e){var r=i._ebsp2rbsp(e),n=new H(r);n.readByte();var a=n.readByte();n.readByte();var _=n.readByte();n.readUEG();var s=i.getProfileString(a),t=i.getLevelString(_),h=1,c=420,v=8;if((a===100||a===110||a===122||a===244||a===44||a===83||a===86||a===118||a===128||a===138||a===144)&&((h=n.readUEG())===3&&n.readBits(1),h<=3&&(c=[0,420,422,444][h]),v=n.readUEG()+8,n.readUEG(),n.readBits(1),n.readBool()))for(var w=h!==3?8:12,C=0;C<w;C++)n.readBool()&&(C<6?i._skipScalingList(n,16):i._skipScalingList(n,64));n.readUEG();var x=n.readUEG();if(x===0)n.readUEG();else if(x===1){n.readBits(1),n.readSEG(),n.readSEG();var G=n.readUEG();for(C=0;C<G;C++)n.readSEG()}var F=n.readUEG();n.readBits(1);var U=n.readUEG(),Q=n.readUEG(),Y=n.readBits(1);Y===0&&n.readBits(1),n.readBits(1);var X=0,ie=0,se=0,V=0;n.readBool()&&(X=n.readUEG(),ie=n.readUEG(),se=n.readUEG(),V=n.readUEG());var re=1,$=1,oe=0,he=!0,ae=0,ce=0;if(n.readBool()){if(n.readBool()){var ue=n.readByte();ue>0&&ue<16?(re=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][ue-1],$=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][ue-1]):ue===255&&(re=n.readByte()<<8|n.readByte(),$=n.readByte()<<8|n.readByte())}if(n.readBool()&&n.readBool(),n.readBool()&&(n.readBits(4),n.readBool()&&n.readBits(24)),n.readBool()&&(n.readUEG(),n.readUEG()),n.readBool()){var ne=n.readBits(32),J=n.readBits(32);he=n.readBool(),oe=(ae=J)/(ce=2*ne)}}var de=1;re===1&&$===1||(de=re/$);var b=0,R=0;h===0?(b=1,R=2-Y):(b=h===3?1:2,R=(h===1?2:1)*(2-Y));var B=16*(U+1),j=16*(Q+1)*(2-Y);B-=(X+ie)*b,j-=(se+V)*R;var z=Math.ceil(B*de);return n.destroy(),n=null,{profile_string:s,level_string:t,bit_depth:v,ref_frames:F,chroma_format:c,chroma_format_string:i.getChromaFormatString(c),frame_rate:{fixed:he,fps:oe,fps_den:ce,fps_num:ae},sar_ratio:{width:re,height:$},codec_size:{width:B,height:j},present_size:{width:z,height:j}}},i._skipScalingList=function(e,r){for(var n=8,a=8,_=0;_<r;_++)a!==0&&(a=(n+e.readSEG()+256)%256),n=a===0?n:a},i.getProfileString=function(e){switch(e){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}},i.getLevelString=function(e){return(e/10).toFixed(1)},i.getChromaFormatString=function(e){switch(e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}},i}(),A=T(600),O=function(){function i(e,r){this.TAG="FLVDemuxer",this._config=r,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=e.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=e.hasAudioTrack,this._hasVideo=e.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new g.Z,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var n=new ArrayBuffer(2);return new DataView(n).setInt16(0,256,!0),new Int16Array(n)[0]===256}()}return i.prototype.destroy=function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null},i.probe=function(e){var r=new Uint8Array(e),n={match:!1};if(r[0]!==70||r[1]!==76||r[2]!==86||r[3]!==1)return n;var a,_,s=(4&r[4])>>>2!=0,t=(1&r[4])!=0,h=(a=r)[_=5]<<24|a[_+1]<<16|a[_+2]<<8|a[_+3];return h<9?n:{match:!0,consumed:h,dataOffset:h,hasAudioTrack:s,hasVideoTrack:t}},i.prototype.bindDataSource=function(e){return e.onDataArrival=this.parseChunks.bind(this),this},Object.defineProperty(i.prototype,"onTrackMetadata",{get:function(){return this._onTrackMetadata},set:function(e){this._onTrackMetadata=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onMediaInfo",{get:function(){return this._onMediaInfo},set:function(e){this._onMediaInfo=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onMetaDataArrived",{get:function(){return this._onMetaDataArrived},set:function(e){this._onMetaDataArrived=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onScriptDataArrived",{get:function(){return this._onScriptDataArrived},set:function(e){this._onScriptDataArrived=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onDataAvailable",{get:function(){return this._onDataAvailable},set:function(e){this._onDataAvailable=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"timestampBase",{get:function(){return this._timestampBase},set:function(e){this._timestampBase=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"overridedDuration",{get:function(){return this._duration},set:function(e){this._durationOverrided=!0,this._duration=e,this._mediaInfo.duration=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"overridedHasAudio",{set:function(e){this._hasAudioFlagOverrided=!0,this._hasAudio=e,this._mediaInfo.hasAudio=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"overridedHasVideo",{set:function(e){this._hasVideoFlagOverrided=!0,this._hasVideo=e,this._mediaInfo.hasVideo=e},enumerable:!1,configurable:!0}),i.prototype.resetMediaInfo=function(){this._mediaInfo=new g.Z},i.prototype._isInitialMetadataDispatched=function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched},i.prototype.parseChunks=function(e,r){if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new L.rT("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var n=0,a=this._littleEndian;if(r===0){if(!(e.byteLength>13))return 0;n=i.probe(e).dataOffset}for(this._firstParse&&(this._firstParse=!1,r+n!==this._dataOffset&&f.Z.w(this.TAG,"First time parsing but chunk byteStart invalid!"),(_=new DataView(e,n)).getUint32(0,!a)!==0&&f.Z.w(this.TAG,"PrevTagSize0 !== 0 !!!"),n+=4);n<e.byteLength;){this._dispatch=!0;var _=new DataView(e,n);if(n+11+4>e.byteLength)break;var s=_.getUint8(0),t=16777215&_.getUint32(0,!a);if(n+11+t+4>e.byteLength)break;if(s===8||s===9||s===18){var h=_.getUint8(4),c=_.getUint8(5),v=_.getUint8(6)|c<<8|h<<16|_.getUint8(7)<<24;(16777215&_.getUint32(7,!a))!=0&&f.Z.w(this.TAG,"Meet tag which has StreamID != 0!");var w=n+11;switch(s){case 8:this._parseAudioData(e,w,t,v);break;case 9:this._parseVideoData(e,w,t,v,r+n);break;case 18:this._parseScriptData(e,w,t)}var C=_.getUint32(11+t,!a);C!==11+t&&f.Z.w(this.TAG,"Invalid PrevTagSize "+C),n+=11+t+4}else f.Z.w(this.TAG,"Unsupported tag type "+s+", skipped"),n+=11+t+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),n},i.prototype._parseScriptData=function(e,r,n){var a=I.parseScriptData(e,r,n);if(a.hasOwnProperty("onMetaData")){if(a.onMetaData==null||typeof a.onMetaData!="object")return void f.Z.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&f.Z.w(this.TAG,"Found another onMetaData tag!"),this._metadata=a;var _=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},_)),typeof _.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=_.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof _.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=_.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof _.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=_.audiodatarate),typeof _.videodatarate=="number"&&(this._mediaInfo.videoDataRate=_.videodatarate),typeof _.width=="number"&&(this._mediaInfo.width=_.width),typeof _.height=="number"&&(this._mediaInfo.height=_.height),typeof _.duration=="number"){if(!this._durationOverrided){var s=Math.floor(_.duration*this._timescale);this._duration=s,this._mediaInfo.duration=s}}else this._mediaInfo.duration=0;if(typeof _.framerate=="number"){var t=Math.floor(1e3*_.framerate);if(t>0){var h=t/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=h,this._referenceFrameRate.fps_num=t,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=h}}if(typeof _.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;var c=_.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(c),_.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=_,f.Z.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(a).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},a))},i.prototype._parseKeyframesIndex=function(e){for(var r=[],n=[],a=1;a<e.times.length;a++){var _=this._timestampBase+Math.floor(1e3*e.times[a]);r.push(_),n.push(e.filepositions[a])}return{times:r,filepositions:n}},i.prototype._parseAudioData=function(e,r,n,a){if(n<=1)f.Z.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");else if(this._hasAudioFlagOverrided!==!0||this._hasAudio!==!1){this._littleEndian;var _=new DataView(e,r,n).getUint8(0),s=_>>>4;if(s===2||s===10){var t=0,h=(12&_)>>>2;if(h>=0&&h<=4){t=this._flvSoundRateTable[h];var c=1&_,v=this._audioMetadata,w=this._audioTrack;if(v||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(v=this._audioMetadata={}).type="audio",v.id=w.id,v.timescale=this._timescale,v.duration=this._duration,v.audioSampleRate=t,v.channelCount=c===0?1:2),s===10){var C=this._parseAACAudioData(e,r+1,n-1);if(C==null)return;if(C.packetType===0){v.config&&f.Z.w(this.TAG,"Found another AudioSpecificConfig!");var x=C.data;v.audioSampleRate=x.samplingRate,v.channelCount=x.channelCount,v.codec=x.codec,v.originalCodec=x.originalCodec,v.config=x.config,v.refSampleDuration=1024/v.audioSampleRate*v.timescale,f.Z.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",v),(U=this._mediaInfo).audioCodec=v.originalCodec,U.audioSampleRate=v.audioSampleRate,U.audioChannelCount=v.channelCount,U.hasVideo?U.videoCodec!=null&&(U.mimeType='video/x-flv; codecs="'+U.videoCodec+","+U.audioCodec+'"'):U.mimeType='video/x-flv; codecs="'+U.audioCodec+'"',U.isComplete()&&this._onMediaInfo(U)}else if(C.packetType===1){var G=this._timestampBase+a,F={unit:C.data,length:C.data.byteLength,dts:G,pts:G};w.samples.push(F),w.length+=C.data.length}else f.Z.e(this.TAG,"Flv: Unsupported AAC data type "+C.packetType)}else if(s===2){if(!v.codec){var U;if((x=this._parseMP3AudioData(e,r+1,n-1,!0))==null)return;v.audioSampleRate=x.samplingRate,v.channelCount=x.channelCount,v.codec=x.codec,v.originalCodec=x.originalCodec,v.refSampleDuration=1152/v.audioSampleRate*v.timescale,f.Z.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",v),(U=this._mediaInfo).audioCodec=v.codec,U.audioSampleRate=v.audioSampleRate,U.audioChannelCount=v.channelCount,U.audioDataRate=x.bitRate,U.hasVideo?U.videoCodec!=null&&(U.mimeType='video/x-flv; codecs="'+U.videoCodec+","+U.audioCodec+'"'):U.mimeType='video/x-flv; codecs="'+U.audioCodec+'"',U.isComplete()&&this._onMediaInfo(U)}var Q=this._parseMP3AudioData(e,r+1,n-1,!1);if(Q==null)return;G=this._timestampBase+a;var Y={unit:Q,length:Q.byteLength,dts:G,pts:G};w.samples.push(Y),w.length+=Q.length}}else this._onError(A.Z.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+h)}else this._onError(A.Z.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+s)}},i.prototype._parseAACAudioData=function(e,r,n){if(!(n<=1)){var a={},_=new Uint8Array(e,r,n);return a.packetType=_[0],_[0]===0?a.data=this._parseAACAudioSpecificConfig(e,r+1,n-1):a.data=_.subarray(1),a}f.Z.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")},i.prototype._parseAACAudioSpecificConfig=function(e,r,n){var a,_,s=new Uint8Array(e,r,n),t=null,h=0,c=null;if(h=a=s[0]>>>3,(_=(7&s[0])<<1|s[1]>>>7)<0||_>=this._mpegSamplingRates.length)this._onError(A.Z.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var v=this._mpegSamplingRates[_],w=(120&s[1])>>>3;if(!(w<0||w>=8)){h===5&&(c=(7&s[1])<<1|s[2]>>>7,(124&s[2])>>>2);var C=self.navigator.userAgent.toLowerCase();return C.indexOf("firefox")!==-1?_>=6?(h=5,t=new Array(4),c=_-3):(h=2,t=new Array(2),c=_):C.indexOf("android")!==-1?(h=2,t=new Array(2),c=_):(h=5,c=_,t=new Array(4),_>=6?c=_-3:w===1&&(h=2,t=new Array(2),c=_)),t[0]=h<<3,t[0]|=(15&_)>>>1,t[1]=(15&_)<<7,t[1]|=(15&w)<<3,h===5&&(t[1]|=(15&c)>>>1,t[2]=(1&c)<<7,t[2]|=8,t[3]=0),{config:t,samplingRate:v,channelCount:w,codec:"mp4a.40."+h,originalCodec:"mp4a.40."+a}}this._onError(A.Z.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}},i.prototype._parseMP3AudioData=function(e,r,n,a){if(!(n<4)){this._littleEndian;var _=new Uint8Array(e,r,n),s=null;if(a){if(_[0]!==255)return;var t=_[1]>>>3&3,h=(6&_[1])>>1,c=(240&_[2])>>>4,v=(12&_[2])>>>2,w=(_[3]>>>6&3)!=3?2:1,C=0,x=0;switch(t){case 0:C=this._mpegAudioV25SampleRateTable[v];break;case 2:C=this._mpegAudioV20SampleRateTable[v];break;case 3:C=this._mpegAudioV10SampleRateTable[v]}switch(h){case 1:c<this._mpegAudioL3BitRateTable.length&&(x=this._mpegAudioL3BitRateTable[c]);break;case 2:c<this._mpegAudioL2BitRateTable.length&&(x=this._mpegAudioL2BitRateTable[c]);break;case 3:c<this._mpegAudioL1BitRateTable.length&&(x=this._mpegAudioL1BitRateTable[c])}s={bitRate:x,samplingRate:C,channelCount:w,codec:"mp3",originalCodec:"mp3"}}else s=_;return s}f.Z.w(this.TAG,"Flv: Invalid MP3 packet, header missing!")},i.prototype._parseVideoData=function(e,r,n,a,_){if(n<=1)f.Z.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");else if(this._hasVideoFlagOverrided!==!0||this._hasVideo!==!1){var s=new Uint8Array(e,r,n)[0],t=(240&s)>>>4,h=15&s;h===7?this._parseAVCVideoPacket(e,r+1,n-1,a,_,t):this._onError(A.Z.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+h)}},i.prototype._parseAVCVideoPacket=function(e,r,n,a,_,s){if(n<4)f.Z.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var t=this._littleEndian,h=new DataView(e,r,n),c=h.getUint8(0),v=(16777215&h.getUint32(0,!t))<<8>>8;if(c===0)this._parseAVCDecoderConfigurationRecord(e,r+4,n-4);else if(c===1)this._parseAVCVideoData(e,r+4,n-4,a,_,s,v);else if(c!==2)return void this._onError(A.Z.FORMAT_ERROR,"Flv: Invalid video packet type "+c)}},i.prototype._parseAVCDecoderConfigurationRecord=function(e,r,n){if(n<7)f.Z.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var a=this._videoMetadata,_=this._videoTrack,s=this._littleEndian,t=new DataView(e,r,n);a?a.avcc!==void 0&&f.Z.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(a=this._videoMetadata={}).type="video",a.id=_.id,a.timescale=this._timescale,a.duration=this._duration);var h=t.getUint8(0),c=t.getUint8(1);if(t.getUint8(2),t.getUint8(3),h===1&&c!==0)if(this._naluLengthSize=1+(3&t.getUint8(4)),this._naluLengthSize===3||this._naluLengthSize===4){var v=31&t.getUint8(5);if(v!==0){v>1&&f.Z.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+v);for(var w=6,C=0;C<v;C++){var x=t.getUint16(w,!s);if(w+=2,x!==0){var G=new Uint8Array(e,r+w,x);w+=x;var F=ee.parseSPS(G);if(C===0){a.codecWidth=F.codec_size.width,a.codecHeight=F.codec_size.height,a.presentWidth=F.present_size.width,a.presentHeight=F.present_size.height,a.profile=F.profile_string,a.level=F.level_string,a.bitDepth=F.bit_depth,a.chromaFormat=F.chroma_format,a.sarRatio=F.sar_ratio,a.frameRate=F.frame_rate,F.frame_rate.fixed!==!1&&F.frame_rate.fps_num!==0&&F.frame_rate.fps_den!==0||(a.frameRate=this._referenceFrameRate);var U=a.frameRate.fps_den,Q=a.frameRate.fps_num;a.refSampleDuration=a.timescale*(U/Q);for(var Y=G.subarray(1,4),X="avc1.",ie=0;ie<3;ie++){var se=Y[ie].toString(16);se.length<2&&(se="0"+se),X+=se}a.codec=X;var V=this._mediaInfo;V.width=a.codecWidth,V.height=a.codecHeight,V.fps=a.frameRate.fps,V.profile=a.profile,V.level=a.level,V.refFrames=F.ref_frames,V.chromaFormat=F.chroma_format_string,V.sarNum=a.sarRatio.width,V.sarDen=a.sarRatio.height,V.videoCodec=X,V.hasAudio?V.audioCodec!=null&&(V.mimeType='video/x-flv; codecs="'+V.videoCodec+","+V.audioCodec+'"'):V.mimeType='video/x-flv; codecs="'+V.videoCodec+'"',V.isComplete()&&this._onMediaInfo(V)}}}var re=t.getUint8(w);if(re!==0){for(re>1&&f.Z.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+re),w++,C=0;C<re;C++)x=t.getUint16(w,!s),w+=2,x!==0&&(w+=x);a.avcc=new Uint8Array(n),a.avcc.set(new Uint8Array(e,r,n),0),f.Z.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",a)}else this._onError(A.Z.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS")}else this._onError(A.Z.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS")}else this._onError(A.Z.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));else this._onError(A.Z.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord")}},i.prototype._parseAVCVideoData=function(e,r,n,a,_,s,t){for(var h=this._littleEndian,c=new DataView(e,r,n),v=[],w=0,C=0,x=this._naluLengthSize,G=this._timestampBase+a,F=s===1;C<n;){if(C+4>=n){f.Z.w(this.TAG,"Malformed Nalu near timestamp "+G+", offset = "+C+", dataSize = "+n);break}var U=c.getUint32(C,!h);if(x===3&&(U>>>=8),U>n-x)return void f.Z.w(this.TAG,"Malformed Nalus near timestamp "+G+", NaluSize > DataSize!");var Q=31&c.getUint8(C+x);Q===5&&(F=!0);var Y=new Uint8Array(e,r+C,x+U),X={type:Q,data:Y};v.push(X),w+=Y.byteLength,C+=x+U}if(v.length){var ie=this._videoTrack,se={units:v,length:w,isKeyframe:F,dts:G,cts:t,pts:G+t};F&&(se.fileposition=_),ie.samples.push(se),ie.length+=w}},i}(),S=function(){function i(){}return i.init=function(){for(var e in i.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]},i.types)i.types.hasOwnProperty(e)&&(i.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var r=i.constants={};r.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),r.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),r.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),r.STSC=r.STCO=r.STTS,r.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),r.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),r.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),r.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),r.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),r.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])},i.box=function(e){for(var r=8,n=null,a=Array.prototype.slice.call(arguments,1),_=a.length,s=0;s<_;s++)r+=a[s].byteLength;(n=new Uint8Array(r))[0]=r>>>24&255,n[1]=r>>>16&255,n[2]=r>>>8&255,n[3]=255&r,n.set(e,4);var t=8;for(s=0;s<_;s++)n.set(a[s],t),t+=a[s].byteLength;return n},i.generateInitSegment=function(e){var r=i.box(i.types.ftyp,i.constants.FTYP),n=i.moov(e),a=new Uint8Array(r.byteLength+n.byteLength);return a.set(r,0),a.set(n,r.byteLength),a},i.moov=function(e){var r=i.mvhd(e.timescale,e.duration),n=i.trak(e),a=i.mvex(e);return i.box(i.types.moov,r,n,a)},i.mvhd=function(e,r){return i.box(i.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e,r>>>24&255,r>>>16&255,r>>>8&255,255&r,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,255]))},i.trak=function(e){return i.box(i.types.trak,i.tkhd(e),i.mdia(e))},i.tkhd=function(e){var r=e.id,n=e.duration,a=e.presentWidth,_=e.presentHeight;return i.box(i.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,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,a>>>8&255,255&a,0,0,_>>>8&255,255&_,0,0]))},i.mdia=function(e){return i.box(i.types.mdia,i.mdhd(e),i.hdlr(e),i.minf(e))},i.mdhd=function(e){var r=e.timescale,n=e.duration;return i.box(i.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n,85,196,0,0]))},i.hdlr=function(e){var r=null;return r=e.type==="audio"?i.constants.HDLR_AUDIO:i.constants.HDLR_VIDEO,i.box(i.types.hdlr,r)},i.minf=function(e){var r=null;return r=e.type==="audio"?i.box(i.types.smhd,i.constants.SMHD):i.box(i.types.vmhd,i.constants.VMHD),i.box(i.types.minf,r,i.dinf(),i.stbl(e))},i.dinf=function(){return i.box(i.types.dinf,i.box(i.types.dref,i.constants.DREF))},i.stbl=function(e){return i.box(i.types.stbl,i.stsd(e),i.box(i.types.stts,i.constants.STTS),i.box(i.types.stsc,i.constants.STSC),i.box(i.types.stsz,i.constants.STSZ),i.box(i.types.stco,i.constants.STCO))},i.stsd=function(e){return e.type==="audio"?e.codec==="mp3"?i.box(i.types.stsd,i.constants.STSD_PREFIX,i.mp3(e)):i.box(i.types.stsd,i.constants.STSD_PREFIX,i.mp4a(e)):i.box(i.types.stsd,i.constants.STSD_PREFIX,i.avc1(e))},i.mp3=function(e){var r=e.channelCount,n=e.audioSampleRate,a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return i.box(i.types[".mp3"],a)},i.mp4a=function(e){var r=e.channelCount,n=e.audioSampleRate,a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return i.box(i.types.mp4a,a,i.esds(e))},i.esds=function(e){var r=e.config||[],n=r.length,a=new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n]).concat(r).concat([6,1,2]));return i.box(i.types.esds,a)},i.avc1=function(e){var r=e.avcc,n=e.codecWidth,a=e.codecHeight,_=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,n>>>8&255,255&n,a>>>8&255,255&a,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return i.box(i.types.avc1,_,i.box(i.types.avcC,r))},i.mvex=function(e){return i.box(i.types.mvex,i.trex(e))},i.trex=function(e){var r=e.id,n=new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return i.box(i.types.trex,n)},i.moof=function(e,r){return i.box(i.types.moof,i.mfhd(e.sequenceNumber),i.traf(e,r))},i.mfhd=function(e){var r=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return i.box(i.types.mfhd,r)},i.traf=function(e,r){var n=e.id,a=i.box(i.types.tfhd,new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),_=i.box(i.types.tfdt,new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r])),s=i.sdtp(e),t=i.trun(e,s.byteLength+16+16+8+16+8+8);return i.box(i.types.traf,a,_,t,s)},i.sdtp=function(e){for(var r=e.samples||[],n=r.length,a=new Uint8Array(4+n),_=0;_<n;_++){var s=r[_].flags;a[_+4]=s.isLeading<<6|s.dependsOn<<4|s.isDependedOn<<2|s.hasRedundancy}return i.box(i.types.sdtp,a)},i.trun=function(e,r){var n=e.samples||[],a=n.length,_=12+16*a,s=new Uint8Array(_);r+=8+_,s.set([0,0,15,1,a>>>24&255,a>>>16&255,a>>>8&255,255&a,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0);for(var t=0;t<a;t++){var h=n[t].duration,c=n[t].size,v=n[t].flags,w=n[t].cts;s.set([h>>>24&255,h>>>16&255,h>>>8&255,255&h,c>>>24&255,c>>>16&255,c>>>8&255,255&c,v.isLeading<<2|v.dependsOn,v.isDependedOn<<6|v.hasRedundancy<<4|v.isNonSync,0,0,w>>>24&255,w>>>16&255,w>>>8&255,255&w],12+16*t)}return i.box(i.types.trun,s)},i.mdat=function(e){return i.box(i.types.mdat,e)},i}();S.init();var P=S,y=function(){function i(){}return i.getSilentFrame=function(e,r){if(e==="mp4a.40.2"){if(r===1)return new Uint8Array([0,200,0,128,35,128]);if(r===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(r===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(r===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(r===5)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(r===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(r===1)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(r===2)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]);if(r===3)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},i}(),o=T(51),u=function(){function i(e){this.TAG="MP4Remuxer",this._config=e,this._isLive=e.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new o.J1("audio"),this._videoSegmentInfoList=new o.J1("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!p.Z.chrome||!(p.Z.version.major<50||p.Z.version.major===50&&p.Z.version.build<2661)),this._fillSilentAfterSeek=p.Z.msedge||p.Z.msie,this._mp3UseMpegAudio=!p.Z.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return i.prototype.destroy=function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null},i.prototype.bindDataSource=function(e){return e.onDataAvailable=this.remux.bind(this),e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this},Object.defineProperty(i.prototype,"onInitSegment",{get:function(){return this._onInitSegment},set:function(e){this._onInitSegment=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onMediaSegment",{get:function(){return this._onMediaSegment},set:function(e){this._onMediaSegment=e},enumerable:!1,configurable:!0}),i.prototype.insertDiscontinuity=function(){this._audioNextDts=this._videoNextDts=void 0},i.prototype.seek=function(e){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()},i.prototype.remux=function(e,r){if(!this._onMediaSegment)throw new L.rT("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(e,r),this._remuxVideo(r),this._remuxAudio(e)},i.prototype._onTrackMetadataReceived=function(e,r){var n=null,a="mp4",_=r.codec;if(e==="audio")this._audioMeta=r,r.codec==="mp3"&&this._mp3UseMpegAudio?(a="mpeg",_="",n=new Uint8Array):n=P.generateInitSegment(r);else{if(e!=="video")return;this._videoMeta=r,n=P.generateInitSegment(r)}if(!this._onInitSegment)throw new L.rT("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:n.buffer,codec:_,container:e+"/"+a,mediaDuration:r.duration})},i.prototype._calculateDtsBase=function(e,r){this._dtsBaseInited||(e.samples&&e.samples.length&&(this._audioDtsBase=e.samples[0].dts),r.samples&&r.samples.length&&(this._videoDtsBase=r.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)},i.prototype.flushStashedSamples=function(){var e=this._videoStashedLastSample,r=this._audioStashedLastSample,n={type:"video",id:1,sequenceNumber:0,samples:[],length:0};e!=null&&(n.samples.push(e),n.length=e.length);var a={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};r!=null&&(a.samples.push(r),a.length=r.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(n,!0),this._remuxAudio(a,!0)},i.prototype._remuxAudio=function(e,r){if(this._audioMeta!=null){var n,a=e,_=a.samples,s=void 0,t=-1,h=this._audioMeta.refSampleDuration,c=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,v=this._dtsBaseInited&&this._audioNextDts===void 0,w=!1;if(_&&_.length!==0&&(_.length!==1||r)){var C=0,x=null,G=0;c?(C=0,G=a.length):(C=8,G=8+a.length);var F=null;if(_.length>1&&(G-=(F=_.pop()).length),this._audioStashedLastSample!=null){var U=this._audioStashedLastSample;this._audioStashedLastSample=null,_.unshift(U),G+=U.length}F!=null&&(this._audioStashedLastSample=F);var Q=_[0].dts-this._dtsBase;if(this._audioNextDts)s=Q-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())s=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(w=!0);else{var Y=this._audioSegmentInfoList.getLastSampleBefore(Q);if(Y!=null){var X=Q-(Y.originalDts+Y.duration);X<=3&&(X=0),s=Q-(Y.dts+Y.duration+X)}else s=0}if(w){var ie=Q-s,se=this._videoSegmentInfoList.getLastSegmentBefore(Q);if(se!=null&&se.beginDts<ie){if(de=y.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount)){var V=se.beginDts,re=ie-se.beginDts;f.Z.v(this.TAG,"InsertPrefixSilentAudio: dts: "+V+", duration: "+re),_.unshift({unit:de,dts:V,pts:V}),G+=de.byteLength}}else w=!1}for(var $=[],oe=0;oe<_.length;oe++){var he=(U=_[oe]).unit,ae=U.dts-this._dtsBase,ce=(V=ae,!1),ue=null,ne=0;if(!(ae<-.001)){if(this._audioMeta.codec!=="mp3"){var J=ae;if(this._audioNextDts&&(J=this._audioNextDts),(s=ae-J)<=-3*h){f.Z.w(this.TAG,"Dropping 1 audio frame (originalDts: "+ae+" ms ,curRefDts: "+J+" ms) due to dtsCorrection: "+s+" ms overlap.");continue}if(s>=3*h&&this._fillAudioTimestampGap&&!p.Z.safari){ce=!0;var de,b=Math.floor(s/h);f.Z.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
|
|
originalDts: `+ae+" ms, curRefDts: "+J+" ms, dtsCorrection: "+Math.round(s)+" ms, generate: "+b+" frames"),V=Math.floor(J),ne=Math.floor(J+h)-V,(de=y.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount))==null&&(f.Z.w(this.TAG,"Unable to generate silent frame for "+this._audioMeta.originalCodec+" with "+this._audioMeta.channelCount+" channels, repeat last frame"),de=he),ue=[];for(var R=0;R<b;R++){J+=h;var B=Math.floor(J),j=Math.floor(J+h)-B,z={dts:B,pts:B,cts:0,unit:de,size:de.byteLength,duration:j,originalDts:ae,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};ue.push(z),G+=z.size}this._audioNextDts=J+h}else V=Math.floor(J),ne=Math.floor(J+h)-V,this._audioNextDts=J+h}else V=ae-s,oe!==_.length-1?ne=_[oe+1].dts-this._dtsBase-s-V:F!=null?ne=F.dts-this._dtsBase-s-V:ne=$.length>=1?$[$.length-1].duration:Math.floor(h),this._audioNextDts=V+ne;t===-1&&(t=V),$.push({dts:V,pts:V,cts:0,unit:U.unit,size:U.unit.byteLength,duration:ne,originalDts:ae,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),ce&&$.push.apply($,ue)}}if($.length===0)return a.samples=[],void(a.length=0);for(c?x=new Uint8Array(G):((x=new Uint8Array(G))[0]=G>>>24&255,x[1]=G>>>16&255,x[2]=G>>>8&255,x[3]=255&G,x.set(P.types.mdat,4)),oe=0;oe<$.length;oe++)he=$[oe].unit,x.set(he,C),C+=he.byteLength;var q=$[$.length-1];n=q.dts+q.duration;var te=new o.Yy;te.beginDts=t,te.endDts=n,te.beginPts=t,te.endPts=n,te.originalBeginDts=$[0].originalDts,te.originalEndDts=q.originalDts+q.duration,te.firstSample=new o.Wk($[0].dts,$[0].pts,$[0].duration,$[0].originalDts,!1),te.lastSample=new o.Wk(q.dts,q.pts,q.duration,q.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(te),a.samples=$,a.sequenceNumber++;var _e=null;_e=c?new Uint8Array:P.moof(a,t),a.samples=[],a.length=0;var fe={type:"audio",data:this._mergeBoxes(_e,x).buffer,sampleCount:$.length,info:te};c&&v&&(fe.timestampOffset=t),this._onMediaSegment("audio",fe)}}},i.prototype._remuxVideo=function(e,r){if(this._videoMeta!=null){var n,a,_=e,s=_.samples,t=void 0,h=-1,c=-1;if(s&&s.length!==0&&(s.length!==1||r)){var v=8,w=null,C=8+e.length,x=null;if(s.length>1&&(C-=(x=s.pop()).length),this._videoStashedLastSample!=null){var G=this._videoStashedLastSample;this._videoStashedLastSample=null,s.unshift(G),C+=G.length}x!=null&&(this._videoStashedLastSample=x);var F=s[0].dts-this._dtsBase;if(this._videoNextDts)t=F-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())t=0;else{var U=this._videoSegmentInfoList.getLastSampleBefore(F);if(U!=null){var Q=F-(U.originalDts+U.duration);Q<=3&&(Q=0),t=F-(U.dts+U.duration+Q)}else t=0}for(var Y=new o.Yy,X=[],ie=0;ie<s.length;ie++){var se=(G=s[ie]).dts-this._dtsBase,V=G.isKeyframe,re=se-t,$=G.cts,oe=re+$;h===-1&&(h=re,c=oe);var he=0;if(ie!==s.length-1?he=s[ie+1].dts-this._dtsBase-t-re:x!=null?he=x.dts-this._dtsBase-t-re:he=X.length>=1?X[X.length-1].duration:Math.floor(this._videoMeta.refSampleDuration),V){var ae=new o.Wk(re,oe,he,G.dts,!0);ae.fileposition=G.fileposition,Y.appendSyncPoint(ae)}X.push({dts:re,pts:oe,cts:$,units:G.units,size:G.length,isKeyframe:V,duration:he,originalDts:se,flags:{isLeading:0,dependsOn:V?2:1,isDependedOn:V?1:0,hasRedundancy:0,isNonSync:V?0:1}})}for((w=new Uint8Array(C))[0]=C>>>24&255,w[1]=C>>>16&255,w[2]=C>>>8&255,w[3]=255&C,w.set(P.types.mdat,4),ie=0;ie<X.length;ie++)for(var ce=X[ie].units;ce.length;){var ue=ce.shift().data;w.set(ue,v),v+=ue.byteLength}var ne=X[X.length-1];if(n=ne.dts+ne.duration,a=ne.pts+ne.duration,this._videoNextDts=n,Y.beginDts=h,Y.endDts=n,Y.beginPts=c,Y.endPts=a,Y.originalBeginDts=X[0].originalDts,Y.originalEndDts=ne.originalDts+ne.duration,Y.firstSample=new o.Wk(X[0].dts,X[0].pts,X[0].duration,X[0].originalDts,X[0].isKeyframe),Y.lastSample=new o.Wk(ne.dts,ne.pts,ne.duration,ne.originalDts,ne.isKeyframe),this._isLive||this._videoSegmentInfoList.append(Y),_.samples=X,_.sequenceNumber++,this._forceFirstIDR){var J=X[0].flags;J.dependsOn=2,J.isNonSync=0}var de=P.moof(_,h);_.samples=[],_.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(de,w).buffer,sampleCount:X.length,info:Y})}}},i.prototype._mergeBoxes=function(e,r){var n=new Uint8Array(e.byteLength+r.byteLength);return n.set(e,0),n.set(r,e.byteLength),n},i}(),d=T(191),l=T(257),k=function(){function i(e,r){this.TAG="TransmuxingController",this._emitter=new(Z()),this._config=r,e.segments||(e.segments=[{duration:e.duration,filesize:e.filesize,url:e.url}]),typeof e.cors!="boolean"&&(e.cors=!0),typeof e.withCredentials!="boolean"&&(e.withCredentials=!1),this._mediaDataSource=e,this._currentSegmentIndex=0;var n=0;this._mediaDataSource.segments.forEach(function(a){a.timestampBase=n,n+=a.duration,a.cors=e.cors,a.withCredentials=e.withCredentials,r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy)}),isNaN(n)||this._mediaDataSource.duration===n||(this._mediaDataSource.duration=n),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return i.prototype.destroy=function(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null},i.prototype.on=function(e,r){this._emitter.addListener(e,r)},i.prototype.off=function(e,r){this._emitter.removeListener(e,r)},i.prototype.start=function(){this._loadSegment(0),this._enableStatisticsReporter()},i.prototype._loadSegment=function(e,r){this._currentSegmentIndex=e;var n=this._mediaDataSource.segments[e],a=this._ioctl=new d.Z(n,this._config,e);a.onError=this._onIOException.bind(this),a.onSeeked=this._onIOSeeked.bind(this),a.onComplete=this._onIOComplete.bind(this),a.onRedirect=this._onIORedirect.bind(this),a.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),r?this._demuxer.bindDataSource(this._ioctl):a.onDataArrival=this._onInitChunkArrival.bind(this),a.open(r)},i.prototype.stop=function(){this._internalAbort(),this._disableStatisticsReporter()},i.prototype._internalAbort=function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)},i.prototype.pause=function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())},i.prototype.resume=function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())},i.prototype.seek=function(e){if(this._mediaInfo!=null&&this._mediaInfo.isSeekable()){var r=this._searchSegmentIndexContains(e);if(r===this._currentSegmentIndex){var n=this._mediaInfo.segments[r];if(n==null)this._pendingSeekTime=e;else{var a=n.getNearestKeyframe(e);this._remuxer.seek(a.milliseconds),this._ioctl.seek(a.fileposition),this._pendingResolveSeekPoint=a.milliseconds}}else{var _=this._mediaInfo.segments[r];_==null?(this._pendingSeekTime=e,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(r)):(a=_.getNearestKeyframe(e),this._internalAbort(),this._remuxer.seek(e),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[r].timestampBase,this._loadSegment(r,a.fileposition),this._pendingResolveSeekPoint=a.milliseconds,this._reportSegmentMediaInfo(r))}this._enableStatisticsReporter()}},i.prototype._searchSegmentIndexContains=function(e){for(var r=this._mediaDataSource.segments,n=r.length-1,a=0;a<r.length;a++)if(e<r[a].timestampBase){n=a-1;break}return n},i.prototype._onInitChunkArrival=function(e,r){var n=this,a=null,_=0;if(r>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,_=this._demuxer.parseChunks(e,r);else if((a=O.probe(e)).match){this._demuxer=new O(a,this._config),this._remuxer||(this._remuxer=new u(this._config));var s=this._mediaDataSource;s.duration==null||isNaN(s.duration)||(this._demuxer.overridedDuration=s.duration),typeof s.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=s.hasAudio),typeof s.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=s.hasVideo),this._demuxer.timestampBase=s.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),_=this._demuxer.parseChunks(e,r)}else a=null,f.Z.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){n._internalAbort()}),this._emitter.emit(l.Z.DEMUX_ERROR,A.Z.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),_=0;return _},i.prototype._onMediaInfo=function(e){var r=this;this._mediaInfo==null&&(this._mediaInfo=Object.assign({},e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,g.Z.prototype));var n=Object.assign({},e);Object.setPrototypeOf(n,g.Z.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=n,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(function(){var a=r._pendingSeekTime;r._pendingSeekTime=null,r.seek(a)})},i.prototype._onMetaDataArrived=function(e){this._emitter.emit(l.Z.METADATA_ARRIVED,e)},i.prototype._onScriptDataArrived=function(e){this._emitter.emit(l.Z.SCRIPTDATA_ARRIVED,e)},i.prototype._onIOSeeked=function(){this._remuxer.insertDiscontinuity()},i.prototype._onIOComplete=function(e){var r=e+1;r<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(r)):(this._remuxer.flushStashedSamples(),this._emitter.emit(l.Z.LOADING_COMPLETE),this._disableStatisticsReporter())},i.prototype._onIORedirect=function(e){var r=this._ioctl.extraData;this._mediaDataSource.segments[r].redirectedURL=e},i.prototype._onIORecoveredEarlyEof=function(){this._emitter.emit(l.Z.RECOVERED_EARLY_EOF)},i.prototype._onIOException=function(e,r){f.Z.e(this.TAG,"IOException: type = "+e+", code = "+r.code+", msg = "+r.msg),this._emitter.emit(l.Z.IO_ERROR,e,r),this._disableStatisticsReporter()},i.prototype._onDemuxException=function(e,r){f.Z.e(this.TAG,"DemuxException: type = "+e+", info = "+r),this._emitter.emit(l.Z.DEMUX_ERROR,e,r)},i.prototype._onRemuxerInitSegmentArrival=function(e,r){this._emitter.emit(l.Z.INIT_SEGMENT,e,r)},i.prototype._onRemuxerMediaSegmentArrival=function(e,r){if(this._pendingSeekTime==null&&(this._emitter.emit(l.Z.MEDIA_SEGMENT,e,r),this._pendingResolveSeekPoint!=null&&e==="video")){var n=r.info.syncPoints,a=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,p.Z.safari&&n.length>0&&n[0].originalDts===a&&(a=n[0].pts),this._emitter.emit(l.Z.RECOMMEND_SEEKPOINT,a)}},i.prototype._enableStatisticsReporter=function(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))},i.prototype._disableStatisticsReporter=function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},i.prototype._reportSegmentMediaInfo=function(e){var r=this._mediaInfo.segments[e],n=Object.assign({},r);n.duration=this._mediaInfo.duration,n.segmentCount=this._mediaInfo.segmentCount,delete n.segments,delete n.keyframesIndex,this._emitter.emit(l.Z.MEDIA_INFO,n)},i.prototype._reportStatisticsInfo=function(){var e={};e.url=this._ioctl.currentURL,e.hasRedirect=this._ioctl.hasRedirect,e.hasRedirect&&(e.redirectedURL=this._ioctl.currentRedirectedURL),e.speed=this._ioctl.currentSpeed,e.loaderType=this._ioctl.loaderType,e.currentSegmentIndex=this._currentSegmentIndex,e.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(l.Z.STATISTICS_INFO,e)},i}()},257:function(W,K){"use strict";K.Z={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"}},82:function(W,K,T){"use strict";T(846),T(219),T(949),T(257)},600:function(W,K){"use strict";K.Z={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"}},60:function(W,K,T){"use strict";T.d(K,{default:function(){return _}});var N=T(219),Z=T(191),f={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function p(){return Object.assign({},f)}var g=function(){function s(){}return s.supportMSEH264Playback=function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')},s.supportNetworkStreamIO=function(){var t=new Z.Z({},p()),h=t.loaderType;return t.destroy(),h=="fetch-stream-loader"||h=="xhr-moz-chunked-loader"},s.getNetworkLoaderTypeName=function(){var t=new Z.Z({},p()),h=t.loaderType;return t.destroy(),h},s.supportNativeMediaPlayback=function(t){s.videoElement==null&&(s.videoElement=window.document.createElement("video"));var h=s.videoElement.canPlayType(t);return h==="probably"||h=="maybe"},s.getFeatureList=function(){var t={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return t.mseFlvPlayback=s.supportMSEH264Playback(),t.networkStreamIO=s.supportNetworkStreamIO(),t.networkLoaderName=s.getNetworkLoaderTypeName(),t.mseLiveFlvPlayback=t.mseFlvPlayback&&t.networkStreamIO,t.nativeMP4H264Playback=s.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),t.nativeWebmVP8Playback=s.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),t.nativeWebmVP9Playback=s.supportNativeMediaPlayback('video/webm; codecs="vp9"'),t},s}(),m=T(939),E=T(716),M=T.n(E),L=T(300),D=T(538),I={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"},H=T(397),ee=T.n(H),A=T(846),O=T(949),S=T(257),P=T(118),y=function(){function s(t,h){if(this.TAG="Transmuxer",this._emitter=new(M()),h.enableWorker&&typeof Worker!="undefined")try{this._worker=ee()(82),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[t,h]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},A.Z.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:A.Z.getConfig()})}catch(v){L.Z.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new O.Z(t,h)}else this._controller=new O.Z(t,h);if(this._controller){var c=this._controller;c.on(S.Z.IO_ERROR,this._onIOError.bind(this)),c.on(S.Z.DEMUX_ERROR,this._onDemuxError.bind(this)),c.on(S.Z.INIT_SEGMENT,this._onInitSegment.bind(this)),c.on(S.Z.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),c.on(S.Z.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),c.on(S.Z.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),c.on(S.Z.MEDIA_INFO,this._onMediaInfo.bind(this)),c.on(S.Z.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),c.on(S.Z.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),c.on(S.Z.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),c.on(S.Z.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return s.prototype.destroy=function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),A.Z.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null},s.prototype.on=function(t,h){this._emitter.addListener(t,h)},s.prototype.off=function(t,h){this._emitter.removeListener(t,h)},s.prototype.hasWorker=function(){return this._worker!=null},s.prototype.open=function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()},s.prototype.close=function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()},s.prototype.seek=function(t){this._worker?this._worker.postMessage({cmd:"seek",param:t}):this._controller.seek(t)},s.prototype.pause=function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()},s.prototype.resume=function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()},s.prototype._onInitSegment=function(t,h){var c=this;Promise.resolve().then(function(){c._emitter.emit(S.Z.INIT_SEGMENT,t,h)})},s.prototype._onMediaSegment=function(t,h){var c=this;Promise.resolve().then(function(){c._emitter.emit(S.Z.MEDIA_SEGMENT,t,h)})},s.prototype._onLoadingComplete=function(){var t=this;Promise.resolve().then(function(){t._emitter.emit(S.Z.LOADING_COMPLETE)})},s.prototype._onRecoveredEarlyEof=function(){var t=this;Promise.resolve().then(function(){t._emitter.emit(S.Z.RECOVERED_EARLY_EOF)})},s.prototype._onMediaInfo=function(t){var h=this;Promise.resolve().then(function(){h._emitter.emit(S.Z.MEDIA_INFO,t)})},s.prototype._onMetaDataArrived=function(t){var h=this;Promise.resolve().then(function(){h._emitter.emit(S.Z.METADATA_ARRIVED,t)})},s.prototype._onScriptDataArrived=function(t){var h=this;Promise.resolve().then(function(){h._emitter.emit(S.Z.SCRIPTDATA_ARRIVED,t)})},s.prototype._onStatisticsInfo=function(t){var h=this;Promise.resolve().then(function(){h._emitter.emit(S.Z.STATISTICS_INFO,t)})},s.prototype._onIOError=function(t,h){var c=this;Promise.resolve().then(function(){c._emitter.emit(S.Z.IO_ERROR,t,h)})},s.prototype._onDemuxError=function(t,h){var c=this;Promise.resolve().then(function(){c._emitter.emit(S.Z.DEMUX_ERROR,t,h)})},s.prototype._onRecommendSeekpoint=function(t){var h=this;Promise.resolve().then(function(){h._emitter.emit(S.Z.RECOMMEND_SEEKPOINT,t)})},s.prototype._onLoggingConfigChanged=function(t){this._worker&&this._worker.postMessage({cmd:"logging_config",param:t})},s.prototype._onWorkerMessage=function(t){var h=t.data,c=h.data;if(h.msg==="destroyed"||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(h.msg){case S.Z.INIT_SEGMENT:case S.Z.MEDIA_SEGMENT:this._emitter.emit(h.msg,c.type,c.data);break;case S.Z.LOADING_COMPLETE:case S.Z.RECOVERED_EARLY_EOF:this._emitter.emit(h.msg);break;case S.Z.MEDIA_INFO:Object.setPrototypeOf(c,P.Z.prototype),this._emitter.emit(h.msg,c);break;case S.Z.METADATA_ARRIVED:case S.Z.SCRIPTDATA_ARRIVED:case S.Z.STATISTICS_INFO:this._emitter.emit(h.msg,c);break;case S.Z.IO_ERROR:case S.Z.DEMUX_ERROR:this._emitter.emit(h.msg,c.type,c.info);break;case S.Z.RECOMMEND_SEEKPOINT:this._emitter.emit(h.msg,c);break;case"logcat_callback":L.Z.emitter.emit("log",c.type,c.logcat)}},s}(),o={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},u=T(51),d=T(29),l=function(){function s(t){this.TAG="MSEController",this._config=t,this._emitter=new(M()),this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new u.Vn}return s.prototype.destroy=function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null},s.prototype.on=function(t,h){this._emitter.addListener(t,h)},s.prototype.off=function(t,h){this._emitter.removeListener(t,h)},s.prototype.attachMediaElement=function(t){if(this._mediaSource)throw new d.rT("MediaSource has been attached to an HTMLMediaElement!");var h=this._mediaSource=new window.MediaSource;h.addEventListener("sourceopen",this.e.onSourceOpen),h.addEventListener("sourceended",this.e.onSourceEnded),h.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=t,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),t.src=this._mediaSourceObjectURL},s.prototype.detachMediaElement=function(){if(this._mediaSource){var t=this._mediaSource;for(var h in this._sourceBuffers){var c=this._pendingSegments[h];c.splice(0,c.length),this._pendingSegments[h]=null,this._pendingRemoveRanges[h]=null,this._lastInitSegments[h]=null;var v=this._sourceBuffers[h];if(v){if(t.readyState!=="closed"){try{t.removeSourceBuffer(v)}catch(w){L.Z.e(this.TAG,w.message)}v.removeEventListener("error",this.e.onSourceBufferError),v.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[h]=null,this._sourceBuffers[h]=null}}if(t.readyState==="open")try{t.endOfStream()}catch(w){L.Z.e(this.TAG,w.message)}t.removeEventListener("sourceopen",this.e.onSourceOpen),t.removeEventListener("sourceended",this.e.onSourceEnded),t.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)},s.prototype.appendInitSegment=function(t,h){if(!this._mediaSource||this._mediaSource.readyState!=="open")return this._pendingSourceBufferInit.push(t),void this._pendingSegments[t.type].push(t);var c=t,v=""+c.container;c.codec&&c.codec.length>0&&(v+=";codecs="+c.codec);var w=!1;if(L.Z.v(this.TAG,"Received Initialization Segment, mimeType: "+v),this._lastInitSegments[c.type]=c,v!==this._mimeTypes[c.type]){if(this._mimeTypes[c.type])L.Z.v(this.TAG,"Notice: "+c.type+" mimeType changed, origin: "+this._mimeTypes[c.type]+", target: "+v);else{w=!0;try{var C=this._sourceBuffers[c.type]=this._mediaSource.addSourceBuffer(v);C.addEventListener("error",this.e.onSourceBufferError),C.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(x){return L.Z.e(this.TAG,x.message),void this._emitter.emit(o.ERROR,{code:x.code,msg:x.message})}}this._mimeTypes[c.type]=v}h||this._pendingSegments[c.type].push(c),w||this._sourceBuffers[c.type]&&!this._sourceBuffers[c.type].updating&&this._doAppendSegments(),D.Z.safari&&c.container==="audio/mpeg"&&c.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=c.mediaDuration/1e3,this._updateMediaSourceDuration())},s.prototype.appendMediaSegment=function(t){var h=t;this._pendingSegments[h.type].push(h),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var c=this._sourceBuffers[h.type];!c||c.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()},s.prototype.seek=function(t){for(var h in this._sourceBuffers)if(this._sourceBuffers[h]){var c=this._sourceBuffers[h];if(this._mediaSource.readyState==="open")try{c.abort()}catch(F){L.Z.e(this.TAG,F.message)}this._idrList.clear();var v=this._pendingSegments[h];if(v.splice(0,v.length),this._mediaSource.readyState!=="closed"){for(var w=0;w<c.buffered.length;w++){var C=c.buffered.start(w),x=c.buffered.end(w);this._pendingRemoveRanges[h].push({start:C,end:x})}if(c.updating||this._doRemoveRanges(),D.Z.safari){var G=this._lastInitSegments[h];G&&(this._pendingSegments[h].push(G),c.updating||this._doAppendSegments())}}}},s.prototype.endOfStream=function(){var t=this._mediaSource,h=this._sourceBuffers;t&&t.readyState==="open"?h.video&&h.video.updating||h.audio&&h.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,t.endOfStream()):t&&t.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0)},s.prototype.getNearestKeyframe=function(t){return this._idrList.getLastSyncPointBeforeDts(t)},s.prototype._needCleanupSourceBuffer=function(){if(!this._config.autoCleanupSourceBuffer)return!1;var t=this._mediaElement.currentTime;for(var h in this._sourceBuffers){var c=this._sourceBuffers[h];if(c){var v=c.buffered;if(v.length>=1&&t-v.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1},s.prototype._doCleanupSourceBuffer=function(){var t=this._mediaElement.currentTime;for(var h in this._sourceBuffers){var c=this._sourceBuffers[h];if(c){for(var v=c.buffered,w=!1,C=0;C<v.length;C++){var x=v.start(C),G=v.end(C);if(x<=t&&t<G+3){if(t-x>=this._config.autoCleanupMaxBackwardDuration){w=!0;var F=t-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[h].push({start:x,end:F})}}else G<t&&(w=!0,this._pendingRemoveRanges[h].push({start:x,end:G}))}w&&!c.updating&&this._doRemoveRanges()}}},s.prototype._updateMediaSourceDuration=function(){var t=this._sourceBuffers;if(this._mediaElement.readyState!==0&&this._mediaSource.readyState==="open"&&!(t.video&&t.video.updating||t.audio&&t.audio.updating)){var h=this._mediaSource.duration,c=this._pendingMediaDuration;c>0&&(isNaN(h)||c>h)&&(L.Z.v(this.TAG,"Update MediaSource duration from "+h+" to "+c),this._mediaSource.duration=c),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},s.prototype._doRemoveRanges=function(){for(var t in this._pendingRemoveRanges)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating)for(var h=this._sourceBuffers[t],c=this._pendingRemoveRanges[t];c.length&&!h.updating;){var v=c.shift();h.remove(v.start,v.end)}},s.prototype._doAppendSegments=function(){var t=this._pendingSegments;for(var h in t)if(this._sourceBuffers[h]&&!this._sourceBuffers[h].updating&&t[h].length>0){var c=t[h].shift();if(c.timestampOffset){var v=this._sourceBuffers[h].timestampOffset,w=c.timestampOffset/1e3;Math.abs(v-w)>.1&&(L.Z.v(this.TAG,"Update MPEG audio timestampOffset from "+v+" to "+w),this._sourceBuffers[h].timestampOffset=w),delete c.timestampOffset}if(!c.data||c.data.byteLength===0)continue;try{this._sourceBuffers[h].appendBuffer(c.data),this._isBufferFull=!1,h==="video"&&c.hasOwnProperty("info")&&this._idrList.appendArray(c.info.syncPoints)}catch(C){this._pendingSegments[h].unshift(c),C.code===22?(this._isBufferFull||this._emitter.emit(o.BUFFER_FULL),this._isBufferFull=!0):(L.Z.e(this.TAG,C.message),this._emitter.emit(o.ERROR,{code:C.code,msg:C.message}))}}},s.prototype._onSourceOpen=function(){if(L.Z.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var t=this._pendingSourceBufferInit;t.length;){var h=t.shift();this.appendInitSegment(h,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(o.SOURCE_OPEN)},s.prototype._onSourceEnded=function(){L.Z.v(this.TAG,"MediaSource onSourceEnded")},s.prototype._onSourceClose=function(){L.Z.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))},s.prototype._hasPendingSegments=function(){var t=this._pendingSegments;return t.video.length>0||t.audio.length>0},s.prototype._hasPendingRemoveRanges=function(){var t=this._pendingRemoveRanges;return t.video.length>0||t.audio.length>0},s.prototype._onSourceBufferUpdateEnd=function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(o.UPDATE_END)},s.prototype._onSourceBufferError=function(t){L.Z.e(this.TAG,"SourceBuffer Error: "+t)},s}(),k=T(600),i={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},e={NETWORK_EXCEPTION:m.nm.EXCEPTION,NETWORK_STATUS_CODE_INVALID:m.nm.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:m.nm.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:m.nm.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:k.Z.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:k.Z.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:k.Z.CODEC_UNSUPPORTED},r=function(){function s(t,h){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(M()),this._config=p(),typeof h=="object"&&Object.assign(this._config,h),t.type.toLowerCase()!=="flv")throw new d.OC("FlvPlayer requires an flv MediaDataSource input!");t.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=t,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var c=D.Z.chrome&&(D.Z.version.major<50||D.Z.version.major===50&&D.Z.version.build<2661);this._alwaysSeekKeyframe=!!(c||D.Z.msedge||D.Z.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return s.prototype.destroy=function(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},s.prototype.on=function(t,h){var c=this;t===I.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(function(){c._emitter.emit(I.MEDIA_INFO,c.mediaInfo)}):t===I.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(function(){c._emitter.emit(I.STATISTICS_INFO,c.statisticsInfo)}),this._emitter.addListener(t,h)},s.prototype.off=function(t,h){this._emitter.removeListener(t,h)},s.prototype.attachMediaElement=function(t){var h=this;if(this._mediaElement=t,t.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),t.addEventListener("seeking",this.e.onvSeeking),t.addEventListener("canplay",this.e.onvCanPlay),t.addEventListener("stalled",this.e.onvStalled),t.addEventListener("progress",this.e.onvProgress),this._msectl=new l(this._config),this._msectl.on(o.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(o.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(o.SOURCE_OPEN,function(){h._mseSourceOpened=!0,h._hasPendingLoad&&(h._hasPendingLoad=!1,h.load())}),this._msectl.on(o.ERROR,function(c){h._emitter.emit(I.ERROR,i.MEDIA_ERROR,e.MEDIA_MSE_ERROR,c)}),this._msectl.attachMediaElement(t),this._pendingSeekTime!=null)try{t.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(c){}},s.prototype.detachMediaElement=function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)},s.prototype.load=function(){var t=this;if(!this._mediaElement)throw new d.rT("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new d.rT("FlvPlayer.load() has been called, please call unload() first!");this._hasPendingLoad||(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1?this._hasPendingLoad=!0:(this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new y(this._mediaDataSource,this._config),this._transmuxer.on(S.Z.INIT_SEGMENT,function(h,c){t._msectl.appendInitSegment(c)}),this._transmuxer.on(S.Z.MEDIA_SEGMENT,function(h,c){if(t._msectl.appendMediaSegment(c),t._config.lazyLoad&&!t._config.isLive){var v=t._mediaElement.currentTime;c.info.endDts>=1e3*(v+t._config.lazyLoadMaxDuration)&&t._progressChecker==null&&(L.Z.v(t.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),t._suspendTransmuxer())}}),this._transmuxer.on(S.Z.LOADING_COMPLETE,function(){t._msectl.endOfStream(),t._emitter.emit(I.LOADING_COMPLETE)}),this._transmuxer.on(S.Z.RECOVERED_EARLY_EOF,function(){t._emitter.emit(I.RECOVERED_EARLY_EOF)}),this._transmuxer.on(S.Z.IO_ERROR,function(h,c){t._emitter.emit(I.ERROR,i.NETWORK_ERROR,h,c)}),this._transmuxer.on(S.Z.DEMUX_ERROR,function(h,c){t._emitter.emit(I.ERROR,i.MEDIA_ERROR,h,{code:-1,msg:c})}),this._transmuxer.on(S.Z.MEDIA_INFO,function(h){t._mediaInfo=h,t._emitter.emit(I.MEDIA_INFO,Object.assign({},h))}),this._transmuxer.on(S.Z.METADATA_ARRIVED,function(h){t._emitter.emit(I.METADATA_ARRIVED,h)}),this._transmuxer.on(S.Z.SCRIPTDATA_ARRIVED,function(h){t._emitter.emit(I.SCRIPTDATA_ARRIVED,h)}),this._transmuxer.on(S.Z.STATISTICS_INFO,function(h){t._statisticsInfo=t._fillStatisticsInfo(h),t._emitter.emit(I.STATISTICS_INFO,Object.assign({},t._statisticsInfo))}),this._transmuxer.on(S.Z.RECOMMEND_SEEKPOINT,function(h){t._mediaElement&&!t._config.accurateSeek&&(t._requestSetTime=!0,t._mediaElement.currentTime=h/1e3)}),this._transmuxer.open()))},s.prototype.unload=function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)},s.prototype.play=function(){return this._mediaElement.play()},s.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(s.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(t){this._mediaElement.volume=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(t){this._mediaElement.muted=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"currentTime",{get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(t){this._mediaElement?this._internalSeek(t):this._pendingSeekTime=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"mediaInfo",{get:function(){return Object.assign({},this._mediaInfo)},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"statisticsInfo",{get:function(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)},enumerable:!1,configurable:!0}),s.prototype._fillStatisticsInfo=function(t){if(t.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return t;var h=!0,c=0,v=0;if(this._mediaElement.getVideoPlaybackQuality){var w=this._mediaElement.getVideoPlaybackQuality();c=w.totalVideoFrames,v=w.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(c=this._mediaElement.webkitDecodedFrameCount,v=this._mediaElement.webkitDroppedFrameCount):h=!1;return h&&(t.decodedFrames=c,t.droppedFrames=v),t},s.prototype._onmseUpdateEnd=function(){if(this._config.lazyLoad&&!this._config.isLive){for(var t=this._mediaElement.buffered,h=this._mediaElement.currentTime,c=0,v=0;v<t.length;v++){var w=t.start(v),C=t.end(v);if(w<=h&&h<C){c=C;break}}c>=h+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(L.Z.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},s.prototype._onmseBufferFull=function(){L.Z.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()},s.prototype._suspendTransmuxer=function(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))},s.prototype._checkProgressAndResume=function(){for(var t=this._mediaElement.currentTime,h=this._mediaElement.buffered,c=!1,v=0;v<h.length;v++){var w=h.start(v),C=h.end(v);if(t>=w&&t<C){t>=C-this._config.lazyLoadRecoverDuration&&(c=!0);break}}c&&(window.clearInterval(this._progressChecker),this._progressChecker=null,c&&(L.Z.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))},s.prototype._isTimepointBuffered=function(t){for(var h=this._mediaElement.buffered,c=0;c<h.length;c++){var v=h.start(c),w=h.end(c);if(t>=v&&t<w)return!0}return!1},s.prototype._internalSeek=function(t){var h=this._isTimepointBuffered(t),c=!1,v=0;if(t<1&&this._mediaElement.buffered.length>0){var w=this._mediaElement.buffered.start(0);(w<1&&t<w||D.Z.safari)&&(c=!0,v=D.Z.safari?.1:w)}if(c)this._requestSetTime=!0,this._mediaElement.currentTime=v;else if(h){if(this._alwaysSeekKeyframe){var C=this._msectl.getNearestKeyframe(Math.floor(1e3*t));this._requestSetTime=!0,this._mediaElement.currentTime=C!=null?C.dts/1e3:t}else this._requestSetTime=!0,this._mediaElement.currentTime=t;this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(t),this._transmuxer.seek(Math.floor(1e3*t)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=t)},s.prototype._checkAndApplyUnbufferedSeekpoint=function(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){var t=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(t)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(t),this._transmuxer.seek(Math.floor(1e3*t)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=t))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)},s.prototype._checkAndResumeStuckPlayback=function(t){var h=this._mediaElement;if(t||!this._receivedCanPlay||h.readyState<2){var c=h.buffered;c.length>0&&h.currentTime<c.start(0)&&(L.Z.w(this.TAG,"Playback seems stuck at "+h.currentTime+", seek to "+c.start(0)),this._requestSetTime=!0,this._mediaElement.currentTime=c.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)},s.prototype._onvLoadedMetadata=function(t){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)},s.prototype._onvSeeking=function(t){var h=this._mediaElement.currentTime,c=this._mediaElement.buffered;if(this._requestSetTime)this._requestSetTime=!1;else{if(h<1&&c.length>0){var v=c.start(0);if(v<1&&h<v||D.Z.safari)return this._requestSetTime=!0,void(this._mediaElement.currentTime=D.Z.safari?.1:v)}if(this._isTimepointBuffered(h)){if(this._alwaysSeekKeyframe){var w=this._msectl.getNearestKeyframe(Math.floor(1e3*h));w!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=w.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume()}else this._seekpointRecord={seekPoint:h,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},s.prototype._onvCanPlay=function(t){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)},s.prototype._onvStalled=function(t){this._checkAndResumeStuckPlayback(!0)},s.prototype._onvProgress=function(t){this._checkAndResumeStuckPlayback()},s}(),n=function(){function s(t,h){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(M()),this._config=p(),typeof h=="object"&&Object.assign(this._config,h),t.type.toLowerCase()==="flv")throw new d.OC("NativePlayer does't support flv MediaDataSource input!");if(t.hasOwnProperty("segments"))throw new d.OC("NativePlayer("+t.type+") doesn't support multipart playback!");this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=t,this._mediaElement=null}return s.prototype.destroy=function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},s.prototype.on=function(t,h){var c=this;t===I.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){c._emitter.emit(I.MEDIA_INFO,c.mediaInfo)}):t===I.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){c._emitter.emit(I.STATISTICS_INFO,c.statisticsInfo)}),this._emitter.addListener(t,h)},s.prototype.off=function(t,h){this._emitter.removeListener(t,h)},s.prototype.attachMediaElement=function(t){if(this._mediaElement=t,t.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{t.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(h){}},s.prototype.detachMediaElement=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},s.prototype.load=function(){if(!this._mediaElement)throw new d.rT("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)},s.prototype.unload=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},s.prototype.play=function(){return this._mediaElement.play()},s.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(s.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(t){this._mediaElement.volume=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(t){this._mediaElement.muted=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"currentTime",{get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(t){this._mediaElement?this._mediaElement.currentTime=t:this._pendingSeekTime=t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"mediaInfo",{get:function(){var t={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(t.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(t.width=this._mediaElement.videoWidth,t.height=this._mediaElement.videoHeight)),t},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"statisticsInfo",{get:function(){var t={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return t;var h=!0,c=0,v=0;if(this._mediaElement.getVideoPlaybackQuality){var w=this._mediaElement.getVideoPlaybackQuality();c=w.totalVideoFrames,v=w.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(c=this._mediaElement.webkitDecodedFrameCount,v=this._mediaElement.webkitDroppedFrameCount):h=!1;return h&&(t.decodedFrames=c,t.droppedFrames=v),t},enumerable:!1,configurable:!0}),s.prototype._onvLoadedMetadata=function(t){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(I.MEDIA_INFO,this.mediaInfo)},s.prototype._reportStatisticsInfo=function(){this._emitter.emit(I.STATISTICS_INFO,this.statisticsInfo)},s}();N.Z.install();var a={createPlayer:function(s,t){var h=s;if(h==null||typeof h!="object")throw new d.OC("MediaDataSource must be an javascript object!");if(!h.hasOwnProperty("type"))throw new d.OC("MediaDataSource must has type field to indicate video file type!");switch(h.type){case"flv":return new r(h,t);default:return new n(h,t)}},isSupported:function(){return g.supportMSEH264Playback()},getFeatureList:function(){return g.getFeatureList()}};a.BaseLoader=m.fp,a.LoaderStatus=m.GM,a.LoaderErrors=m.nm,a.Events=I,a.ErrorTypes=i,a.ErrorDetails=e,a.FlvPlayer=r,a.NativePlayer=n,a.LoggingControl=A.Z,Object.defineProperty(a,"version",{enumerable:!0,get:function(){return"1.6.2"}});var _=a},324:function(W,K,T){W.exports=T(60).default},191:function(W,K,T){"use strict";T.d(K,{Z:function(){return P}});var N,Z=T(300),f=function(){function y(){this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return y.prototype.reset=function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0},y.prototype.addBytes=function(o){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=o,this._totalBytes+=o):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=o,this._totalBytes+=o):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=o,this._totalBytes+=o,this._lastCheckpoint=this._now())},Object.defineProperty(y.prototype,"currentKBps",{get:function(){this.addBytes(0);var o=(this._now()-this._lastCheckpoint)/1e3;return o==0&&(o=1),this._intervalBytes/o/1024},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"lastSecondKBps",{get:function(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"averageKBps",{get:function(){var o=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/o/1024},enumerable:!1,configurable:!0}),y}(),p=T(939),g=T(538),m=T(29),E=(N=function(y,o){return(N=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var l in d)Object.prototype.hasOwnProperty.call(d,l)&&(u[l]=d[l])})(y,o)},function(y,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function u(){this.constructor=y}N(y,o),y.prototype=o===null?Object.create(o):(u.prototype=o.prototype,new u)}),M=function(y){function o(u,d){var l=y.call(this,"fetch-stream-loader")||this;return l.TAG="FetchStreamLoader",l._seekHandler=u,l._config=d,l._needStash=!0,l._requestAbort=!1,l._contentLength=null,l._receivedLength=0,l}return E(o,y),o.isSupported=function(){try{var u=g.Z.msedge&&g.Z.version.minor>=15048,d=!g.Z.msedge||u;return self.fetch&&self.ReadableStream&&d}catch(l){return!1}},o.prototype.destroy=function(){this.isWorking()&&this.abort(),y.prototype.destroy.call(this)},o.prototype.open=function(u,d){var l=this;this._dataSource=u,this._range=d;var k=u.url;this._config.reuseRedirectedURL&&u.redirectedURL!=null&&(k=u.redirectedURL);var i=this._seekHandler.getConfig(k,d),e=new self.Headers;if(typeof i.headers=="object"){var r=i.headers;for(var n in r)r.hasOwnProperty(n)&&e.append(n,r[n])}var a={method:"GET",headers:e,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(var n in this._config.headers)e.append(n,this._config.headers[n]);u.cors===!1&&(a.mode="same-origin"),u.withCredentials&&(a.credentials="include"),u.referrerPolicy&&(a.referrerPolicy=u.referrerPolicy),self.AbortController&&(this._abortController=new self.AbortController,a.signal=this._abortController.signal),this._status=p.GM.kConnecting,self.fetch(i.url,a).then(function(_){if(l._requestAbort)return l._status=p.GM.kIdle,void _.body.cancel();if(_.ok&&_.status>=200&&_.status<=299){if(_.url!==i.url&&l._onURLRedirect){var s=l._seekHandler.removeURLParameters(_.url);l._onURLRedirect(s)}var t=_.headers.get("Content-Length");return t!=null&&(l._contentLength=parseInt(t),l._contentLength!==0&&l._onContentLengthKnown&&l._onContentLengthKnown(l._contentLength)),l._pump.call(l,_.body.getReader())}if(l._status=p.GM.kError,!l._onError)throw new m.OZ("FetchStreamLoader: Http code invalid, "+_.status+" "+_.statusText);l._onError(p.nm.HTTP_STATUS_CODE_INVALID,{code:_.status,msg:_.statusText})}).catch(function(_){if(!l._abortController||!l._abortController.signal.aborted){if(l._status=p.GM.kError,!l._onError)throw _;l._onError(p.nm.EXCEPTION,{code:-1,msg:_.message})}})},o.prototype.abort=function(){if(this._requestAbort=!0,(this._status!==p.GM.kBuffering||!g.Z.chrome)&&this._abortController)try{this._abortController.abort()}catch(u){}},o.prototype._pump=function(u){var d=this;return u.read().then(function(l){if(l.done)if(d._contentLength!==null&&d._receivedLength<d._contentLength){d._status=p.GM.kError;var k=p.nm.EARLY_EOF,i={code:-1,msg:"Fetch stream meet Early-EOF"};if(!d._onError)throw new m.OZ(i.msg);d._onError(k,i)}else d._status=p.GM.kComplete,d._onComplete&&d._onComplete(d._range.from,d._range.from+d._receivedLength-1);else{if(d._abortController&&d._abortController.signal.aborted)return void(d._status=p.GM.kComplete);if(d._requestAbort===!0)return d._status=p.GM.kComplete,u.cancel();d._status=p.GM.kBuffering;var e=l.value.buffer,r=d._range.from+d._receivedLength;d._receivedLength+=e.byteLength,d._onDataArrival&&d._onDataArrival(e,r,d._receivedLength),d._pump(u)}}).catch(function(l){if(d._abortController&&d._abortController.signal.aborted)d._status=p.GM.kComplete;else if(l.code!==11||!g.Z.msedge){d._status=p.GM.kError;var k=0,i=null;if(l.code!==19&&l.message!=="network error"||!(d._contentLength===null||d._contentLength!==null&&d._receivedLength<d._contentLength)?(k=p.nm.EXCEPTION,i={code:l.code,msg:l.message}):(k=p.nm.EARLY_EOF,i={code:l.code,msg:"Fetch stream meet Early-EOF"}),!d._onError)throw new m.OZ(i.msg);d._onError(k,i)}})},o}(p.fp),L=function(){var y=function(o,u){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,l){d.__proto__=l}||function(d,l){for(var k in l)Object.prototype.hasOwnProperty.call(l,k)&&(d[k]=l[k])})(o,u)};return function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=o}y(o,u),o.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)}}(),D=function(y){function o(u,d){var l=y.call(this,"xhr-moz-chunked-loader")||this;return l.TAG="MozChunkedLoader",l._seekHandler=u,l._config=d,l._needStash=!0,l._xhr=null,l._requestAbort=!1,l._contentLength=null,l._receivedLength=0,l}return L(o,y),o.isSupported=function(){try{var u=new XMLHttpRequest;return u.open("GET","https://example.com",!0),u.responseType="moz-chunked-arraybuffer",u.responseType==="moz-chunked-arraybuffer"}catch(d){return Z.Z.w("MozChunkedLoader",d.message),!1}},o.prototype.destroy=function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),y.prototype.destroy.call(this)},o.prototype.open=function(u,d){this._dataSource=u,this._range=d;var l=u.url;this._config.reuseRedirectedURL&&u.redirectedURL!=null&&(l=u.redirectedURL);var k=this._seekHandler.getConfig(l,d);this._requestURL=k.url;var i=this._xhr=new XMLHttpRequest;if(i.open("GET",k.url,!0),i.responseType="moz-chunked-arraybuffer",i.onreadystatechange=this._onReadyStateChange.bind(this),i.onprogress=this._onProgress.bind(this),i.onloadend=this._onLoadEnd.bind(this),i.onerror=this._onXhrError.bind(this),u.withCredentials&&(i.withCredentials=!0),typeof k.headers=="object"){var e=k.headers;for(var r in e)e.hasOwnProperty(r)&&i.setRequestHeader(r,e[r])}if(typeof this._config.headers=="object"){e=this._config.headers;for(var r in e)e.hasOwnProperty(r)&&i.setRequestHeader(r,e[r])}this._status=p.GM.kConnecting,i.send()},o.prototype.abort=function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=p.GM.kComplete},o.prototype._onReadyStateChange=function(u){var d=u.target;if(d.readyState===2){if(d.responseURL!=null&&d.responseURL!==this._requestURL&&this._onURLRedirect){var l=this._seekHandler.removeURLParameters(d.responseURL);this._onURLRedirect(l)}if(d.status!==0&&(d.status<200||d.status>299)){if(this._status=p.GM.kError,!this._onError)throw new m.OZ("MozChunkedLoader: Http code invalid, "+d.status+" "+d.statusText);this._onError(p.nm.HTTP_STATUS_CODE_INVALID,{code:d.status,msg:d.statusText})}else this._status=p.GM.kBuffering}},o.prototype._onProgress=function(u){if(this._status!==p.GM.kError){this._contentLength===null&&u.total!==null&&u.total!==0&&(this._contentLength=u.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var d=u.target.response,l=this._range.from+this._receivedLength;this._receivedLength+=d.byteLength,this._onDataArrival&&this._onDataArrival(d,l,this._receivedLength)}},o.prototype._onLoadEnd=function(u){this._requestAbort!==!0?this._status!==p.GM.kError&&(this._status=p.GM.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1},o.prototype._onXhrError=function(u){this._status=p.GM.kError;var d=0,l=null;if(this._contentLength&&u.loaded<this._contentLength?(d=p.nm.EARLY_EOF,l={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(d=p.nm.EXCEPTION,l={code:-1,msg:u.constructor.name+" "+u.type}),!this._onError)throw new m.OZ(l.msg);this._onError(d,l)},o}(p.fp),I=function(){var y=function(o,u){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,l){d.__proto__=l}||function(d,l){for(var k in l)Object.prototype.hasOwnProperty.call(l,k)&&(d[k]=l[k])})(o,u)};return function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=o}y(o,u),o.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)}}(),H=function(y){function o(u,d){var l=y.call(this,"xhr-range-loader")||this;return l.TAG="RangeLoader",l._seekHandler=u,l._config=d,l._needStash=!1,l._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],l._currentChunkSizeKB=384,l._currentSpeedNormalized=0,l._zeroSpeedChunkCount=0,l._xhr=null,l._speedSampler=new f,l._requestAbort=!1,l._waitForTotalLength=!1,l._totalLengthReceived=!1,l._currentRequestURL=null,l._currentRedirectedURL=null,l._currentRequestRange=null,l._totalLength=null,l._contentLength=null,l._receivedLength=0,l._lastTimeLoaded=0,l}return I(o,y),o.isSupported=function(){try{var u=new XMLHttpRequest;return u.open("GET","https://example.com",!0),u.responseType="arraybuffer",u.responseType==="arraybuffer"}catch(d){return Z.Z.w("RangeLoader",d.message),!1}},o.prototype.destroy=function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),y.prototype.destroy.call(this)},Object.defineProperty(o.prototype,"currentSpeed",{get:function(){return this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),o.prototype.open=function(u,d){this._dataSource=u,this._range=d,this._status=p.GM.kConnecting;var l=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(l=!0,this._totalLength=this._dataSource.filesize),this._totalLengthReceived||l?this._openSubRange():(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1}))},o.prototype._openSubRange=function(){var u=1024*this._currentChunkSizeKB,d=this._range.from+this._receivedLength,l=d+u;this._contentLength!=null&&l-this._range.from>=this._contentLength&&(l=this._range.from+this._contentLength-1),this._currentRequestRange={from:d,to:l},this._internalOpen(this._dataSource,this._currentRequestRange)},o.prototype._internalOpen=function(u,d){this._lastTimeLoaded=0;var l=u.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?l=this._currentRedirectedURL:u.redirectedURL!=null&&(l=u.redirectedURL));var k=this._seekHandler.getConfig(l,d);this._currentRequestURL=k.url;var i=this._xhr=new XMLHttpRequest;if(i.open("GET",k.url,!0),i.responseType="arraybuffer",i.onreadystatechange=this._onReadyStateChange.bind(this),i.onprogress=this._onProgress.bind(this),i.onload=this._onLoad.bind(this),i.onerror=this._onXhrError.bind(this),u.withCredentials&&(i.withCredentials=!0),typeof k.headers=="object"){var e=k.headers;for(var r in e)e.hasOwnProperty(r)&&i.setRequestHeader(r,e[r])}if(typeof this._config.headers=="object"){e=this._config.headers;for(var r in e)e.hasOwnProperty(r)&&i.setRequestHeader(r,e[r])}i.send()},o.prototype.abort=function(){this._requestAbort=!0,this._internalAbort(),this._status=p.GM.kComplete},o.prototype._internalAbort=function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)},o.prototype._onReadyStateChange=function(u){var d=u.target;if(d.readyState===2){if(d.responseURL!=null){var l=this._seekHandler.removeURLParameters(d.responseURL);d.responseURL!==this._currentRequestURL&&l!==this._currentRedirectedURL&&(this._currentRedirectedURL=l,this._onURLRedirect&&this._onURLRedirect(l))}if(d.status>=200&&d.status<=299){if(this._waitForTotalLength)return;this._status=p.GM.kBuffering}else{if(this._status=p.GM.kError,!this._onError)throw new m.OZ("RangeLoader: Http code invalid, "+d.status+" "+d.statusText);this._onError(p.nm.HTTP_STATUS_CODE_INVALID,{code:d.status,msg:d.statusText})}}},o.prototype._onProgress=function(u){if(this._status!==p.GM.kError){if(this._contentLength===null){var d=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,d=!0;var l=u.total;this._internalAbort(),l!=null&l!==0&&(this._totalLength=l)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,d)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var k=u.loaded-this._lastTimeLoaded;this._lastTimeLoaded=u.loaded,this._speedSampler.addBytes(k)}},o.prototype._normalizeSpeed=function(u){var d=this._chunkSizeKBList,l=d.length-1,k=0,i=0,e=l;if(u<d[0])return d[0];for(;i<=e;){if((k=i+Math.floor((e-i)/2))===l||u>=d[k]&&u<d[k+1])return d[k];d[k]<u?i=k+1:e=k-1}},o.prototype._onLoad=function(u){if(this._status!==p.GM.kError)if(this._waitForTotalLength)this._waitForTotalLength=!1;else{this._lastTimeLoaded=0;var d=this._speedSampler.lastSecondKBps;if(d===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(d=this._speedSampler.currentKBps)),d!==0){var l=this._normalizeSpeed(d);this._currentSpeedNormalized!==l&&(this._currentSpeedNormalized=l,this._currentChunkSizeKB=l)}var k=u.target.response,i=this._range.from+this._receivedLength;this._receivedLength+=k.byteLength;var e=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():e=!0,this._onDataArrival&&this._onDataArrival(k,i,this._receivedLength),e&&(this._status=p.GM.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}},o.prototype._onXhrError=function(u){this._status=p.GM.kError;var d=0,l=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(d=p.nm.EARLY_EOF,l={code:-1,msg:"RangeLoader meet Early-Eof"}):(d=p.nm.EXCEPTION,l={code:-1,msg:u.constructor.name+" "+u.type}),!this._onError)throw new m.OZ(l.msg);this._onError(d,l)},o}(p.fp),ee=function(){var y=function(o,u){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,l){d.__proto__=l}||function(d,l){for(var k in l)Object.prototype.hasOwnProperty.call(l,k)&&(d[k]=l[k])})(o,u)};return function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");function d(){this.constructor=o}y(o,u),o.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)}}(),A=function(y){function o(){var u=y.call(this,"websocket-loader")||this;return u.TAG="WebSocketLoader",u._needStash=!0,u._ws=null,u._requestAbort=!1,u._receivedLength=0,u}return ee(o,y),o.isSupported=function(){try{return self.WebSocket!==void 0}catch(u){return!1}},o.prototype.destroy=function(){this._ws&&this.abort(),y.prototype.destroy.call(this)},o.prototype.open=function(u){try{var d=this._ws=new self.WebSocket(u.url);d.binaryType="arraybuffer",d.onopen=this._onWebSocketOpen.bind(this),d.onclose=this._onWebSocketClose.bind(this),d.onmessage=this._onWebSocketMessage.bind(this),d.onerror=this._onWebSocketError.bind(this),this._status=p.GM.kConnecting}catch(k){this._status=p.GM.kError;var l={code:k.code,msg:k.message};if(!this._onError)throw new m.OZ(l.msg);this._onError(p.nm.EXCEPTION,l)}},o.prototype.abort=function(){var u=this._ws;!u||u.readyState!==0&&u.readyState!==1||(this._requestAbort=!0,u.close()),this._ws=null,this._status=p.GM.kComplete},o.prototype._onWebSocketOpen=function(u){this._status=p.GM.kBuffering},o.prototype._onWebSocketClose=function(u){this._requestAbort!==!0?(this._status=p.GM.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)):this._requestAbort=!1},o.prototype._onWebSocketMessage=function(u){var d=this;if(u.data instanceof ArrayBuffer)this._dispatchArrayBuffer(u.data);else if(u.data instanceof Blob){var l=new FileReader;l.onload=function(){d._dispatchArrayBuffer(l.result)},l.readAsArrayBuffer(u.data)}else{this._status=p.GM.kError;var k={code:-1,msg:"Unsupported WebSocket message type: "+u.data.constructor.name};if(!this._onError)throw new m.OZ(k.msg);this._onError(p.nm.EXCEPTION,k)}},o.prototype._dispatchArrayBuffer=function(u){var d=u,l=this._receivedLength;this._receivedLength+=d.byteLength,this._onDataArrival&&this._onDataArrival(d,l,this._receivedLength)},o.prototype._onWebSocketError=function(u){this._status=p.GM.kError;var d={code:u.code,msg:u.message};if(!this._onError)throw new m.OZ(d.msg);this._onError(p.nm.EXCEPTION,d)},o}(p.fp),O=function(){function y(o){this._zeroStart=o||!1}return y.prototype.getConfig=function(o,u){var d={};if(u.from!==0||u.to!==-1){var l=void 0;l=u.to!==-1?"bytes="+u.from.toString()+"-"+u.to.toString():"bytes="+u.from.toString()+"-",d.Range=l}else this._zeroStart&&(d.Range="bytes=0-");return{url:o,headers:d}},y.prototype.removeURLParameters=function(o){return o},y}(),S=function(){function y(o,u){this._startName=o,this._endName=u}return y.prototype.getConfig=function(o,u){var d=o;if(u.from!==0||u.to!==-1){var l=!0;d.indexOf("?")===-1&&(d+="?",l=!1),l&&(d+="&"),d+=this._startName+"="+u.from.toString(),u.to!==-1&&(d+="&"+this._endName+"="+u.to.toString())}return{url:d,headers:{}}},y.prototype.removeURLParameters=function(o){var u=o.split("?")[0],d=void 0,l=o.indexOf("?");l!==-1&&(d=o.substring(l+1));var k="";if(d!=null&&d.length>0)for(var i=d.split("&"),e=0;e<i.length;e++){var r=i[e].split("="),n=e>0;r[0]!==this._startName&&r[0]!==this._endName&&(n&&(k+="&"),k+=i[e])}return k.length===0?u:u+"?"+k},y}(),P=function(){function y(o,u,d){this.TAG="IOController",this._config=u,this._extraData=d,this._stashInitialSize=393216,u.stashInitialSize!=null&&u.stashInitialSize>0&&(this._stashInitialSize=u.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,u.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=o,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(o.url),this._refTotalLength=o.filesize?o.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new f,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return y.prototype.destroy=function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null},y.prototype.isWorking=function(){return this._loader&&this._loader.isWorking()&&!this._paused},y.prototype.isPaused=function(){return this._paused},Object.defineProperty(y.prototype,"status",{get:function(){return this._loader.status},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"extraData",{get:function(){return this._extraData},set:function(o){this._extraData=o},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(o){this._onDataArrival=o},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onSeeked",{get:function(){return this._onSeeked},set:function(o){this._onSeeked=o},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onError",{get:function(){return this._onError},set:function(o){this._onError=o},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onComplete",{get:function(){return this._onComplete},set:function(o){this._onComplete=o},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onRedirect",{get:function(){return this._onRedirect},set:function(o){this._onRedirect=o},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onRecoveredEarlyEof",{get:function(){return this._onRecoveredEarlyEof},set:function(o){this._onRecoveredEarlyEof=o},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"currentURL",{get:function(){return this._dataSource.url},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"hasRedirect",{get:function(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"currentRedirectedURL",{get:function(){return this._redirectedURL||this._dataSource.redirectedURL},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"currentSpeed",{get:function(){return this._loaderClass===H?this._loader.currentSpeed:this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"loaderType",{get:function(){return this._loader.type},enumerable:!1,configurable:!0}),y.prototype._selectSeekHandler=function(){var o=this._config;if(o.seekType==="range")this._seekHandler=new O(this._config.rangeLoadZeroStart);else if(o.seekType==="param"){var u=o.seekParamStart||"bstart",d=o.seekParamEnd||"bend";this._seekHandler=new S(u,d)}else{if(o.seekType!=="custom")throw new m.OC("Invalid seekType in config: "+o.seekType);if(typeof o.customSeekHandler!="function")throw new m.OC("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new o.customSeekHandler}},y.prototype._selectLoader=function(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=A;else if(M.isSupported())this._loaderClass=M;else if(D.isSupported())this._loaderClass=D;else{if(!H.isSupported())throw new m.OZ("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=H}},y.prototype._createLoader=function(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)},y.prototype.open=function(o){this._currentRange={from:0,to:-1},o&&(this._currentRange.from=o),this._speedSampler.reset(),o||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))},y.prototype.abort=function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)},y.prototype.pause=function(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)},y.prototype.resume=function(){if(this._paused){this._paused=!1;var o=this._resumeFrom;this._resumeFrom=0,this._internalSeek(o,!0)}},y.prototype.seek=function(o){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(o,!0)},y.prototype._internalSeek=function(o,u){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(u),this._loader.destroy(),this._loader=null;var d={from:o,to:-1};this._currentRange={from:d.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,d),this._onSeeked&&this._onSeeked()},y.prototype.updateUrl=function(o){if(!o||typeof o!="string"||o.length===0)throw new m.OC("Url must be a non-empty string!");this._dataSource.url=o},y.prototype._expandBuffer=function(o){for(var u=this._stashSize;u+1048576<o;)u*=2;if((u+=1048576)!==this._bufferSize){var d=new ArrayBuffer(u);if(this._stashUsed>0){var l=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(d,0,u).set(l,0)}this._stashBuffer=d,this._bufferSize=u}},y.prototype._normalizeSpeed=function(o){var u=this._speedNormalizeList,d=u.length-1,l=0,k=0,i=d;if(o<u[0])return u[0];for(;k<=i;){if((l=k+Math.floor((i-k)/2))===d||o>=u[l]&&o<u[l+1])return u[l];u[l]<o?k=l+1:i=l-1}},y.prototype._adjustStashSize=function(o){var u=0;(u=this._config.isLive||o<512?o:o>=512&&o<=1024?Math.floor(1.5*o):2*o)>8192&&(u=8192);var d=1024*u+1048576;this._bufferSize<d&&this._expandBuffer(d),this._stashSize=1024*u},y.prototype._dispatchChunks=function(o,u){return this._currentRange.to=u+o.byteLength-1,this._onDataArrival(o,u)},y.prototype._onURLRedirect=function(o){this._redirectedURL=o,this._onRedirect&&this._onRedirect(o)},y.prototype._onContentLengthKnown=function(o){o&&this._fullRequestFlag&&(this._totalLength=o,this._fullRequestFlag=!1)},y.prototype._onLoaderChunkArrival=function(o,u,d){if(!this._onDataArrival)throw new m.rT("IOController: No existing consumer (onDataArrival) callback!");if(!this._paused){this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(o.byteLength);var l=this._speedSampler.lastSecondKBps;if(l!==0){var k=this._normalizeSpeed(l);this._speedNormalized!==k&&(this._speedNormalized=k,this._adjustStashSize(k))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=u),this._stashUsed+o.byteLength<=this._stashSize)(r=new Uint8Array(this._stashBuffer,0,this._stashSize)).set(new Uint8Array(o),this._stashUsed),this._stashUsed+=o.byteLength;else if(r=new Uint8Array(this._stashBuffer,0,this._bufferSize),this._stashUsed>0){var i=this._stashBuffer.slice(0,this._stashUsed);(n=this._dispatchChunks(i,this._stashByteStart))<i.byteLength?n>0&&(a=new Uint8Array(i,n),r.set(a,0),this._stashUsed=a.byteLength,this._stashByteStart+=n):(this._stashUsed=0,this._stashByteStart+=n),this._stashUsed+o.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+o.byteLength),r=new Uint8Array(this._stashBuffer,0,this._bufferSize)),r.set(new Uint8Array(o),this._stashUsed),this._stashUsed+=o.byteLength}else(n=this._dispatchChunks(o,u))<o.byteLength&&((e=o.byteLength-n)>this._bufferSize&&(this._expandBuffer(e),r=new Uint8Array(this._stashBuffer,0,this._bufferSize)),r.set(new Uint8Array(o,n),0),this._stashUsed+=e,this._stashByteStart=u+n);else if(this._stashUsed===0){var e;(n=this._dispatchChunks(o,u))<o.byteLength&&((e=o.byteLength-n)>this._bufferSize&&this._expandBuffer(e),(r=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(o,n),0),this._stashUsed+=e,this._stashByteStart=u+n)}else{var r,n;if(this._stashUsed+o.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+o.byteLength),(r=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(o),this._stashUsed),this._stashUsed+=o.byteLength,(n=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart))<this._stashUsed&&n>0){var a=new Uint8Array(this._stashBuffer,n);r.set(a,0)}this._stashUsed-=n,this._stashByteStart+=n}}},y.prototype._flushStashBuffer=function(o){if(this._stashUsed>0){var u=this._stashBuffer.slice(0,this._stashUsed),d=this._dispatchChunks(u,this._stashByteStart),l=u.byteLength-d;if(d<u.byteLength){if(!o){if(d>0){var k=new Uint8Array(this._stashBuffer,0,this._bufferSize),i=new Uint8Array(u,d);k.set(i,0),this._stashUsed=i.byteLength,this._stashByteStart+=d}return 0}Z.Z.w(this.TAG,l+" bytes unconsumed data remain when flush buffer, dropped")}return this._stashUsed=0,this._stashByteStart=0,l}return 0},y.prototype._onLoaderComplete=function(o,u){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)},y.prototype._onLoaderError=function(o,u){switch(Z.Z.e(this.TAG,"Loader error, code = "+u.code+", msg = "+u.msg),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,o=p.nm.UNRECOVERABLE_EARLY_EOF),o){case p.nm.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var d=this._currentRange.to+1;return void(d<this._totalLength&&(Z.Z.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(d,!1)))}o=p.nm.UNRECOVERABLE_EARLY_EOF;break;case p.nm.UNRECOVERABLE_EARLY_EOF:case p.nm.CONNECTING_TIMEOUT:case p.nm.HTTP_STATUS_CODE_INVALID:case p.nm.EXCEPTION:}if(!this._onError)throw new m.OZ("IOException: "+u.msg);this._onError(o,u)},y}()},939:function(W,K,T){"use strict";T.d(K,{GM:function(){return Z},nm:function(){return f},fp:function(){return p}});var N=T(29),Z={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},f={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},p=function(){function g(m){this._type=m||"undefined",this._status=Z.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return g.prototype.destroy=function(){this._status=Z.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null},g.prototype.isWorking=function(){return this._status===Z.kConnecting||this._status===Z.kBuffering},Object.defineProperty(g.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"needStashBuffer",{get:function(){return this._needStash},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onContentLengthKnown",{get:function(){return this._onContentLengthKnown},set:function(m){this._onContentLengthKnown=m},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onURLRedirect",{get:function(){return this._onURLRedirect},set:function(m){this._onURLRedirect=m},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(m){this._onDataArrival=m},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onError",{get:function(){return this._onError},set:function(m){this._onError=m},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onComplete",{get:function(){return this._onComplete},set:function(m){this._onComplete=m},enumerable:!1,configurable:!0}),g.prototype.open=function(m,E){throw new N.do("Unimplemented abstract function!")},g.prototype.abort=function(){throw new N.do("Unimplemented abstract function!")},g}()},538:function(W,K){"use strict";var T={};(function(){var N=self.navigator.userAgent.toLowerCase(),Z=/(edge)\/([\w.]+)/.exec(N)||/(opr)[\/]([\w.]+)/.exec(N)||/(chrome)[ \/]([\w.]+)/.exec(N)||/(iemobile)[\/]([\w.]+)/.exec(N)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(N)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(N)||/(webkit)[ \/]([\w.]+)/.exec(N)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(N)||/(msie) ([\w.]+)/.exec(N)||N.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(N)||N.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(N)||[],f=/(ipad)/.exec(N)||/(ipod)/.exec(N)||/(windows phone)/.exec(N)||/(iphone)/.exec(N)||/(kindle)/.exec(N)||/(android)/.exec(N)||/(windows)/.exec(N)||/(mac)/.exec(N)||/(linux)/.exec(N)||/(cros)/.exec(N)||[],p={browser:Z[5]||Z[3]||Z[1]||"",version:Z[2]||Z[4]||"0",majorVersion:Z[4]||Z[2]||"0",platform:f[0]||""},g={};if(p.browser){g[p.browser]=!0;var m=p.majorVersion.split(".");g.version={major:parseInt(p.majorVersion,10),string:p.version},m.length>1&&(g.version.minor=parseInt(m[1],10)),m.length>2&&(g.version.build=parseInt(m[2],10))}if(p.platform&&(g[p.platform]=!0),(g.chrome||g.opr||g.safari)&&(g.webkit=!0),g.rv||g.iemobile){g.rv&&delete g.rv;var E="msie";p.browser=E,g.msie=!0}if(g.edge){delete g.edge;var M="msedge";p.browser=M,g.msedge=!0}if(g.opr){var L="opera";p.browser=L,g.opera=!0}if(g.safari&&g.android){var D="android";p.browser=D,g.android=!0}for(var I in g.name=p.browser,g.platform=p.platform,T)T.hasOwnProperty(I)&&delete T[I];Object.assign(T,g)})(),K.Z=T},29:function(W,K,T){"use strict";T.d(K,{OZ:function(){return f},rT:function(){return p},OC:function(){return g},do:function(){return m}});var N,Z=(N=function(E,M){return(N=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,D){L.__proto__=D}||function(L,D){for(var I in D)Object.prototype.hasOwnProperty.call(D,I)&&(L[I]=D[I])})(E,M)},function(E,M){if(typeof M!="function"&&M!==null)throw new TypeError("Class extends value "+String(M)+" is not a constructor or null");function L(){this.constructor=E}N(E,M),E.prototype=M===null?Object.create(M):(L.prototype=M.prototype,new L)}),f=function(){function E(M){this._message=M}return Object.defineProperty(E.prototype,"name",{get:function(){return"RuntimeException"},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"message",{get:function(){return this._message},enumerable:!1,configurable:!0}),E.prototype.toString=function(){return this.name+": "+this.message},E}(),p=function(E){function M(L){return E.call(this,L)||this}return Z(M,E),Object.defineProperty(M.prototype,"name",{get:function(){return"IllegalStateException"},enumerable:!1,configurable:!0}),M}(f),g=function(E){function M(L){return E.call(this,L)||this}return Z(M,E),Object.defineProperty(M.prototype,"name",{get:function(){return"InvalidArgumentException"},enumerable:!1,configurable:!0}),M}(f),m=function(E){function M(L){return E.call(this,L)||this}return Z(M,E),Object.defineProperty(M.prototype,"name",{get:function(){return"NotImplementedException"},enumerable:!1,configurable:!0}),M}(f)},300:function(W,K,T){"use strict";var N=T(716),Z=T.n(N),f=function(){function p(){}return p.e=function(g,m){g&&!p.FORCE_GLOBAL_TAG||(g=p.GLOBAL_TAG);var E="["+g+"] > "+m;p.ENABLE_CALLBACK&&p.emitter.emit("log","error",E),p.ENABLE_ERROR&&(console.error?console.error(E):console.warn?console.warn(E):console.log(E))},p.i=function(g,m){g&&!p.FORCE_GLOBAL_TAG||(g=p.GLOBAL_TAG);var E="["+g+"] > "+m;p.ENABLE_CALLBACK&&p.emitter.emit("log","info",E),p.ENABLE_INFO&&(console.info?console.info(E):console.log(E))},p.w=function(g,m){g&&!p.FORCE_GLOBAL_TAG||(g=p.GLOBAL_TAG);var E="["+g+"] > "+m;p.ENABLE_CALLBACK&&p.emitter.emit("log","warn",E),p.ENABLE_WARN&&(console.warn?console.warn(E):console.log(E))},p.d=function(g,m){g&&!p.FORCE_GLOBAL_TAG||(g=p.GLOBAL_TAG);var E="["+g+"] > "+m;p.ENABLE_CALLBACK&&p.emitter.emit("log","debug",E),p.ENABLE_DEBUG&&(console.debug?console.debug(E):console.log(E))},p.v=function(g,m){g&&!p.FORCE_GLOBAL_TAG||(g=p.GLOBAL_TAG);var E="["+g+"] > "+m;p.ENABLE_CALLBACK&&p.emitter.emit("log","verbose",E),p.ENABLE_VERBOSE&&console.log(E)},p}();f.GLOBAL_TAG="flv.js",f.FORCE_GLOBAL_TAG=!1,f.ENABLE_ERROR=!0,f.ENABLE_INFO=!0,f.ENABLE_WARN=!0,f.ENABLE_DEBUG=!0,f.ENABLE_VERBOSE=!0,f.ENABLE_CALLBACK=!1,f.emitter=new(Z()),K.Z=f},846:function(W,K,T){"use strict";var N=T(716),Z=T.n(N),f=T(300),p=function(){function g(){}return Object.defineProperty(g,"forceGlobalTag",{get:function(){return f.Z.FORCE_GLOBAL_TAG},set:function(m){f.Z.FORCE_GLOBAL_TAG=m,g._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(g,"globalTag",{get:function(){return f.Z.GLOBAL_TAG},set:function(m){f.Z.GLOBAL_TAG=m,g._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(g,"enableAll",{get:function(){return f.Z.ENABLE_VERBOSE&&f.Z.ENABLE_DEBUG&&f.Z.ENABLE_INFO&&f.Z.ENABLE_WARN&&f.Z.ENABLE_ERROR},set:function(m){f.Z.ENABLE_VERBOSE=m,f.Z.ENABLE_DEBUG=m,f.Z.ENABLE_INFO=m,f.Z.ENABLE_WARN=m,f.Z.ENABLE_ERROR=m,g._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(g,"enableDebug",{get:function(){return f.Z.ENABLE_DEBUG},set:function(m){f.Z.ENABLE_DEBUG=m,g._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(g,"enableVerbose",{get:function(){return f.Z.ENABLE_VERBOSE},set:function(m){f.Z.ENABLE_VERBOSE=m,g._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(g,"enableInfo",{get:function(){return f.Z.ENABLE_INFO},set:function(m){f.Z.ENABLE_INFO=m,g._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(g,"enableWarn",{get:function(){return f.Z.ENABLE_WARN},set:function(m){f.Z.ENABLE_WARN=m,g._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(g,"enableError",{get:function(){return f.Z.ENABLE_ERROR},set:function(m){f.Z.ENABLE_ERROR=m,g._notifyChange()},enumerable:!1,configurable:!0}),g.getConfig=function(){return{globalTag:f.Z.GLOBAL_TAG,forceGlobalTag:f.Z.FORCE_GLOBAL_TAG,enableVerbose:f.Z.ENABLE_VERBOSE,enableDebug:f.Z.ENABLE_DEBUG,enableInfo:f.Z.ENABLE_INFO,enableWarn:f.Z.ENABLE_WARN,enableError:f.Z.ENABLE_ERROR,enableCallback:f.Z.ENABLE_CALLBACK}},g.applyConfig=function(m){f.Z.GLOBAL_TAG=m.globalTag,f.Z.FORCE_GLOBAL_TAG=m.forceGlobalTag,f.Z.ENABLE_VERBOSE=m.enableVerbose,f.Z.ENABLE_DEBUG=m.enableDebug,f.Z.ENABLE_INFO=m.enableInfo,f.Z.ENABLE_WARN=m.enableWarn,f.Z.ENABLE_ERROR=m.enableError,f.Z.ENABLE_CALLBACK=m.enableCallback},g._notifyChange=function(){var m=g.emitter;if(m.listenerCount("change")>0){var E=g.getConfig();m.emit("change",E)}},g.registerListener=function(m){g.emitter.addListener("change",m)},g.removeListener=function(m){g.emitter.removeListener("change",m)},g.addLogListener=function(m){f.Z.emitter.addListener("log",m),f.Z.emitter.listenerCount("log")>0&&(f.Z.ENABLE_CALLBACK=!0,g._notifyChange())},g.removeLogListener=function(m){f.Z.emitter.removeListener("log",m),f.Z.emitter.listenerCount("log")===0&&(f.Z.ENABLE_CALLBACK=!1,g._notifyChange())},g}();p.emitter=new(Z()),K.Z=p},219:function(W,K,T){"use strict";var N=function(){function Z(){}return Z.install=function(){Object.setPrototypeOf=Object.setPrototypeOf||function(f,p){return f.__proto__=p,f},Object.assign=Object.assign||function(f){if(f==null)throw new TypeError("Cannot convert undefined or null to object");for(var p=Object(f),g=1;g<arguments.length;g++){var m=arguments[g];if(m!=null)for(var E in m)m.hasOwnProperty(E)&&(p[E]=m[E])}return p},typeof self.Promise!="function"&&T(264).polyfill()},Z}();N.install(),K.Z=N}},pe={};function le(W){var K=pe[W];if(K!==void 0)return K.exports;var T=pe[W]={exports:{}};return me[W].call(T.exports,T,T.exports,le),T.exports}return le.m=me,le.n=function(W){var K=W&&W.__esModule?function(){return W.default}:function(){return W};return le.d(K,{a:K}),K},le.d=function(W,K){for(var T in K)le.o(K,T)&&!le.o(W,T)&&Object.defineProperty(W,T,{enumerable:!0,get:K[T]})},le.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(W){if(typeof window=="object")return window}}(),le.o=function(W,K){return Object.prototype.hasOwnProperty.call(W,K)},le(324)}()});
|