177 lines
165 KiB
Plaintext
177 lines
165 KiB
Plaintext
|
|
(self["webpackChunkinfrastructure_control"]=self["webpackChunkinfrastructure_control"]||[]).push([[319],{7045:function(e,t,i){var r=i(6339),n=i(3070);e.exports=function(e,t,i){return i.get&&r(i.get,t,{getter:!0}),i.set&&r(i.set,t,{setter:!0}),n.f(e,t,i)}},7066:function(e,t,i){"use strict";var r=i(9670);e.exports=function(){var e=r(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},2087:function(e,t,i){var r=i(7854),n=i(9781),s=i(7045),o=i(7066),a=i(7293),u=r.RegExp,l=u.prototype,d=n&&a((function(){var e=!0;try{u(".","d")}catch(d){e=!1}var t={},i="",r=e?"dgimsy":"gimsy",n=function(e,r){Object.defineProperty(t,e,{get:function(){return i+=r,!0}})},s={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var o in e&&(s.hasIndices="d"),s)n(o,s[o]);var a=Object.getOwnPropertyDescriptor(l,"flags").get.call(t);return a!==r||i!==r}));d&&s(l,"flags",{configurable:!0,get:o})},2747:function(e,t,i){i(7658),i(541),i(2087),function(t,i){e.exports=i()}(self,(function(){return function(){var e={"./node_modules/es6-promise/dist/es6-promise.js":
|
||
|
|
/*!******************************************************!*\
|
||
|
|
!*** ./node_modules/es6-promise/dist/es6-promise.js ***!
|
||
|
|
\******************************************************/
|
||
|
|
function(e,t,i){
|
||
|
|
/*!
|
||
|
|
* @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
|
||
|
|
*/
|
||
|
|
(function(t,i){e.exports=i()})(0,(function(){"use strict";function e(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function t(e){return"function"===typeof e}var r=void 0;r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var n=r,s=0,o=void 0,a=void 0,u=function(e,t){b[s]=e,b[s+1]=t,s+=2,2===s&&(a?a(S):A())};function l(e){a=e}function d(e){u=e}var h="undefined"!==typeof window?window:void 0,c=h||{},f=c.MutationObserver||c.WebKitMutationObserver,_="undefined"===typeof self&&"undefined"!==typeof process&&"[object process]"==={}.toString.call(process),p="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel;function m(){return function(){return process.nextTick(S)}}function g(){return"undefined"!==typeof o?function(){o(S)}:E()}function v(){var e=0,t=new f(S),i=document.createTextNode("");return t.observe(i,{characterData:!0}),function(){i.data=e=++e%2}}function y(){var e=new MessageChannel;return e.port1.onmessage=S,function(){return e.port2.postMessage(0)}}function E(){var e=setTimeout;return function(){return e(S,1)}}var b=new Array(1e3);function S(){for(var e=0;e<s;e+=2){var t=b[e],i=b[e+1];t(i),b[e]=void 0,b[e+1]=void 0}s=0}function L(){try{var e=Function("return this")().require("vertx");return o=e.runOnLoop||e.runOnContext,g()}catch(t){return E()}}var A=void 0;function R(e,t){var i=this,r=new this.constructor(T);void 0===r[O]&&X(r);var n=i._state;if(n){var s=arguments[n-1];u((function(){return K(n,r,s,i._result)}))}else V(i,r,e,t);return r}function w(e){var t=this;if(e&&"object"===typeof e&&e.constructor===t)return e;var i=new t(T);return U(i,e),i}A=_?m():f?v():p?y():void 0===h?L():E();var O=Math.random().toString(36).substring(2);function T(){}var C=void 0,k=1,I=2;function D(){return new TypeError("You cannot resolve a promise with itself")}function x(){return new TypeError("A promises callback cannot return that same promise.")}function M(e,t,i,r){try{e.call(t,i,r)}catch(n){return n}}function B(e,t,i){u((function(e){var r=!1,n=M(i,t,(function(i){r||(r=!0,t!==i?U(e,i):F(e,i))}),(function(t){r||(r=!0,G(e,t))}),"Settle: "+(e._label||" unknown promise"));!r&&n&&(r=!0,G(e,n))}),e)}function P(e,t){t._state===k?F(e,t._result):t._state===I?G(e,t._result):V(t,void 0,(function(t){return U(e,t)}),(function(t){return G(e,t)}))}function j(e,i,r){i.constructor===e.constructor&&r===R&&i.constructor.resolve===w?P(e,i):void 0===r?F(e,i):t(r)?B(e,i,r):F(e,i)}function U(t,i){if(t===i)G(t,D());else if(e(i)){var r=void 0;try{r=i.then}catch(n){return void G(t,n)}j(t,i,r)}else F(t,i)}function N(e){e._onerror&&e._onerror(e._result),z(e)}function F(e,t){e._state===C&&(e._result=t,e._state=k,0!==e._subscribers.length&&u(z,e))}function G(e,t){e._state===C&&(e._state=I,e._result=t,u(N,e))}function V(e,t,i,r){var n=e._subscribers,s=n.length;e._onerror=null,n[s]=t,n[s+k]=i,n[s+I]=r,0===s&&e._state&&u(z,e)}function z(e){var t=e._subscribers,i=e._state;if(0!==t.length){for(var r=void 0,n=void 0,s=e._result,o=0;o<t.length;o+=3)r=t[o],n=t[o+i],r?K(i,r,n,s):n(s);e._subscribers.length=0}}function K(e,i,r,n){var s=t(r),o=void 0,a=void 0,u=!0;if(s){try{o=r(n)}catch(l){u=!1,a=l}if(i===o)return void G(i,x())}else o=n;i._state!==C||(s&&u?U(i,o):!1===u?G(i,a):e===k?F(i,o):e===I&&G(i,o))}function H(e,t){try{t((function(t){U(e,t)}),(function(t){G(e,t)}))}catch(i){G(e,i)}}var W=0;function q(){return W++}function X(e){e[O]=W++,e._state=void 0,e._result=void 0,e._subscribers=[]}function Y(){return new Error("Array Methods must be provided an Array")}var Z=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(T),this.promise[O]||X(this.promise),n(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?F(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&F(this.promise,this._result))):G(this.promise,Y())}return e.prototype._enumerate=function(e){for(var t=0;this._state===C&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._each
|
||
|
|
/*!***************************************!*\
|
||
|
|
!*** ./node_modules/events/events.js ***!
|
||
|
|
\***************************************/
|
||
|
|
function(e){"use strict";var t,i="object"===typeof Reflect?Reflect:null,r=i&&"function"===typeof i.apply?i.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};function n(e){console&&console.warn&&console.warn(e)}t=i&&"function"===typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!==e};function o(){o.init.call(this)}e.exports=o,e.exports.once=v,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function u(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function d(e,t,i,r){var s,o,a;if(u(i),o=e._events,void 0===o?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),o=e._events),a=o[t]),void 0===a)a=o[t]=i,++e._eventsCount;else if("function"===typeof a?a=o[t]=r?[i,a]:[a,i]:r?a.unshift(i):a.push(i),s=l(e),s>0&&a.length>s&&!a.warned){a.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=a.length,n(d)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(e,t,i){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},n=h.bind(r);return n.listener=i,r.wrapFn=n,n}function f(e,t,i){var r=e._events;if(void 0===r)return[];var n=r[t];return void 0===n?[]:"function"===typeof n?i?[n.listener||n]:[n]:i?g(n):p(n,n.length)}function _(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"===typeof i)return 1;if(void 0!==i)return i.length}return 0}function p(e,t){for(var i=new Array(t),r=0;r<t;++r)i[r]=e[r];return i}function m(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function g(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}function v(e,t){return new Promise((function(i,r){function n(i){e.removeListener(t,s),r(i)}function s(){"function"===typeof e.removeListener&&e.removeListener("error",n),i([].slice.call(arguments))}E(e,t,s,{once:!0}),"error"!==t&&y(e,n,{once:!0})}))}function y(e,t,i){"function"===typeof e.on&&E(e,"error",t,i)}function E(e,t,i,r){if("function"===typeof e.on)r.once?e.once(t,i):e.on(t,i);else{if("function"!==typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function n(s){r.once&&e.removeEventListener(t,n),i(s)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!==typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!==typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var n="error"===e,s=this._events;if(void 0!==s)n=n&&void 0===s.error;else if(!n)return!1;if(n){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var u=s[e];if(void 0===u)return!1;if("function"===typeof u)r(u,this,t);else{var l=u.length,d=p(u,l);for
|
||
|
|
/*!**************************************************!*\
|
||
|
|
!*** ./node_modules/webworkify-webpack/index.js ***!
|
||
|
|
\**************************************************/
|
||
|
|
function(e,t,i){function r(e){var t={};function i(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=t,i.i=function(e){return e},i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},i.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var r=i(i.s=ENTRY_MODULE);return r.default||r}var n="[\\.|\\-|\\+|\\w|/|@]+",s="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+n+").*?\\)";function o(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function a(e){return!isNaN(1*e)}function u(e,t,r){var u={};u[r]=[];var l=t.toString(),d=l.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!d)return u;var h,c=d[1],f=new RegExp("(\\\\n|\\W)"+o(c)+s,"g");while(h=f.exec(l))"dll-reference"!==h[3]&&u[r].push(h[3]);f=new RegExp("\\("+o(c)+'\\("(dll-reference\\s('+n+'))"\\)\\)'+s,"g");while(h=f.exec(l))e[h[2]]||(u[r].push(h[1]),e[h[2]]=i(h[1]).m),u[h[2]]=u[h[2]]||[],u[h[2]].push(h[4]);for(var _=Object.keys(u),p=0;p<_.length;p++)for(var m=0;m<u[_[p]].length;m++)a(u[_[p]][m])&&(u[_[p]][m]=1*u[_[p]][m]);return u}function l(e){var t=Object.keys(e);return t.reduce((function(t,i){return t||e[i].length>0}),!1)}function d(e,t){var i={main:[t]},r={main:[]},n={main:{}};while(l(i))for(var s=Object.keys(i),o=0;o<s.length;o++){var a=s[o],d=i[a],h=d.pop();if(n[a]=n[a]||{},!n[a][h]&&e[a][h]){n[a][h]=!0,r[a]=r[a]||[],r[a].push(h);for(var c=u(e,e[a][h],a),f=Object.keys(c),_=0;_<f.length;_++)i[f[_]]=i[f[_]]||[],i[f[_]]=i[f[_]].concat(c[f[_]])}}return r}e.exports=function(e,t){t=t||{};var n={main:i.m},s=t.all?{main:Object.keys(n.main)}:d(n,e),o="";Object.keys(s).filter((function(e){return"main"!==e})).forEach((function(e){var t=0;while(s[e][t])t++;s[e].push(t),n[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",o=o+"var "+e+" = ("+r.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+s[e].map((function(t){return JSON.stringify(t)+": "+n[e][t].toString()})).join(",")+"});\n"})),o=o+"new (("+r.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+s.main.map((function(e){return JSON.stringify(e)+": "+n.main[e].toString()})).join(",")+"}))(self);";var a=new window.Blob([o],{type:"text/javascript"});if(t.bare)return a;var u=window.URL||window.webkitURL||window.mozURL||window.msURL,l=u.createObjectURL(a),h=new window.Worker(l);return h.objectURL=l,h}},"./src/config.js":
|
||
|
|
/*!***********************!*\
|
||
|
|
!*** ./src/config.js ***!
|
||
|
|
\***********************/
|
||
|
|
function(e,t,i){"use strict";i.r(t),i.d(t,{defaultConfig:function(){return r},createDefaultConfig:function(){return n}});var r={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 n(){return Object.assign({},r)}},"./src/core/features.js":
|
||
|
|
/*!******************************!*\
|
||
|
|
!*** ./src/core/features.js ***!
|
||
|
|
\******************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=i(/*! ../io/io-controller.js */"./src/io/io-controller.js"),n=i(/*! ../config.js */"./src/config.js"),s=function(){function e(){}return e.supportMSEH264Playback=function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')},e.supportNetworkStreamIO=function(){var e=new r.default({},(0,n.createDefaultConfig)()),t=e.loaderType;return e.destroy(),"fetch-stream-loader"==t||"xhr-moz-chunked-loader"==t},e.getNetworkLoaderTypeName=function(){var e=new r.default({},(0,n.createDefaultConfig)()),t=e.loaderType;return e.destroy(),t},e.supportNativeMediaPlayback=function(t){void 0==e.videoElement&&(e.videoElement=window.document.createElement("video"));var i=e.videoElement.canPlayType(t);return"probably"===i||"maybe"==i},e.getFeatureList=function(){var t={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return t.mseFlvPlayback=e.supportMSEH264Playback(),t.networkStreamIO=e.supportNetworkStreamIO(),t.networkLoaderName=e.getNetworkLoaderTypeName(),t.mseLiveFlvPlayback=t.mseFlvPlayback&&t.networkStreamIO,t.nativeMP4H264Playback=e.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),t.nativeWebmVP8Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),t.nativeWebmVP9Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp9"'),t},e}();t["default"]=s},"./src/core/media-info.js":
|
||
|
|
/*!********************************!*\
|
||
|
|
!*** ./src/core/media-info.js ***!
|
||
|
|
\********************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=function(){function e(){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 e.prototype.isComplete=function(){var e=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!1===this.hasVideo||!0===this.hasVideo&&null!=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;return null!=this.mimeType&&null!=this.duration&&null!=this.metadata&&null!=this.hasKeyframesIndex&&e&&t},e.prototype.isSeekable=function(){return!0===this.hasKeyframesIndex},e.prototype.getNearestKeyframe=function(e){if(null==this.keyframesIndex)return null;var t=this.keyframesIndex,i=this._search(t.times,e);return{index:i,milliseconds:t.times[i],fileposition:t.filepositions[i]}},e.prototype._search=function(e,t){var i=0,r=e.length-1,n=0,s=0,o=r;t<e[0]&&(i=0,s=o+1);while(s<=o){if(n=s+Math.floor((o-s)/2),n===r||t>=e[n]&&t<e[n+1]){i=n;break}e[n]<t?s=n+1:o=n-1}return i},e}();t["default"]=r},"./src/core/media-segment-info.js":
|
||
|
|
/*!****************************************!*\
|
||
|
|
!*** ./src/core/media-segment-info.js ***!
|
||
|
|
\****************************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t),i.d(t,{SampleInfo:function(){return r},MediaSegmentInfo:function(){return n},IDRSampleList:function(){return s},MediaSegmentInfoList:function(){return o}});var r=function(){function e(e,t,i,r,n){this.dts=e,this.pts=t,this.duration=i,this.originalDts=r,this.isSyncPoint=n,this.fileposition=null}return e}(),n=function(){function e(){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 e.prototype.appendSyncPoint=function(e){e.isSyncPoint=!0,this.syncPoints.push(e)},e}(),s=function(){function e(){this._list=[]}return e.prototype.clear=function(){this._list=[]},e.prototype.appendArray=function(e){var t=this._list;0!==e.length&&(t.length>0&&e[0].originalDts<t[t.length-1].originalDts&&this.clear(),Array.prototype.push.apply(t,e))},e.prototype.getLastSyncPointBeforeDts=function(e){if(0==this._list.length)return null;var t=this._list,i=0,r=t.length-1,n=0,s=0,o=r;e<t[0].dts&&(i=0,s=o+1);while(s<=o){if(n=s+Math.floor((o-s)/2),n===r||e>=t[n].dts&&e<t[n+1].dts){i=n;break}t[n].dts<e?s=n+1:o=n-1}return this._list[i]},e}(),o=function(){function e(e){this._type=e,this._list=[],this._lastAppendLocation=-1}return Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._list.length},enumerable:!1,configurable:!0}),e.prototype.isEmpty=function(){return 0===this._list.length},e.prototype.clear=function(){this._list=[],this._lastAppendLocation=-1},e.prototype._searchNearestSegmentBefore=function(e){var t=this._list;if(0===t.length)return-2;var i=t.length-1,r=0,n=0,s=i,o=0;if(e<t[0].originalBeginDts)return o=-1,o;while(n<=s){if(r=n+Math.floor((s-n)/2),r===i||e>t[r].lastSample.originalDts&&e<t[r+1].originalBeginDts){o=r;break}t[r].originalBeginDts<e?n=r+1:s=r-1}return o},e.prototype._searchNearestSegmentAfter=function(e){return this._searchNearestSegmentBefore(e)+1},e.prototype.append=function(e){var t=this._list,i=e,r=this._lastAppendLocation,n=0;-1!==r&&r<t.length&&i.originalBeginDts>=t[r].lastSample.originalDts&&(r===t.length-1||r<t.length-1&&i.originalBeginDts<t[r+1].originalBeginDts)?n=r+1:t.length>0&&(n=this._searchNearestSegmentBefore(i.originalBeginDts)+1),this._lastAppendLocation=n,this._list.splice(n,0,i)},e.prototype.getLastSegmentBefore=function(e){var t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null},e.prototype.getLastSampleBefore=function(e){var t=this.getLastSegmentBefore(e);return null!=t?t.lastSample:null},e.prototype.getLastSyncPointBefore=function(e){var t=this._searchNearestSegmentBefore(e),i=this._list[t].syncPoints;while(0===i.length&&t>0)t--,i=this._list[t].syncPoints;return i.length>0?i[i.length-1]:null},e}()},"./src/core/mse-controller.js":
|
||
|
|
/*!************************************!*\
|
||
|
|
!*** ./src/core/mse-controller.js ***!
|
||
|
|
\************************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=i(/*! events */"./node_modules/events/events.js"),n=i.n(r),s=i(/*! ../utils/logger.js */"./src/utils/logger.js"),o=i(/*! ../utils/browser.js */"./src/utils/browser.js"),a=i(/*! ./mse-events.js */"./src/core/mse-events.js"),u=i(/*! ./media-segment-info.js */"./src/core/media-segment-info.js"),l=i(/*! ../utils/exception.js */"./src/utils/exception.js"),d=function(){function e(e){this.TAG="MSEController",this._config=e,this._emitter=new(n()),this._config.isLive&&void 0==this._config.autoCleanupSourceBuffer&&(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.IDRSampleList}return e.prototype.destroy=function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null},e.prototype.on=function(e,t){this._emitter.addListener(e,t)},e.prototype.off=function(e,t){this._emitter.removeListener(e,t)},e.prototype.attachMediaElement=function(e){if(this._mediaSource)throw new l.IllegalStateException("MediaSource has been attached to an HTMLMediaElement!");var t=this._mediaSource=new window.MediaSource;t.addEventListener("sourceopen",this.e.onSourceOpen),t.addEventListener("sourceended",this.e.onSourceEnded),t.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=e,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),e.src=this._mediaSourceObjectURL},e.prototype.detachMediaElement=function(){if(this._mediaSource){var e=this._mediaSource;for(var t in this._sourceBuffers){var i=this._pendingSegments[t];i.splice(0,i.length),this._pendingSegments[t]=null,this._pendingRemoveRanges[t]=null,this._lastInitSegments[t]=null;var r=this._sourceBuffers[t];if(r){if("closed"!==e.readyState){try{e.removeSourceBuffer(r)}catch(n){s.default.e(this.TAG,n.message)}r.removeEventListener("error",this.e.onSourceBufferError),r.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[t]=null,this._sourceBuffers[t]=null}}if("open"===e.readyState)try{e.endOfStream()}catch(n){s.default.e(this.TAG,n.message)}e.removeEventListener("sourceopen",this.e.onSourceOpen),e.removeEventListener("sourceended",this.e.onSourceEnded),e.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)},e.prototype.appendInitSegment=function(e,t){if(!this._mediaSource||"open"!==this._mediaSource.readyState)return this._pendingSourceBufferInit.push(e),void this._pendingSegments[e.type].push(e);var i=e,r=""+i.container;i.codec&&i.codec.length>0&&(r+=";codecs="+i.codec);var n=!1;if(s.default.v(this.TAG,"Received Initialization Segment, mimeType: "+r),this._lastInitSegments[i.type]=i,r!==this._mimeTypes[i.type]){if(this._mimeTypes[i.type])s.default.v(this.TAG,"Notice: "+i.type+" mimeType changed, origin: "+this._mimeTypes[i.type]+", target: "+r);else{n=!0;try{var u=this._sourceBuffers[i.type]=this._mediaSource.addSourceBuffer(r);u.addEventListener("error",this.e.onSourceBufferError),u.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(l){return s.default.e(this.TAG,l.message),void t
|
||
|
|
/*!********************************!*\
|
||
|
|
!*** ./src/core/mse-events.js ***!
|
||
|
|
\********************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};t["default"]=r},"./src/core/transmuxer.js":
|
||
|
|
/*!********************************!*\
|
||
|
|
!*** ./src/core/transmuxer.js ***!
|
||
|
|
\********************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=i(/*! events */"./node_modules/events/events.js"),n=i.n(r),s=i(/*! webworkify-webpack */"./node_modules/webworkify-webpack/index.js"),o=i.n(s),a=i(/*! ../utils/logger.js */"./src/utils/logger.js"),u=i(/*! ../utils/logging-control.js */"./src/utils/logging-control.js"),l=i(/*! ./transmuxing-controller.js */"./src/core/transmuxing-controller.js"),d=i(/*! ./transmuxing-events.js */"./src/core/transmuxing-events.js"),h=i(/*! ./media-info.js */"./src/core/media-info.js"),c=function(){function e(e,t){if(this.TAG="Transmuxer",this._emitter=new(n()),t.enableWorker&&"undefined"!==typeof Worker)try{this._worker=o()(/*! ./transmuxing-worker */"./src/core/transmuxing-worker.js"),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[e,t]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},u.default.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:u.default.getConfig()})}catch(r){a.default.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new l.default(e,t)}else this._controller=new l.default(e,t);if(this._controller){var i=this._controller;i.on(d.default.IO_ERROR,this._onIOError.bind(this)),i.on(d.default.DEMUX_ERROR,this._onDemuxError.bind(this)),i.on(d.default.INIT_SEGMENT,this._onInitSegment.bind(this)),i.on(d.default.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),i.on(d.default.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),i.on(d.default.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),i.on(d.default.MEDIA_INFO,this._onMediaInfo.bind(this)),i.on(d.default.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),i.on(d.default.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),i.on(d.default.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),i.on(d.default.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return e.prototype.destroy=function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),u.default.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null},e.prototype.on=function(e,t){this._emitter.addListener(e,t)},e.prototype.off=function(e,t){this._emitter.removeListener(e,t)},e.prototype.hasWorker=function(){return null!=this._worker},e.prototype.open=function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()},e.prototype.close=function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()},e.prototype.seek=function(e){this._worker?this._worker.postMessage({cmd:"seek",param:e}):this._controller.seek(e)},e.prototype.pause=function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()},e.prototype.resume=function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()},e.prototype._onInitSegment=function(e,t){var i=this;Promise.resolve().then((function(){i._emitter.emit(d.default.INIT_SEGMENT,e,t)}))},e.prototype._onMediaSegment=function(e,t){var i=this;Promise.resolve().then((function(){i._emitter.emit(d.default.MEDIA_SEGMENT,e,t)}))},e.prototype._onLoadingComplete=function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(d.default.LOADING_COMPLETE)}))},e.prototype._onRecoveredEarlyEof=function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(d.default.RECOVERED_EARLY_EOF)}))},e.prototype._onMediaInfo=function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(d.default.MEDIA_INFO,e)}))},e.prototype._onMetaDataArrived=function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(d.default.METADATA_ARRIVED,e)}))},e.prototype._onScriptDataArrived=function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(d.default.SCRIPTDATA_ARRIVED,e)}))},e.prototype._onStatisticsInfo=function(e){var t=this;
|
||
|
|
/*!********************************************!*\
|
||
|
|
!*** ./src/core/transmuxing-controller.js ***!
|
||
|
|
\********************************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=i(/*! events */"./node_modules/events/events.js"),n=i.n(r),s=i(/*! ../utils/logger.js */"./src/utils/logger.js"),o=i(/*! ../utils/browser.js */"./src/utils/browser.js"),a=i(/*! ./media-info.js */"./src/core/media-info.js"),u=i(/*! ../demux/flv-demuxer.js */"./src/demux/flv-demuxer.js"),l=i(/*! ../remux/mp4-remuxer.js */"./src/remux/mp4-remuxer.js"),d=i(/*! ../demux/demux-errors.js */"./src/demux/demux-errors.js"),h=i(/*! ../io/io-controller.js */"./src/io/io-controller.js"),c=i(/*! ./transmuxing-events.js */"./src/core/transmuxing-events.js"),f=function(){function e(e,t){this.TAG="TransmuxingController",this._emitter=new(n()),this._config=t,e.segments||(e.segments=[{duration:e.duration,filesize:e.filesize,url:e.url}]),"boolean"!==typeof e.cors&&(e.cors=!0),"boolean"!==typeof e.withCredentials&&(e.withCredentials=!1),this._mediaDataSource=e,this._currentSegmentIndex=0;var i=0;this._mediaDataSource.segments.forEach((function(r){r.timestampBase=i,i+=r.duration,r.cors=e.cors,r.withCredentials=e.withCredentials,t.referrerPolicy&&(r.referrerPolicy=t.referrerPolicy)})),isNaN(i)||this._mediaDataSource.duration===i||(this._mediaDataSource.duration=i),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return e.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},e.prototype.on=function(e,t){this._emitter.addListener(e,t)},e.prototype.off=function(e,t){this._emitter.removeListener(e,t)},e.prototype.start=function(){this._loadSegment(0),this._enableStatisticsReporter()},e.prototype._loadSegment=function(e,t){this._currentSegmentIndex=e;var i=this._mediaDataSource.segments[e],r=this._ioctl=new h.default(i,this._config,e);r.onError=this._onIOException.bind(this),r.onSeeked=this._onIOSeeked.bind(this),r.onComplete=this._onIOComplete.bind(this),r.onRedirect=this._onIORedirect.bind(this),r.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),t?this._demuxer.bindDataSource(this._ioctl):r.onDataArrival=this._onInitChunkArrival.bind(this),r.open(t)},e.prototype.stop=function(){this._internalAbort(),this._disableStatisticsReporter()},e.prototype._internalAbort=function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)},e.prototype.pause=function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())},e.prototype.resume=function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())},e.prototype.seek=function(e){if(null!=this._mediaInfo&&this._mediaInfo.isSeekable()){var t=this._searchSegmentIndexContains(e);if(t===this._currentSegmentIndex){var i=this._mediaInfo.segments[t];if(void 0==i)this._pendingSeekTime=e;else{var r=i.getNearestKeyframe(e);this._remuxer.seek(r.milliseconds),this._ioctl.seek(r.fileposition),this._pendingResolveSeekPoint=r.milliseconds}}else{var n=this._mediaInfo.segments[t];if(void 0==n)this._pendingSeekTime=e,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(t);else{r=n.getNearestKeyframe(e);this._internalAbort(),this._remuxer.seek(e),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[t].timestampBase,this._loadSegment(t,r.fileposition),this._pendingResolveSeekPoint=r.milliseconds,this._reportSegmentMediaInfo(t)}}this._enableStatisticsReporter()}},e.prototype._searchSegmentIndexContains=function(e){for(var t=this._mediaDataSource.segments,i=t.length-1,r=0;r<t.length;r++)if(e<t[r].timestampBase){i=r-1;break}return i},e.prototype._onInitChunkArrival=function(e,t){var i=this,r=null,n=0;if(t>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.
|
||
|
|
/*!****************************************!*\
|
||
|
|
!*** ./src/core/transmuxing-events.js ***!
|
||
|
|
\****************************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r={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"};t["default"]=r},"./src/core/transmuxing-worker.js":
|
||
|
|
/*!****************************************!*\
|
||
|
|
!*** ./src/core/transmuxing-worker.js ***!
|
||
|
|
\****************************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=i(/*! ../utils/logging-control.js */"./src/utils/logging-control.js"),n=i(/*! ../utils/polyfill.js */"./src/utils/polyfill.js"),s=i(/*! ./transmuxing-controller.js */"./src/core/transmuxing-controller.js"),o=i(/*! ./transmuxing-events.js */"./src/core/transmuxing-events.js"),a=function(e){var t=null,i=v.bind(this);function a(t,i){var r={msg:o.default.INIT_SEGMENT,data:{type:t,data:i}};e.postMessage(r,[i.data])}function u(t,i){var r={msg:o.default.MEDIA_SEGMENT,data:{type:t,data:i}};e.postMessage(r,[i.data])}function l(){var t={msg:o.default.LOADING_COMPLETE};e.postMessage(t)}function d(){var t={msg:o.default.RECOVERED_EARLY_EOF};e.postMessage(t)}function h(t){var i={msg:o.default.MEDIA_INFO,data:t};e.postMessage(i)}function c(t){var i={msg:o.default.METADATA_ARRIVED,data:t};e.postMessage(i)}function f(t){var i={msg:o.default.SCRIPTDATA_ARRIVED,data:t};e.postMessage(i)}function _(t){var i={msg:o.default.STATISTICS_INFO,data:t};e.postMessage(i)}function p(t,i){e.postMessage({msg:o.default.IO_ERROR,data:{type:t,info:i}})}function m(t,i){e.postMessage({msg:o.default.DEMUX_ERROR,data:{type:t,info:i}})}function g(t){e.postMessage({msg:o.default.RECOMMEND_SEEKPOINT,data:t})}function v(t,i){e.postMessage({msg:"logcat_callback",data:{type:t,logcat:i}})}n.default.install(),e.addEventListener("message",(function(n){switch(n.data.cmd){case"init":t=new s.default(n.data.param[0],n.data.param[1]),t.on(o.default.IO_ERROR,p.bind(this)),t.on(o.default.DEMUX_ERROR,m.bind(this)),t.on(o.default.INIT_SEGMENT,a.bind(this)),t.on(o.default.MEDIA_SEGMENT,u.bind(this)),t.on(o.default.LOADING_COMPLETE,l.bind(this)),t.on(o.default.RECOVERED_EARLY_EOF,d.bind(this)),t.on(o.default.MEDIA_INFO,h.bind(this)),t.on(o.default.METADATA_ARRIVED,c.bind(this)),t.on(o.default.SCRIPTDATA_ARRIVED,f.bind(this)),t.on(o.default.STATISTICS_INFO,_.bind(this)),t.on(o.default.RECOMMEND_SEEKPOINT,g.bind(this));break;case"destroy":t&&(t.destroy(),t=null),e.postMessage({msg:"destroyed"});break;case"start":t.start();break;case"stop":t.stop();break;case"seek":t.seek(n.data.param);break;case"pause":t.pause();break;case"resume":t.resume();break;case"logging_config":var v=n.data.param;r.default.applyConfig(v),!0===v.enableCallback?r.default.addLogListener(i):r.default.removeLogListener(i);break}}))};t["default"]=a},"./src/demux/amf-parser.js":
|
||
|
|
/*!*********************************!*\
|
||
|
|
!*** ./src/demux/amf-parser.js ***!
|
||
|
|
\*********************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=i(/*! ../utils/logger.js */"./src/utils/logger.js"),n=i(/*! ../utils/utf8-conv.js */"./src/utils/utf8-conv.js"),s=i(/*! ../utils/exception.js */"./src/utils/exception.js"),o=function(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}(),a=function(){function e(){}return e.parseScriptData=function(t,i,n){var s={};try{var o=e.parseValue(t,i,n),a=e.parseValue(t,i+o.size,n-o.size);s[o.data]=a.data}catch(u){r.default.e("AMF",u.toString())}return s},e.parseObject=function(t,i,r){if(r<3)throw new s.IllegalStateException("Data not enough when parse ScriptDataObject");var n=e.parseString(t,i,r),o=e.parseValue(t,i+n.size,r-n.size),a=o.objectEnd;return{data:{name:n.data,value:o.data},size:n.size+o.size,objectEnd:a}},e.parseVariable=function(t,i,r){return e.parseObject(t,i,r)},e.parseString=function(e,t,i){if(i<2)throw new s.IllegalStateException("Data not enough when parse String");var r,a=new DataView(e,t,i),u=a.getUint16(0,!o);return r=u>0?(0,n.default)(new Uint8Array(e,t+2,u)):"",{data:r,size:2+u}},e.parseLongString=function(e,t,i){if(i<4)throw new s.IllegalStateException("Data not enough when parse LongString");var r,a=new DataView(e,t,i),u=a.getUint32(0,!o);return r=u>0?(0,n.default)(new Uint8Array(e,t+4,u)):"",{data:r,size:4+u}},e.parseDate=function(e,t,i){if(i<10)throw new s.IllegalStateException("Data size invalid when parse Date");var r=new DataView(e,t,i),n=r.getFloat64(0,!o),a=r.getInt16(8,!o);return n+=60*a*1e3,{data:new Date(n),size:10}},e.parseValue=function(t,i,n){if(n<1)throw new s.IllegalStateException("Data not enough when parse Value");var a,u=new DataView(t,i,n),l=1,d=u.getUint8(0),h=!1;try{switch(d){case 0:a=u.getFloat64(1,!o),l+=8;break;case 1:var c=u.getUint8(1);a=!!c,l+=1;break;case 2:var f=e.parseString(t,i+1,n-1);a=f.data,l+=f.size;break;case 3:a={};var _=0;9===(16777215&u.getUint32(n-4,!o))&&(_=3);while(l<n-4){var p=e.parseObject(t,i+l,n-l-_);if(p.objectEnd)break;a[p.data.name]=p.data.value,l+=p.size}if(l<=n-3){var m=16777215&u.getUint32(l-1,!o);9===m&&(l+=3)}break;case 8:a={},l+=4;_=0;9===(16777215&u.getUint32(n-4,!o))&&(_=3);while(l<n-8){var g=e.parseVariable(t,i+l,n-l-_);if(g.objectEnd)break;a[g.data.name]=g.data.value,l+=g.size}if(l<=n-3){m=16777215&u.getUint32(l-1,!o);9===m&&(l+=3)}break;case 9:a=void 0,l=1,h=!0;break;case 10:a=[];var v=u.getUint32(1,!o);l+=4;for(var y=0;y<v;y++){var E=e.parseValue(t,i+l,n-l);a.push(E.data),l+=E.size}break;case 11:var b=e.parseDate(t,i+1,n-1);a=b.data,l+=b.size;break;case 12:var S=e.parseString(t,i+1,n-1);a=S.data,l+=S.size;break;default:l=n,r.default.w("AMF","Unsupported AMF value type "+d)}}catch(L){r.default.e("AMF",L.toString())}return{data:a,size:l,objectEnd:h}},e}();t["default"]=a},"./src/demux/demux-errors.js":
|
||
|
|
/*!***********************************!*\
|
||
|
|
!*** ./src/demux/demux-errors.js ***!
|
||
|
|
\***********************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};t["default"]=r},"./src/demux/exp-golomb.js":
|
||
|
|
/*!*********************************!*\
|
||
|
|
!*** ./src/demux/exp-golomb.js ***!
|
||
|
|
\*********************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=i(/*! ../utils/exception.js */"./src/utils/exception.js"),n=function(){function e(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 e.prototype.destroy=function(){this._buffer=null},e.prototype._fillCurrentWord=function(){var e=this._total_bytes-this._buffer_index;if(e<=0)throw new r.IllegalStateException("ExpGolomb: _fillCurrentWord() but no bytes available");var t=Math.min(4,e),i=new Uint8Array(4);i.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(i.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t},e.prototype.readBits=function(e){if(e>32)throw new r.InvalidArgumentException("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){var t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}var i=this._current_word_bits_left?this._current_word:0;i>>>=32-this._current_word_bits_left;var n=e-this._current_word_bits_left;this._fillCurrentWord();var s=Math.min(n,this._current_word_bits_left),o=this._current_word>>>32-s;return this._current_word<<=s,this._current_word_bits_left-=s,i=i<<s|o,i},e.prototype.readBool=function(){return 1===this.readBits(1)},e.prototype.readByte=function(){return this.readBits(8)},e.prototype._skipLeadingZero=function(){var e;for(e=0;e<this._current_word_bits_left;e++)if(0!==(this._current_word&2147483648>>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()},e.prototype.readUEG=function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1},e.prototype.readSEG=function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)},e}();t["default"]=n},"./src/demux/flv-demuxer.js":
|
||
|
|
/*!**********************************!*\
|
||
|
|
!*** ./src/demux/flv-demuxer.js ***!
|
||
|
|
\**********************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=i(/*! ../utils/logger.js */"./src/utils/logger.js"),n=i(/*! ./amf-parser.js */"./src/demux/amf-parser.js"),s=i(/*! ./sps-parser.js */"./src/demux/sps-parser.js"),o=i(/*! ./demux-errors.js */"./src/demux/demux-errors.js"),a=i(/*! ../core/media-info.js */"./src/core/media-info.js"),u=i(/*! ../utils/exception.js */"./src/utils/exception.js");function l(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}var d=function(){function e(e,t){this.TAG="FLVDemuxer",this._config=t,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 a.default,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 e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}()}return e.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},e.probe=function(e){var t=new Uint8Array(e),i={match:!1};if(70!==t[0]||76!==t[1]||86!==t[2]||1!==t[3])return i;var r=(4&t[4])>>>2!==0,n=0!==(1&t[4]),s=l(t,5);return s<9?i:{match:!0,consumed:s,dataOffset:s,hasAudioTrack:r,hasVideoTrack:n}},e.prototype.bindDataSource=function(e){return e.onDataArrival=this.parseChunks.bind(this),this},Object.defineProperty(e.prototype,"onTrackMetadata",{get:function(){return this._onTrackMetadata},set:function(e){this._onTrackMetadata=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onMediaInfo",{get:function(){return this._onMediaInfo},set:function(e){this._onMediaInfo=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onMetaDataArrived",{get:function(){return this._onMetaDataArrived},set:function(e){this._onMetaDataArrived=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onScriptDataArrived",{get:function(){return this._onScriptDataArrived},set:function(e){this._onScriptDataArrived=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDataAvailable",{get:function(){return this._onDataAvailable},set:function(e){this._onDataAvailable=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"timestampBase",{get:function(){return this._timestampBase},set:function(e){this._timestampBase=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overridedDuration",{get:function(){return this._duration},set:function(e
|
||
|
|
/*!*********************************!*\
|
||
|
|
!*** ./src/demux/sps-parser.js ***!
|
||
|
|
\*********************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=i(/*! ./exp-golomb.js */"./src/demux/exp-golomb.js"),n=function(){function e(){}return e._ebsp2rbsp=function(e){for(var t=e,i=t.byteLength,r=new Uint8Array(i),n=0,s=0;s<i;s++)s>=2&&3===t[s]&&0===t[s-1]&&0===t[s-2]||(r[n]=t[s],n++);return new Uint8Array(r.buffer,0,n)},e.parseSPS=function(t){var i=e._ebsp2rbsp(t),n=new r.default(i);n.readByte();var s=n.readByte();n.readByte();var o=n.readByte();n.readUEG();var a=e.getProfileString(s),u=e.getLevelString(o),l=1,d=420,h=[0,420,422,444],c=8;if((100===s||110===s||122===s||244===s||44===s||83===s||86===s||118===s||128===s||138===s||144===s)&&(l=n.readUEG(),3===l&&n.readBits(1),l<=3&&(d=h[l]),c=n.readUEG()+8,n.readUEG(),n.readBits(1),n.readBool()))for(var f=3!==l?8:12,_=0;_<f;_++)n.readBool()&&(_<6?e._skipScalingList(n,16):e._skipScalingList(n,64));n.readUEG();var p=n.readUEG();if(0===p)n.readUEG();else if(1===p){n.readBits(1),n.readSEG(),n.readSEG();var m=n.readUEG();for(_=0;_<m;_++)n.readSEG()}var g=n.readUEG();n.readBits(1);var v=n.readUEG(),y=n.readUEG(),E=n.readBits(1);0===E&&n.readBits(1),n.readBits(1);var b=0,S=0,L=0,A=0,R=n.readBool();R&&(b=n.readUEG(),S=n.readUEG(),L=n.readUEG(),A=n.readUEG());var w=1,O=1,T=0,C=!0,k=0,I=0,D=n.readBool();if(D){if(n.readBool()){var x=n.readByte(),M=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],B=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];x>0&&x<16?(w=M[x-1],O=B[x-1]):255===x&&(w=n.readByte()<<8|n.readByte(),O=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 P=n.readBits(32),j=n.readBits(32);C=n.readBool(),k=j,I=2*P,T=k/I}}var U=1;1===w&&1===O||(U=w/O);var N=0,F=0;if(0===l)N=1,F=2-E;else{var G=3===l?1:2,V=1===l?2:1;N=G,F=V*(2-E)}var z=16*(v+1),K=16*(y+1)*(2-E);z-=(b+S)*N,K-=(L+A)*F;var H=Math.ceil(z*U);return n.destroy(),n=null,{profile_string:a,level_string:u,bit_depth:c,ref_frames:g,chroma_format:d,chroma_format_string:e.getChromaFormatString(d),frame_rate:{fixed:C,fps:T,fps_den:I,fps_num:k},sar_ratio:{width:w,height:O},codec_size:{width:z,height:K},present_size:{width:H,height:K}}},e._skipScalingList=function(e,t){for(var i=8,r=8,n=0,s=0;s<t;s++)0!==r&&(n=e.readSEG(),r=(i+n+256)%256),i=0===r?i:r},e.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"}},e.getLevelString=function(e){return(e/10).toFixed(1)},e.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"}},e}();t["default"]=n},"./src/flv.js":
|
||
|
|
/*!********************!*\
|
||
|
|
!*** ./src/flv.js ***!
|
||
|
|
\********************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=i(/*! ./utils/polyfill.js */"./src/utils/polyfill.js"),n=i(/*! ./core/features.js */"./src/core/features.js"),s=i(/*! ./io/loader.js */"./src/io/loader.js"),o=i(/*! ./player/flv-player.js */"./src/player/flv-player.js"),a=i(/*! ./player/native-player.js */"./src/player/native-player.js"),u=i(/*! ./player/player-events.js */"./src/player/player-events.js"),l=i(/*! ./player/player-errors.js */"./src/player/player-errors.js"),d=i(/*! ./utils/logging-control.js */"./src/utils/logging-control.js"),h=i(/*! ./utils/exception.js */"./src/utils/exception.js");function c(e,t){var i=e;if(null==i||"object"!==typeof i)throw new h.InvalidArgumentException("MediaDataSource must be an javascript object!");if(!i.hasOwnProperty("type"))throw new h.InvalidArgumentException("MediaDataSource must has type field to indicate video file type!");switch(i.type){case"flv":return new o.default(i,t);default:return new a.default(i,t)}}function f(){return n.default.supportMSEH264Playback()}function _(){return n.default.getFeatureList()}r.default.install();var p={};p.createPlayer=c,p.isSupported=f,p.getFeatureList=_,p.BaseLoader=s.BaseLoader,p.LoaderStatus=s.LoaderStatus,p.LoaderErrors=s.LoaderErrors,p.Events=u.default,p.ErrorTypes=l.ErrorTypes,p.ErrorDetails=l.ErrorDetails,p.FlvPlayer=o.default,p.NativePlayer=a.default,p.LoggingControl=d.default,Object.defineProperty(p,"version",{enumerable:!0,get:function(){return"1.6.2"}}),t["default"]=p},"./src/index.js":
|
||
|
|
/*!**********************!*\
|
||
|
|
!*** ./src/index.js ***!
|
||
|
|
\**********************/
|
||
|
|
function(e,t,i){e.exports=i(/*! ./flv.js */"./src/flv.js").default},"./src/io/fetch-stream-loader.js":
|
||
|
|
/*!***************************************!*\
|
||
|
|
!*** ./src/io/fetch-stream-loader.js ***!
|
||
|
|
\***************************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=i(/*! ../utils/browser.js */"./src/utils/browser.js"),n=i(/*! ./loader.js */"./src/io/loader.js"),s=i(/*! ../utils/exception.js */"./src/utils/exception.js"),o=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),a=function(e){function t(t,i){var r=e.call(this,"fetch-stream-loader")||this;return r.TAG="FetchStreamLoader",r._seekHandler=t,r._config=i,r._needStash=!0,r._requestAbort=!1,r._contentLength=null,r._receivedLength=0,r}return o(t,e),t.isSupported=function(){try{var e=r.default.msedge&&r.default.version.minor>=15048,t=!r.default.msedge||e;return self.fetch&&self.ReadableStream&&t}catch(i){return!1}},t.prototype.destroy=function(){this.isWorking()&&this.abort(),e.prototype.destroy.call(this)},t.prototype.open=function(e,t){var i=this;this._dataSource=e,this._range=t;var r=e.url;this._config.reuseRedirectedURL&&void 0!=e.redirectedURL&&(r=e.redirectedURL);var o=this._seekHandler.getConfig(r,t),a=new self.Headers;if("object"===typeof o.headers){var u=o.headers;for(var l in u)u.hasOwnProperty(l)&&a.append(l,u[l])}var d={method:"GET",headers:a,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"===typeof this._config.headers)for(var l in this._config.headers)a.append(l,this._config.headers[l]);!1===e.cors&&(d.mode="same-origin"),e.withCredentials&&(d.credentials="include"),e.referrerPolicy&&(d.referrerPolicy=e.referrerPolicy),self.AbortController&&(this._abortController=new self.AbortController,d.signal=this._abortController.signal),this._status=n.LoaderStatus.kConnecting,self.fetch(o.url,d).then((function(e){if(i._requestAbort)return i._status=n.LoaderStatus.kIdle,void e.body.cancel();if(e.ok&&e.status>=200&&e.status<=299){if(e.url!==o.url&&i._onURLRedirect){var t=i._seekHandler.removeURLParameters(e.url);i._onURLRedirect(t)}var r=e.headers.get("Content-Length");return null!=r&&(i._contentLength=parseInt(r),0!==i._contentLength&&i._onContentLengthKnown&&i._onContentLengthKnown(i._contentLength)),i._pump.call(i,e.body.getReader())}if(i._status=n.LoaderStatus.kError,!i._onError)throw new s.RuntimeException("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);i._onError(n.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})})).catch((function(e){if(!i._abortController||!i._abortController.signal.aborted){if(i._status=n.LoaderStatus.kError,!i._onError)throw e;i._onError(n.LoaderErrors.EXCEPTION,{code:-1,msg:e.message})}}))},t.prototype.abort=function(){if(this._requestAbort=!0,(this._status!==n.LoaderStatus.kBuffering||!r.default.chrome)&&this._abortController)try{this._abortController.abort()}catch(e){}},t.prototype._pump=function(e){var t=this;return e.read().then((function(i){if(i.done)if(null!==t._contentLength&&t._receivedLength<t._contentLength){t._status=n.LoaderStatus.kError;var r=n.LoaderErrors.EARLY_EOF,o={code:-1,msg:"Fetch stream meet Early-EOF"};if(!t._onError)throw new s.RuntimeException(o.msg);t._onError(r,o)}else t._status=n.LoaderStatus.kComplete,t._onComplete&&t._onComplete(t._range.from,t._range.from+t._receivedLength-1);else{if(t._abortController&&t._abortController.signal.aborted)return void(t._status=n.LoaderStatus.kComplete);if(!0===t._requestAbort)return t._status=n.LoaderStatus.kComplete,e.cancel();t._status=n.LoaderStatus.kBuffering;var a=i.value.buffer,u=t._range.from+t._receivedLength;t._receivedLength+=a.byteLength,t._onDataArrival&&t._onDataArrival(a,u,t._receivedLength),t._pump(e)}})).catch((function(e){if(t._abortController&&t._abortController.signal.aborted)t._status=n.LoaderStatus.kComplete;else if(11!==e.code||!r.default.msedge){t._status=n.LoaderStatus.kError;var i=0,
|
||
|
|
/*!*********************************!*\
|
||
|
|
!*** ./src/io/io-controller.js ***!
|
||
|
|
\*********************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=i(/*! ../utils/logger.js */"./src/utils/logger.js"),n=i(/*! ./speed-sampler.js */"./src/io/speed-sampler.js"),s=i(/*! ./loader.js */"./src/io/loader.js"),o=i(/*! ./fetch-stream-loader.js */"./src/io/fetch-stream-loader.js"),a=i(/*! ./xhr-moz-chunked-loader.js */"./src/io/xhr-moz-chunked-loader.js"),u=i(/*! ./xhr-range-loader.js */"./src/io/xhr-range-loader.js"),l=i(/*! ./websocket-loader.js */"./src/io/websocket-loader.js"),d=i(/*! ./range-seek-handler.js */"./src/io/range-seek-handler.js"),h=i(/*! ./param-seek-handler.js */"./src/io/param-seek-handler.js"),c=i(/*! ../utils/exception.js */"./src/utils/exception.js"),f=function(){function e(e,t,i){this.TAG="IOController",this._config=t,this._extraData=i,this._stashInitialSize=393216,void 0!=t.stashInitialSize&&t.stashInitialSize>0&&(this._stashInitialSize=t.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,!1===t.enableStashBuffer&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=e,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(e.url),this._refTotalLength=e.filesize?e.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new n.default,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 e.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},e.prototype.isWorking=function(){return this._loader&&this._loader.isWorking()&&!this._paused},e.prototype.isPaused=function(){return this._paused},Object.defineProperty(e.prototype,"status",{get:function(){return this._loader.status},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extraData",{get:function(){return this._extraData},set:function(e){this._extraData=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onSeeked",{get:function(){return this._onSeeked},set:function(e){this._onSeeked=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onComplete",{get:function(){return this._onComplete},set:function(e){this._onComplete=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRedirect",{get:function(){return this._onRedirect},set:function(e){this._onRedirect=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRecoveredEarlyEof",{get:function(){return this._onRecoveredEarlyEof},set:function(e){this._onRecoveredEarlyEof=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentURL",{get:function(){return this._dataSource.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasRedirect",{get:function(){return null!=this._redirectedURL||void 0!=this._dataSource.redirectedURL},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentRedirectedURL",{get:function(){return this._redirectedURL||this._dataS
|
||
|
|
/*!**************************!*\
|
||
|
|
!*** ./src/io/loader.js ***!
|
||
|
|
\**************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t),i.d(t,{LoaderStatus:function(){return n},LoaderErrors:function(){return s},BaseLoader:function(){return o}});var r=i(/*! ../utils/exception.js */"./src/utils/exception.js"),n={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},s={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},o=function(){function e(e){this._type=e||"undefined",this._status=n.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return e.prototype.destroy=function(){this._status=n.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null},e.prototype.isWorking=function(){return this._status===n.kConnecting||this._status===n.kBuffering},Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"needStashBuffer",{get:function(){return this._needStash},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onContentLengthKnown",{get:function(){return this._onContentLengthKnown},set:function(e){this._onContentLengthKnown=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onURLRedirect",{get:function(){return this._onURLRedirect},set:function(e){this._onURLRedirect=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onComplete",{get:function(){return this._onComplete},set:function(e){this._onComplete=e},enumerable:!1,configurable:!0}),e.prototype.open=function(e,t){throw new r.NotImplementedException("Unimplemented abstract function!")},e.prototype.abort=function(){throw new r.NotImplementedException("Unimplemented abstract function!")},e}()},"./src/io/param-seek-handler.js":
|
||
|
|
/*!**************************************!*\
|
||
|
|
!*** ./src/io/param-seek-handler.js ***!
|
||
|
|
\**************************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=function(){function e(e,t){this._startName=e,this._endName=t}return e.prototype.getConfig=function(e,t){var i=e;if(0!==t.from||-1!==t.to){var r=!0;-1===i.indexOf("?")&&(i+="?",r=!1),r&&(i+="&"),i+=this._startName+"="+t.from.toString(),-1!==t.to&&(i+="&"+this._endName+"="+t.to.toString())}return{url:i,headers:{}}},e.prototype.removeURLParameters=function(e){var t=e.split("?")[0],i=void 0,r=e.indexOf("?");-1!==r&&(i=e.substring(r+1));var n="";if(void 0!=i&&i.length>0)for(var s=i.split("&"),o=0;o<s.length;o++){var a=s[o].split("="),u=o>0;a[0]!==this._startName&&a[0]!==this._endName&&(u&&(n+="&"),n+=s[o])}return 0===n.length?t:t+"?"+n},e}();t["default"]=r},"./src/io/range-seek-handler.js":
|
||
|
|
/*!**************************************!*\
|
||
|
|
!*** ./src/io/range-seek-handler.js ***!
|
||
|
|
\**************************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=function(){function e(e){this._zeroStart=e||!1}return e.prototype.getConfig=function(e,t){var i={};if(0!==t.from||-1!==t.to){var r=void 0;r=-1!==t.to?"bytes="+t.from.toString()+"-"+t.to.toString():"bytes="+t.from.toString()+"-",i["Range"]=r}else this._zeroStart&&(i["Range"]="bytes=0-");return{url:e,headers:i}},e.prototype.removeURLParameters=function(e){return e},e}();t["default"]=r},"./src/io/speed-sampler.js":
|
||
|
|
/*!*********************************!*\
|
||
|
|
!*** ./src/io/speed-sampler.js ***!
|
||
|
|
\*********************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=function(){function e(){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 e.prototype.reset=function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0},e.prototype.addBytes=function(e){0===this._firstCheckpoint?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=e,this._totalBytes+=e):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=e,this._totalBytes+=e):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=e,this._totalBytes+=e,this._lastCheckpoint=this._now())},Object.defineProperty(e.prototype,"currentKBps",{get:function(){this.addBytes(0);var e=(this._now()-this._lastCheckpoint)/1e3;return 0==e&&(e=1),this._intervalBytes/e/1024},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastSecondKBps",{get:function(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"averageKBps",{get:function(){var e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024},enumerable:!1,configurable:!0}),e}();t["default"]=r},"./src/io/websocket-loader.js":
|
||
|
|
/*!************************************!*\
|
||
|
|
!*** ./src/io/websocket-loader.js ***!
|
||
|
|
\************************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=i(/*! ./loader.js */"./src/io/loader.js"),n=i(/*! ../utils/exception.js */"./src/utils/exception.js"),s=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),o=function(e){function t(){var t=e.call(this,"websocket-loader")||this;return t.TAG="WebSocketLoader",t._needStash=!0,t._ws=null,t._requestAbort=!1,t._receivedLength=0,t}return s(t,e),t.isSupported=function(){try{return"undefined"!==typeof self.WebSocket}catch(e){return!1}},t.prototype.destroy=function(){this._ws&&this.abort(),e.prototype.destroy.call(this)},t.prototype.open=function(e){try{var t=this._ws=new self.WebSocket(e.url);t.binaryType="arraybuffer",t.onopen=this._onWebSocketOpen.bind(this),t.onclose=this._onWebSocketClose.bind(this),t.onmessage=this._onWebSocketMessage.bind(this),t.onerror=this._onWebSocketError.bind(this),this._status=r.LoaderStatus.kConnecting}catch(s){this._status=r.LoaderStatus.kError;var i={code:s.code,msg:s.message};if(!this._onError)throw new n.RuntimeException(i.msg);this._onError(r.LoaderErrors.EXCEPTION,i)}},t.prototype.abort=function(){var e=this._ws;!e||0!==e.readyState&&1!==e.readyState||(this._requestAbort=!0,e.close()),this._ws=null,this._status=r.LoaderStatus.kComplete},t.prototype._onWebSocketOpen=function(e){this._status=r.LoaderStatus.kBuffering},t.prototype._onWebSocketClose=function(e){!0!==this._requestAbort?(this._status=r.LoaderStatus.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)):this._requestAbort=!1},t.prototype._onWebSocketMessage=function(e){var t=this;if(e.data instanceof ArrayBuffer)this._dispatchArrayBuffer(e.data);else if(e.data instanceof Blob){var i=new FileReader;i.onload=function(){t._dispatchArrayBuffer(i.result)},i.readAsArrayBuffer(e.data)}else{this._status=r.LoaderStatus.kError;var s={code:-1,msg:"Unsupported WebSocket message type: "+e.data.constructor.name};if(!this._onError)throw new n.RuntimeException(s.msg);this._onError(r.LoaderErrors.EXCEPTION,s)}},t.prototype._dispatchArrayBuffer=function(e){var t=e,i=this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,i,this._receivedLength)},t.prototype._onWebSocketError=function(e){this._status=r.LoaderStatus.kError;var t={code:e.code,msg:e.message};if(!this._onError)throw new n.RuntimeException(t.msg);this._onError(r.LoaderErrors.EXCEPTION,t)},t}(r.BaseLoader);t["default"]=o},"./src/io/xhr-moz-chunked-loader.js":
|
||
|
|
/*!******************************************!*\
|
||
|
|
!*** ./src/io/xhr-moz-chunked-loader.js ***!
|
||
|
|
\******************************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=i(/*! ../utils/logger.js */"./src/utils/logger.js"),n=i(/*! ./loader.js */"./src/io/loader.js"),s=i(/*! ../utils/exception.js */"./src/utils/exception.js"),o=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),a=function(e){function t(t,i){var r=e.call(this,"xhr-moz-chunked-loader")||this;return r.TAG="MozChunkedLoader",r._seekHandler=t,r._config=i,r._needStash=!0,r._xhr=null,r._requestAbort=!1,r._contentLength=null,r._receivedLength=0,r}return o(t,e),t.isSupported=function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===e.responseType}catch(t){return r.default.w("MozChunkedLoader",t.message),!1}},t.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),e.prototype.destroy.call(this)},t.prototype.open=function(e,t){this._dataSource=e,this._range=t;var i=e.url;this._config.reuseRedirectedURL&&void 0!=e.redirectedURL&&(i=e.redirectedURL);var r=this._seekHandler.getConfig(i,t);this._requestURL=r.url;var s=this._xhr=new XMLHttpRequest;if(s.open("GET",r.url,!0),s.responseType="moz-chunked-arraybuffer",s.onreadystatechange=this._onReadyStateChange.bind(this),s.onprogress=this._onProgress.bind(this),s.onloadend=this._onLoadEnd.bind(this),s.onerror=this._onXhrError.bind(this),e.withCredentials&&(s.withCredentials=!0),"object"===typeof r.headers){var o=r.headers;for(var a in o)o.hasOwnProperty(a)&&s.setRequestHeader(a,o[a])}if("object"===typeof this._config.headers){o=this._config.headers;for(var a in o)o.hasOwnProperty(a)&&s.setRequestHeader(a,o[a])}this._status=n.LoaderStatus.kConnecting,s.send()},t.prototype.abort=function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=n.LoaderStatus.kComplete},t.prototype._onReadyStateChange=function(e){var t=e.target;if(2===t.readyState){if(void 0!=t.responseURL&&t.responseURL!==this._requestURL&&this._onURLRedirect){var i=this._seekHandler.removeURLParameters(t.responseURL);this._onURLRedirect(i)}if(0!==t.status&&(t.status<200||t.status>299)){if(this._status=n.LoaderStatus.kError,!this._onError)throw new s.RuntimeException("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(n.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=n.LoaderStatus.kBuffering}},t.prototype._onProgress=function(e){if(this._status!==n.LoaderStatus.kError){null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var t=e.target.response,i=this._range.from+this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,i,this._receivedLength)}},t.prototype._onLoadEnd=function(e){!0!==this._requestAbort?this._status!==n.LoaderStatus.kError&&(this._status=n.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1},t.prototype._onXhrError=function(e){this._status=n.LoaderStatus.kError;var t=0,i=null;if(this._contentLength&&e.loaded<this._contentLength?(t=n.LoaderErrors.EARLY_EOF,i={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(t=n.LoaderErrors.EXCEPTION,i={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new s.RuntimeException(i.msg);this._onError(t,i)},t}(n.BaseLoader);t["default"]=a},"./src/io/xhr-range-loader.js":
|
||
|
|
/*!************************************!*\
|
||
|
|
!*** ./src/io/xhr-range-loader.js ***!
|
||
|
|
\************************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=i(/*! ../utils/logger.js */"./src/utils/logger.js"),n=i(/*! ./speed-sampler.js */"./src/io/speed-sampler.js"),s=i(/*! ./loader.js */"./src/io/loader.js"),o=i(/*! ../utils/exception.js */"./src/utils/exception.js"),a=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),u=function(e){function t(t,i){var r=e.call(this,"xhr-range-loader")||this;return r.TAG="RangeLoader",r._seekHandler=t,r._config=i,r._needStash=!1,r._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],r._currentChunkSizeKB=384,r._currentSpeedNormalized=0,r._zeroSpeedChunkCount=0,r._xhr=null,r._speedSampler=new n.default,r._requestAbort=!1,r._waitForTotalLength=!1,r._totalLengthReceived=!1,r._currentRequestURL=null,r._currentRedirectedURL=null,r._currentRequestRange=null,r._totalLength=null,r._contentLength=null,r._receivedLength=0,r._lastTimeLoaded=0,r}return a(t,e),t.isSupported=function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="arraybuffer","arraybuffer"===e.responseType}catch(t){return r.default.w("RangeLoader",t.message),!1}},t.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),e.prototype.destroy.call(this)},Object.defineProperty(t.prototype,"currentSpeed",{get:function(){return this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),t.prototype.open=function(e,t){this._dataSource=e,this._range=t,this._status=s.LoaderStatus.kConnecting;var i=!1;void 0!=this._dataSource.filesize&&0!==this._dataSource.filesize&&(i=!0,this._totalLength=this._dataSource.filesize),this._totalLengthReceived||i?this._openSubRange():(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1}))},t.prototype._openSubRange=function(){var e=1024*this._currentChunkSizeKB,t=this._range.from+this._receivedLength,i=t+e;null!=this._contentLength&&i-this._range.from>=this._contentLength&&(i=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:i},this._internalOpen(this._dataSource,this._currentRequestRange)},t.prototype._internalOpen=function(e,t){this._lastTimeLoaded=0;var i=e.url;this._config.reuseRedirectedURL&&(void 0!=this._currentRedirectedURL?i=this._currentRedirectedURL:void 0!=e.redirectedURL&&(i=e.redirectedURL));var r=this._seekHandler.getConfig(i,t);this._currentRequestURL=r.url;var n=this._xhr=new XMLHttpRequest;if(n.open("GET",r.url,!0),n.responseType="arraybuffer",n.onreadystatechange=this._onReadyStateChange.bind(this),n.onprogress=this._onProgress.bind(this),n.onload=this._onLoad.bind(this),n.onerror=this._onXhrError.bind(this),e.withCredentials&&(n.withCredentials=!0),"object"===typeof r.headers){var s=r.headers;for(var o in s)s.hasOwnProperty(o)&&n.setRequestHeader(o,s[o])}if("object"===typeof this._config.headers){s=this._config.headers;for(var o in s)s.hasOwnProperty(o)&&n.setRequestHeader(o,s[o])}n.send()},t.prototype.abort=function(){this._requestAbort=!0,this._internalAbort(),this._status=s.LoaderStatus.kComplete},t.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)},t.prototype._onReadyStateChange=function(e){var t=e.target;if(2===t.readyState){if(void 0!=t.responseURL){var i=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&i!==this._currentRedirectedURL&&(this._currentRedirectedURL=i,this._onURLRedirect&&this._onURLRedirect(i))}if(t.status>=200&&t.status<=
|
||
|
|
/*!**********************************!*\
|
||
|
|
!*** ./src/player/flv-player.js ***!
|
||
|
|
\**********************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=i(/*! events */"./node_modules/events/events.js"),n=i.n(r),s=i(/*! ../utils/logger.js */"./src/utils/logger.js"),o=i(/*! ../utils/browser.js */"./src/utils/browser.js"),a=i(/*! ./player-events.js */"./src/player/player-events.js"),u=i(/*! ../core/transmuxer.js */"./src/core/transmuxer.js"),l=i(/*! ../core/transmuxing-events.js */"./src/core/transmuxing-events.js"),d=i(/*! ../core/mse-controller.js */"./src/core/mse-controller.js"),h=i(/*! ../core/mse-events.js */"./src/core/mse-events.js"),c=i(/*! ./player-errors.js */"./src/player/player-errors.js"),f=i(/*! ../config.js */"./src/config.js"),_=i(/*! ../utils/exception.js */"./src/utils/exception.js"),p=function(){function e(e,t){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(n()),this._config=(0,f.createDefaultConfig)(),"object"===typeof t&&Object.assign(this._config,t),"flv"!==e.type.toLowerCase())throw new _.InvalidArgumentException("FlvPlayer requires an flv MediaDataSource input!");!0===e.isLive&&(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=e,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 i=o.default.chrome&&(o.default.version.major<50||50===o.default.version.major&&o.default.version.build<2661);this._alwaysSeekKeyframe=!!(i||o.default.msedge||o.default.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return e.prototype.destroy=function(){null!=this._progressChecker&&(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},e.prototype.on=function(e,t){var i=this;e===a.default.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then((function(){i._emitter.emit(a.default.MEDIA_INFO,i.mediaInfo)})):e===a.default.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then((function(){i._emitter.emit(a.default.STATISTICS_INFO,i.statisticsInfo)})),this._emitter.addListener(e,t)},e.prototype.off=function(e,t){this._emitter.removeListener(e,t)},e.prototype.attachMediaElement=function(e){var t=this;if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),e.addEventListener("seeking",this.e.onvSeeking),e.addEventListener("canplay",this.e.onvCanPlay),e.addEventListener("stalled",this.e.onvStalled),e.addEventListener("progress",this.e.onvProgress),this._msectl=new d.default(this._config),this._msectl.on(h.default.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(h.default.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(h.default.SOURCE_OPEN,(function(){t._mseSourceOpened=!0,t._hasPendingLoad&&(t._hasPendingLoad=!1,t.load())})),this._msectl.on(h.default.ERROR,(function(e){t._emitter.emit(a.default.ERROR,c.ErrorTypes.MEDIA_ERROR,c.ErrorDetails.MEDIA_MSE_ERROR,e)})),this._msectl.attachMediaElement(e),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(i){}},e.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.
|
||
|
|
/*!*************************************!*\
|
||
|
|
!*** ./src/player/native-player.js ***!
|
||
|
|
\*************************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=i(/*! events */"./node_modules/events/events.js"),n=i.n(r),s=i(/*! ./player-events.js */"./src/player/player-events.js"),o=i(/*! ../config.js */"./src/config.js"),a=i(/*! ../utils/exception.js */"./src/utils/exception.js"),u=function(){function e(e,t){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(n()),this._config=(0,o.createDefaultConfig)(),"object"===typeof t&&Object.assign(this._config,t),"flv"===e.type.toLowerCase())throw new a.InvalidArgumentException("NativePlayer does't support flv MediaDataSource input!");if(e.hasOwnProperty("segments"))throw new a.InvalidArgumentException("NativePlayer("+e.type+") doesn't support multipart playback!");this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=e,this._mediaElement=null}return e.prototype.destroy=function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},e.prototype.on=function(e,t){var i=this;e===s.default.MEDIA_INFO?null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then((function(){i._emitter.emit(s.default.MEDIA_INFO,i.mediaInfo)})):e===s.default.STATISTICS_INFO&&null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then((function(){i._emitter.emit(s.default.STATISTICS_INFO,i.statisticsInfo)})),this._emitter.addListener(e,t)},e.prototype.off=function(e,t){this._emitter.removeListener(e,t)},e.prototype.attachMediaElement=function(e){if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(t){}},e.prototype.detachMediaElement=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},e.prototype.load=function(){if(!this._mediaElement)throw new a.IllegalStateException("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)},e.prototype.unload=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},e.prototype.play=function(){return this._mediaElement.play()},e.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._mediaElement.currentTime=e:this._pendingSeekTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mediaInfo",{get:function(){var e=this._mediaElement instanceof HTMLAudioElement?"audio/":"video/",t={mimeType:e+this._mediaDataSource.type};return thi
|
||
|
|
/*!*************************************!*\
|
||
|
|
!*** ./src/player/player-errors.js ***!
|
||
|
|
\*************************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t),i.d(t,{ErrorTypes:function(){return s},ErrorDetails:function(){return o}});var r=i(/*! ../io/loader.js */"./src/io/loader.js"),n=i(/*! ../demux/demux-errors.js */"./src/demux/demux-errors.js"),s={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},o={NETWORK_EXCEPTION:r.LoaderErrors.EXCEPTION,NETWORK_STATUS_CODE_INVALID:r.LoaderErrors.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:r.LoaderErrors.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:r.LoaderErrors.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:n.default.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:n.default.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:n.default.CODEC_UNSUPPORTED}},"./src/player/player-events.js":
|
||
|
|
/*!*************************************!*\
|
||
|
|
!*** ./src/player/player-events.js ***!
|
||
|
|
\*************************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r={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"};t["default"]=r},"./src/remux/aac-silent.js":
|
||
|
|
/*!*********************************!*\
|
||
|
|
!*** ./src/remux/aac-silent.js ***!
|
||
|
|
\*********************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=function(){function e(){}return e.getSilentFrame=function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)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(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)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(3===t)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},e}();t["default"]=r},"./src/remux/mp4-generator.js":
|
||
|
|
/*!************************************!*\
|
||
|
|
!*** ./src/remux/mp4-generator.js ***!
|
||
|
|
\************************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=function(){function e(){}return e.init=function(){for(var t in e.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":[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var i=e.constants={};i.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),i.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),i.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),i.STSC=i.STCO=i.STTS,i.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),i.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]),i.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]),i.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),i.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),i.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])},e.box=function(e){for(var t=8,i=null,r=Array.prototype.slice.call(arguments,1),n=r.length,s=0;s<n;s++)t+=r[s].byteLength;i=new Uint8Array(t),i[0]=t>>>24&255,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i.set(e,4);var o=8;for(s=0;s<n;s++)i.set(r[s],o),o+=r[s].byteLength;return i},e.generateInitSegment=function(t){var i=e.box(e.types.ftyp,e.constants.FTYP),r=e.moov(t),n=new Uint8Array(i.byteLength+r.byteLength);return n.set(i,0),n.set(r,i.byteLength),n},e.moov=function(t){var i=e.mvhd(t.timescale,t.duration),r=e.trak(t),n=e.mvex(t);return e.box(e.types.moov,i,r,n)},e.mvhd=function(t,i){return e.box(e.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,i>>>24&255,i>>>16&255,i>>>8&255,255&i,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]))},e.trak=function(t){return e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.tkhd=function(t){var i=t.id,r=t.duration,n=t.presentWidth,s=t.presentHeight;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,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,n>>>8&255,255&n,0,0,s>>>8&255,255&s,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t),e.hdlr(t),e.minf(t))},e.mdhd=function(t){var i=t.timescale,r=t.duration;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,r>>>24&255,r>>>16&255,r>>>8&255,255&r,85,196,0,0]))},e.hdlr=function(t){var i=null;return i="audio"===t.type?e.constants.HDLR_AUDIO:e.constants.HDLR_VIDEO,e.box(e.types.hdlr,i)},e.minf=function(t){var i=null;return i="audio"===t.type?e.box(e.types.smhd,e.constants.SMHD):e.box(e.types.vmhd,e.constants.VMHD),e.box(e.types.minf,i,e.dinf(),e.stbl(t))},e.dinf=function(){var t=e.box(e.types.dinf,e.box(e.types.dref,e.constants.DREF));return t},e.stbl=function(t){var i=e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.constants.STTS),e.box(e.types.stsc,e.constants.STSC),e.box(e.types.stsz,e.constants.STSZ),e.box(e.types.stco,e.constants.STCO));return i},e.stsd=function(t){return"audio"===t.type?"mp3"===t.codec?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp3(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp4a(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.avc1(t))},e.mp3=function(t){var i=t.channelCount,r=t.audioSampleRate,n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return e.box(e.types[".mp3"],n)},e.mp4a=function(t){var i=t.channelCount,r=t.audioSampleRate,n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return e.box(e.types.mp4a,n,e.esds(t))},e.esds=function(t){var i=t.config||[],r=i.length,n=new Uint8Array([0,0,0
|
||
|
|
/*!**********************************!*\
|
||
|
|
!*** ./src/remux/mp4-remuxer.js ***!
|
||
|
|
\**********************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=i(/*! ../utils/logger.js */"./src/utils/logger.js"),n=i(/*! ./mp4-generator.js */"./src/remux/mp4-generator.js"),s=i(/*! ./aac-silent.js */"./src/remux/aac-silent.js"),o=i(/*! ../utils/browser.js */"./src/utils/browser.js"),a=i(/*! ../core/media-segment-info.js */"./src/core/media-segment-info.js"),u=i(/*! ../utils/exception.js */"./src/utils/exception.js"),l=function(){function e(e){this.TAG="MP4Remuxer",this._config=e,this._isLive=!0===e.isLive,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 a.MediaSegmentInfoList("audio"),this._videoSegmentInfoList=new a.MediaSegmentInfoList("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!o.default.chrome||!(o.default.version.major<50||50===o.default.version.major&&o.default.version.build<2661)),this._fillSilentAfterSeek=o.default.msedge||o.default.msie,this._mp3UseMpegAudio=!o.default.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return e.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},e.prototype.bindDataSource=function(e){return e.onDataAvailable=this.remux.bind(this),e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this},Object.defineProperty(e.prototype,"onInitSegment",{get:function(){return this._onInitSegment},set:function(e){this._onInitSegment=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onMediaSegment",{get:function(){return this._onMediaSegment},set:function(e){this._onMediaSegment=e},enumerable:!1,configurable:!0}),e.prototype.insertDiscontinuity=function(){this._audioNextDts=this._videoNextDts=void 0},e.prototype.seek=function(e){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()},e.prototype.remux=function(e,t){if(!this._onMediaSegment)throw new u.IllegalStateException("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(e,t),this._remuxVideo(t),this._remuxAudio(e)},e.prototype._onTrackMetadataReceived=function(e,t){var i=null,r="mp4",s=t.codec;if("audio"===e)this._audioMeta=t,"mp3"===t.codec&&this._mp3UseMpegAudio?(r="mpeg",s="",i=new Uint8Array):i=n.default.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,i=n.default.generateInitSegment(t)}if(!this._onInitSegment)throw new u.IllegalStateException("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:i.buffer,codec:s,container:e+"/"+r,mediaDuration:t.duration})},e.prototype._calculateDtsBase=function(e,t){this._dtsBaseInited||(e.samples&&e.samples.length&&(this._audioDtsBase=e.samples[0].dts),t.samples&&t.samples.length&&(this._videoDtsBase=t.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)},e.prototype.flushStashedSamples=function(){var e=this._videoStashedLastSample,t=this._audioStashedLastSample,i={type:"video",id:1,sequenceNumber:0,samples:[],length:0};null!=e&&(i.samples.push(e),i.length=e.length);var r={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};null!=t&&(r.samples.push(t),r.length=t.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(i,!0),this._remuxAudio(r,!0)},e.prototype._remuxAudio=function(e,t){if(null!=this._audioMeta){var i=e,u=i.samples,l=void 0,d=-1,h=-1,c=this._audioMeta.refSampleDuration,f="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,_=this._dtsBaseInited&&void 0===this._audioNextDts,p=!1;if(u&&0!==u.length&&(1!==u.length||t)){var m=0,g=null,v=0;f?(m=0,v=i.length):(m=8,v=8+i.length);var y=null
|
||
|
|
/*!******************************!*\
|
||
|
|
!*** ./src/utils/browser.js ***!
|
||
|
|
\******************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r={};function n(){var e=self.navigator.userAgent.toLowerCase(),t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(e)||[],i=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],n={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:i[0]||""},s={};if(n.browser){s[n.browser]=!0;var o=n.majorVersion.split(".");s.version={major:parseInt(n.majorVersion,10),string:n.version},o.length>1&&(s.version.minor=parseInt(o[1],10)),o.length>2&&(s.version.build=parseInt(o[2],10))}if(n.platform&&(s[n.platform]=!0),(s.chrome||s.opr||s.safari)&&(s.webkit=!0),s.rv||s.iemobile){s.rv&&delete s.rv;var a="msie";n.browser=a,s[a]=!0}if(s.edge){delete s.edge;var u="msedge";n.browser=u,s[u]=!0}if(s.opr){var l="opera";n.browser=l,s[l]=!0}if(s.safari&&s.android){var d="android";n.browser=d,s[d]=!0}for(var h in s.name=n.browser,s.platform=n.platform,r)r.hasOwnProperty(h)&&delete r[h];Object.assign(r,s)}n(),t["default"]=r},"./src/utils/exception.js":
|
||
|
|
/*!********************************!*\
|
||
|
|
!*** ./src/utils/exception.js ***!
|
||
|
|
\********************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t),i.d(t,{RuntimeException:function(){return n},IllegalStateException:function(){return s},InvalidArgumentException:function(){return o},NotImplementedException:function(){return a}});var r=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){if("function"!==typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),n=function(){function e(e){this._message=e}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}(),s=function(e){function t(t){return e.call(this,t)||this}return r(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"IllegalStateException"},enumerable:!1,configurable:!0}),t}(n),o=function(e){function t(t){return e.call(this,t)||this}return r(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"InvalidArgumentException"},enumerable:!1,configurable:!0}),t}(n),a=function(e){function t(t){return e.call(this,t)||this}return r(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"NotImplementedException"},enumerable:!1,configurable:!0}),t}(n)},"./src/utils/logger.js":
|
||
|
|
/*!*****************************!*\
|
||
|
|
!*** ./src/utils/logger.js ***!
|
||
|
|
\*****************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=i(/*! events */"./node_modules/events/events.js"),n=i.n(r),s=function(){function e(){}return e.e=function(t,i){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="["+t+"] > "+i;e.ENABLE_CALLBACK&&e.emitter.emit("log","error",r),e.ENABLE_ERROR&&(console.error?console.error(r):console.warn?console.warn(r):console.log(r))},e.i=function(t,i){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="["+t+"] > "+i;e.ENABLE_CALLBACK&&e.emitter.emit("log","info",r),e.ENABLE_INFO&&(console.info?console.info(r):console.log(r))},e.w=function(t,i){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="["+t+"] > "+i;e.ENABLE_CALLBACK&&e.emitter.emit("log","warn",r),e.ENABLE_WARN&&(console.warn?console.warn(r):console.log(r))},e.d=function(t,i){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="["+t+"] > "+i;e.ENABLE_CALLBACK&&e.emitter.emit("log","debug",r),e.ENABLE_DEBUG&&(console.debug?console.debug(r):console.log(r))},e.v=function(t,i){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="["+t+"] > "+i;e.ENABLE_CALLBACK&&e.emitter.emit("log","verbose",r),e.ENABLE_VERBOSE&&console.log(r)},e}();s.GLOBAL_TAG="flv.js",s.FORCE_GLOBAL_TAG=!1,s.ENABLE_ERROR=!0,s.ENABLE_INFO=!0,s.ENABLE_WARN=!0,s.ENABLE_DEBUG=!0,s.ENABLE_VERBOSE=!0,s.ENABLE_CALLBACK=!1,s.emitter=new(n()),t["default"]=s},"./src/utils/logging-control.js":
|
||
|
|
/*!**************************************!*\
|
||
|
|
!*** ./src/utils/logging-control.js ***!
|
||
|
|
\**************************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=i(/*! events */"./node_modules/events/events.js"),n=i.n(r),s=i(/*! ./logger.js */"./src/utils/logger.js"),o=function(){function e(){}return Object.defineProperty(e,"forceGlobalTag",{get:function(){return s.default.FORCE_GLOBAL_TAG},set:function(t){s.default.FORCE_GLOBAL_TAG=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"globalTag",{get:function(){return s.default.GLOBAL_TAG},set:function(t){s.default.GLOBAL_TAG=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableAll",{get:function(){return s.default.ENABLE_VERBOSE&&s.default.ENABLE_DEBUG&&s.default.ENABLE_INFO&&s.default.ENABLE_WARN&&s.default.ENABLE_ERROR},set:function(t){s.default.ENABLE_VERBOSE=t,s.default.ENABLE_DEBUG=t,s.default.ENABLE_INFO=t,s.default.ENABLE_WARN=t,s.default.ENABLE_ERROR=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableDebug",{get:function(){return s.default.ENABLE_DEBUG},set:function(t){s.default.ENABLE_DEBUG=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableVerbose",{get:function(){return s.default.ENABLE_VERBOSE},set:function(t){s.default.ENABLE_VERBOSE=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableInfo",{get:function(){return s.default.ENABLE_INFO},set:function(t){s.default.ENABLE_INFO=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableWarn",{get:function(){return s.default.ENABLE_WARN},set:function(t){s.default.ENABLE_WARN=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableError",{get:function(){return s.default.ENABLE_ERROR},set:function(t){s.default.ENABLE_ERROR=t,e._notifyChange()},enumerable:!1,configurable:!0}),e.getConfig=function(){return{globalTag:s.default.GLOBAL_TAG,forceGlobalTag:s.default.FORCE_GLOBAL_TAG,enableVerbose:s.default.ENABLE_VERBOSE,enableDebug:s.default.ENABLE_DEBUG,enableInfo:s.default.ENABLE_INFO,enableWarn:s.default.ENABLE_WARN,enableError:s.default.ENABLE_ERROR,enableCallback:s.default.ENABLE_CALLBACK}},e.applyConfig=function(e){s.default.GLOBAL_TAG=e.globalTag,s.default.FORCE_GLOBAL_TAG=e.forceGlobalTag,s.default.ENABLE_VERBOSE=e.enableVerbose,s.default.ENABLE_DEBUG=e.enableDebug,s.default.ENABLE_INFO=e.enableInfo,s.default.ENABLE_WARN=e.enableWarn,s.default.ENABLE_ERROR=e.enableError,s.default.ENABLE_CALLBACK=e.enableCallback},e._notifyChange=function(){var t=e.emitter;if(t.listenerCount("change")>0){var i=e.getConfig();t.emit("change",i)}},e.registerListener=function(t){e.emitter.addListener("change",t)},e.removeListener=function(t){e.emitter.removeListener("change",t)},e.addLogListener=function(t){s.default.emitter.addListener("log",t),s.default.emitter.listenerCount("log")>0&&(s.default.ENABLE_CALLBACK=!0,e._notifyChange())},e.removeLogListener=function(t){s.default.emitter.removeListener("log",t),0===s.default.emitter.listenerCount("log")&&(s.default.ENABLE_CALLBACK=!1,e._notifyChange())},e}();o.emitter=new(n()),t["default"]=o},"./src/utils/polyfill.js":
|
||
|
|
/*!*******************************!*\
|
||
|
|
!*** ./src/utils/polyfill.js ***!
|
||
|
|
\*******************************/
|
||
|
|
function(e,t,i){"use strict";i.r(t);var r=function(){function e(){}return e.install=function(){Object.setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Object.assign=Object.assign||function(e){if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;i<arguments.length;i++){var r=arguments[i];if(void 0!==r&&null!==r)for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])}return t},"function"!==typeof self.Promise&&i(/*! es6-promise */"./node_modules/es6-promise/dist/es6-promise.js").polyfill()},e}();r.install(),t["default"]=r},"./src/utils/utf8-conv.js":
|
||
|
|
/*!********************************!*\
|
||
|
|
!*** ./src/utils/utf8-conv.js ***!
|
||
|
|
\********************************/
|
||
|
|
function(e,t,i){"use strict";function r(e,t,i){var r=e;if(t+i<r.length){while(i--)if(128!==(192&r[++t]))return!1;return!0}return!1}function n(e){var t=[],i=e,n=0,s=e.length;while(n<s)if(i[n]<128)t.push(String.fromCharCode(i[n])),++n;else{if(i[n]<192);else if(i[n]<224){if(r(i,n,1)){var o=(31&i[n])<<6|63&i[n+1];if(o>=128){t.push(String.fromCharCode(65535&o)),n+=2;continue}}}else if(i[n]<240){if(r(i,n,2)){o=(15&i[n])<<12|(63&i[n+1])<<6|63&i[n+2];if(o>=2048&&55296!==(63488&o)){t.push(String.fromCharCode(65535&o)),n+=3;continue}}}else if(i[n]<248&&r(i,n,3)){o=(7&i[n])<<18|(63&i[n+1])<<12|(63&i[n+2])<<6|63&i[n+3];if(o>65536&&o<1114112){o-=65536,t.push(String.fromCharCode(o>>>10|55296)),t.push(String.fromCharCode(1023&o|56320)),n+=4;continue}}t.push(String.fromCharCode(65533)),++n}return t.join("")}i.r(t),t["default"]=n}},t={};function i(r){var n=t[r];if(void 0!==n)return n.exports;var s=t[r]={exports:{}};return e[r].call(s.exports,s,s.exports,i),s.exports}i.m=e,function(){i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,{a:t}),t}}(),function(){i.d=function(e,t){for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}}(),function(){i.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}();var r=i("./src/index.js");return r}()}))},4614:function(e,t,i){"use strict";i.d(t,{V:function(){return n}});var r=i(7344);const n=()=>(0,r.Z)({url:"decision/planManage/getBuildUnit",method:"get"})},7214:function(e,t,i){"use strict";i.d(t,{S:function(){return s},s:function(){return o}});var r=i(7344),n=i(4239);const s=(e,t)=>{t||(t={});let i={...t};i["Authorization"]=n.Z.state.token;const s=`${r.h}${e}`;let o="";for(let r in i)o=o+r+"="+i[r]+"&";o=o.substring(0,o.lastIndexOf("&")),s.includes("?")&&o&&(o="&"+o),!s.includes("?")&&o&&(o="?"+o),window.open(s+o)},o=e=>{const t={};for(const i in e)if(Object.hasOwnProperty.call(e,i)){const r=e[i];t[i]=r}return t}},39:function(e,t,i){"use strict";i.d(t,{Z:function(){return l}});var r=i(3396);const n={class:"TablePage"};function s(e,t,i,s,o,a){const u=(0,r.up)("el-pagination");return(0,r.wg)(),(0,r.iD)("div",n,[(0,r.Wm)(u,{"current-page":i.pageParams.pageNum,"page-size":i.pageParams.pageSize,"page-sizes":[10,20,30,40,50],layout:"total, prev, pager, next, jumper, sizes",total:i.total,"prev-text":"上一页","next-text":"下一页",onSizeChange:a.handleSizeChange,onCurrentChange:a.handleCurrentChange},null,8,["current-page","page-size","total","onSizeChange","onCurrentChange"])])}var o={props:{pageParams:{required:!0,default:()=>{}},total:{required:!0,default:0}},data(){return{}},methods:{handleSizeChange(e){this.$emit("handleSizeChange",e)},handleCurrentChange(e){this.$emit("handleCurrentChange",e)}}},a=i(89);const u=(0,a.Z)(o,[["render",s],["__scopeId","data-v-0dd3eebe"]]);var l=u},849:function(e,t,i){"use strict";i.d(t,{Z:function(){return v}});var r=i(3396),n=i(9242);const s=e=>((0,r.dD)("data-v-fb4e1276"),e=e(),(0,r.Cn)(),e),o={class:"video"},a={class:"dialog_header"},u=s((()=>(0,r._)("div",{class:"dialog_title"},"视频查看",-1))),l={class:"dialog_content"},d={class:"video_box"},h=["src"];function c(e,t,i,s,c,f){return(0,r.wg)(),(0,r.iD)("div",o,[(0,r._)("div",{class:"dialog_box",onClick:t[1]||(t[1]=(0,n.iM)((()=>{}),["stop"]))},[(0,r._)("div",a,[u,(0,r._)("div",{class:"dialog_close",onClick:t[0]||(t[0]=(...e)=>f.videoClose&&f.videoClose(...e))})])]),(0,r._)("div",l,[(0,r._)("div",d,[(0,r._)("iframe",{width:"100%",height:"100%",src:i.videoUrl,frameborder:"0"},null,8,h)])])])}var f=i(2747),_=i.n(f),p={props:{videoUrl:{require:!0,default:""}},data(){return{flvPlayer:""}},mounted(){},methods:{videoClose(){this.$emit("videoClose")},playVi
|