1 |
- {"version":3,"sources":["webpack://flvjs/webpack/universalModuleDefinition","webpack://flvjs/./node_modules/es6-promise/dist/es6-promise.js","webpack://flvjs/./node_modules/events/events.js","webpack://flvjs/./node_modules/webworkify-webpack/index.js","webpack://flvjs/./src/config.js","webpack://flvjs/./src/core/features.js","webpack://flvjs/./src/core/media-info.js","webpack://flvjs/./src/core/media-segment-info.js","webpack://flvjs/./src/core/mse-controller.js","webpack://flvjs/./src/core/mse-events.js","webpack://flvjs/./src/core/transmuxer.js","webpack://flvjs/./src/core/transmuxing-controller.js","webpack://flvjs/./src/core/transmuxing-events.js","webpack://flvjs/./src/core/transmuxing-worker.js","webpack://flvjs/./src/demux/amf-parser.js","webpack://flvjs/./src/demux/demux-errors.js","webpack://flvjs/./src/demux/exp-golomb.js","webpack://flvjs/./src/demux/flv-demuxer.js","webpack://flvjs/./src/demux/sps-parser.js","webpack://flvjs/./src/flv.js","webpack://flvjs/./src/index.js","webpack://flvjs/./src/io/fetch-stream-loader.js","webpack://flvjs/./src/io/io-controller.js","webpack://flvjs/./src/io/loader.js","webpack://flvjs/./src/io/param-seek-handler.js","webpack://flvjs/./src/io/range-seek-handler.js","webpack://flvjs/./src/io/speed-sampler.js","webpack://flvjs/./src/io/websocket-loader.js","webpack://flvjs/./src/io/xhr-moz-chunked-loader.js","webpack://flvjs/./src/io/xhr-range-loader.js","webpack://flvjs/./src/player/flv-player.js","webpack://flvjs/./src/player/native-player.js","webpack://flvjs/./src/player/player-errors.js","webpack://flvjs/./src/player/player-events.js","webpack://flvjs/./src/remux/aac-silent.js","webpack://flvjs/./src/remux/mp4-generator.js","webpack://flvjs/./src/remux/mp4-remuxer.js","webpack://flvjs/./src/utils/browser.js","webpack://flvjs/./src/utils/exception.js","webpack://flvjs/./src/utils/logger.js","webpack://flvjs/./src/utils/logging-control.js","webpack://flvjs/./src/utils/polyfill.js","webpack://flvjs/./src/utils/utf8-conv.js","webpack://flvjs/webpack/bootstrap","webpack://flvjs/webpack/runtime/compat get default export","webpack://flvjs/webpack/runtime/define property getters","webpack://flvjs/webpack/runtime/global","webpack://flvjs/webpack/runtime/hasOwnProperty shorthand","webpack://flvjs/webpack/runtime/make namespace object","webpack://flvjs/webpack/startup"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;ACVA;;;;;;GAMG;AAEH,CAAC,UAAU,MAAM,EAAE,OAAO;IACzB,KAA4D,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,GAAG,OAAO,EAAE,CAAC,CAAC;QAC3F,CAC+B,CAAC;AACjC,CAAC,CAAC,IAAI,EAAE,CAAC;IAAc,YAAY,CAAC;IAEpC,SAAS,gBAAgB,CAAC,CAAC;QACzB,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC;QACpB,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC;IAClE,CAAC;IAED,SAAS,UAAU,CAAC,CAAC;QACnB,OAAO,OAAO,CAAC,KAAK,UAAU,CAAC;IACjC,CAAC;IAID,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;IACtB,IAAI,KAAK,CAAC,OAAO,EAAE;QACjB,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;KAC1B;SAAM;QACL,QAAQ,GAAG,UAAU,CAAC;YACpB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC;QAChE,CAAC,CAAC;KACH;IAED,IAAI,OAAO,GAAG,QAAQ,CAAC;IAEvB,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,IAAI,SAAS,GAAG,KAAK,CAAC,CAAC;IACvB,IAAI,iBAAiB,GAAG,KAAK,CAAC,CAAC;IAE/B,IAAI,IAAI,GAAG,SAAS,IAAI,CAAC,QAAQ,EAAE,GAAG;QACpC,KAAK,CAAC,GAAG,CAAC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,CAAC,CAAC,CAAC;QACtC,EAAE,CAAC,CAAC;KACP;IAED,OAAO,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxB,CAAC;AAED,+DAAe,UAAU,EAAC;;;;;;;UCnF1B;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA,cAAc,0BAA0B,EAAE;WAC1C,cAAc,eAAe;WAC7B,gCAAgC,YAAY;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,wCAAwC,yCAAyC;WACjF;WACA;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,EAAE;WACF;WACA;WACA,CAAC,I;;;;;WCPD,6CAA6C,wDAAwD,E;;;;;WCArG;WACA;WACA;WACA,sDAAsD,kBAAkB;WACxE;WACA,+CAA+C,cAAc;WAC7D,E;;;;;UCNA;UACA;UACA;UACA","file":"flv.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"flvjs\"] = factory();\n\telse\n\t\troot[\"flvjs\"] = factory();\n})(self, function() {\nreturn ","/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.8+1e68dce6\n */\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.ES6Promise = factory());\n}(this, (function () { 'use strict';\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\n\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\n\nvar len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}\n\nfunction then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve$1(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n resolve(promise, object);\n return promise;\n}\n\nvar PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {\n try {\n then$$1.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then$$1) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then$$1, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then$$1) {\n if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then$$1 === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then$$1)) {\n handleForeignThenable(promise, maybeThenable, then$$1);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n var then$$1 = void 0;\n try {\n then$$1 = value.then;\n } catch (error) {\n reject(promise, error);\n return;\n }\n handleMaybeThenable(promise, value, then$$1);\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = true;\n\n if (hasCallback) {\n try {\n value = callback(detail);\n } catch (e) {\n succeeded = false;\n error = e;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (succeeded === false) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n}\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve$$1 = c.resolve;\n\n\n if (resolve$$1 === resolve$1) {\n var _then = void 0;\n var error = void 0;\n var didError = false;\n try {\n _then = entry.then;\n } catch (e) {\n didError = true;\n error = e;\n }\n\n if (_then === then && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise$1) {\n var promise = new c(noop);\n if (didError) {\n reject(promise, error);\n } else {\n handleMaybeThenable(promise, entry, _then);\n }\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve$$1) {\n return resolve$$1(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve$$1(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject$1(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n reject(promise, reason);\n return promise;\n}\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise$1 = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n if (isFunction(callback)) {\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n }\n\n return promise.then(callback, callback);\n };\n\n return Promise;\n}();\n\nPromise$1.prototype.then = then;\nPromise$1.all = all;\nPromise$1.race = race;\nPromise$1.resolve = resolve$1;\nPromise$1.reject = reject$1;\nPromise$1._setScheduler = setScheduler;\nPromise$1._setAsap = setAsap;\nPromise$1._asap = asap;\n\n/*global self*/\nfunction polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise$1;\n}\n\n// Strange compat..\nPromise$1.polyfill = polyfill;\nPromise$1.Promise = Promise$1;\n\nreturn Promise$1;\n\n})));\n\n\n\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","function webpackBootstrapFunc (modules) {\n/******/ // The module cache\n/******/ var installedModules = {};\n\n/******/ // The require function\n/******/ function __webpack_require__(moduleId) {\n\n/******/ // Check if module is in cache\n/******/ if(installedModules[moduleId])\n/******/ return installedModules[moduleId].exports;\n\n/******/ // Create a new module (and put it into the cache)\n/******/ var module = installedModules[moduleId] = {\n/******/ i: moduleId,\n/******/ l: false,\n/******/ exports: {}\n/******/ };\n\n/******/ // Execute the module function\n/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ // Flag the module as loaded\n/******/ module.l = true;\n\n/******/ // Return the exports of the module\n/******/ return module.exports;\n/******/ }\n\n/******/ // expose the modules object (__webpack_modules__)\n/******/ __webpack_require__.m = modules;\n\n/******/ // expose the module cache\n/******/ __webpack_require__.c = installedModules;\n\n/******/ // identity function for calling harmony imports with the correct context\n/******/ __webpack_require__.i = function(value) { return value; };\n\n/******/ // define getter function for harmony exports\n/******/ __webpack_require__.d = function(exports, name, getter) {\n/******/ if(!__webpack_require__.o(exports, name)) {\n/******/ Object.defineProperty(exports, name, {\n/******/ configurable: false,\n/******/ enumerable: true,\n/******/ get: getter\n/******/ });\n/******/ }\n/******/ };\n\n/******/ // define __esModule on exports\n/******/ __webpack_require__.r = function(exports) {\n/******/ Object.defineProperty(exports, '__esModule', { value: true });\n/******/ };\n\n/******/ // getDefaultExport function for compatibility with non-harmony modules\n/******/ __webpack_require__.n = function(module) {\n/******/ var getter = module && module.__esModule ?\n/******/ function getDefault() { return module['default']; } :\n/******/ function getModuleExports() { return module; };\n/******/ __webpack_require__.d(getter, 'a', getter);\n/******/ return getter;\n/******/ };\n\n/******/ // Object.prototype.hasOwnProperty.call\n/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n/******/ // __webpack_public_path__\n/******/ __webpack_require__.p = \"/\";\n\n/******/ // on error function for async loading\n/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n var f = __webpack_require__(__webpack_require__.s = ENTRY_MODULE)\n return f.default || f // try to call default if defined to also support babel esmodule exports\n}\n\nvar moduleNameReqExp = '[\\\\.|\\\\-|\\\\+|\\\\w|\\/|@]+'\nvar dependencyRegExp = '\\\\(\\\\s*(\\/\\\\*.*?\\\\*\\/)?\\\\s*.*?(' + moduleNameReqExp + ').*?\\\\)' // additional chars when output.pathinfo is true\n\n// http://stackoverflow.com/a/2593661/130442\nfunction quoteRegExp (str) {\n return (str + '').replace(/[.?*+^$[\\]\\\\(){}|-]/g, '\\\\$&')\n}\n\nfunction isNumeric(n) {\n return !isNaN(1 * n); // 1 * n converts integers, integers as string (\"123\"), 1e3 and \"1e3\" to integers and strings to NaN\n}\n\nfunction getModuleDependencies (sources, module, queueName) {\n var retval = {}\n retval[queueName] = []\n\n var fnString = module.toString()\n var wrapperSignature = fnString.match(/^function\\s?\\w*\\(\\w+,\\s*\\w+,\\s*(\\w+)\\)/)\n if (!wrapperSignature) return retval\n var webpackRequireName = wrapperSignature[1]\n\n // main bundle deps\n var re = new RegExp('(\\\\\\\\n|\\\\W)' + quoteRegExp(webpackRequireName) + dependencyRegExp, 'g')\n var match\n while ((match = re.exec(fnString))) {\n if (match[3] === 'dll-reference') continue\n retval[queueName].push(match[3])\n }\n\n // dll deps\n re = new RegExp('\\\\(' + quoteRegExp(webpackRequireName) + '\\\\(\"(dll-reference\\\\s(' + moduleNameReqExp + '))\"\\\\)\\\\)' + dependencyRegExp, 'g')\n while ((match = re.exec(fnString))) {\n if (!sources[match[2]]) {\n retval[queueName].push(match[1])\n sources[match[2]] = __webpack_require__(match[1]).m\n }\n retval[match[2]] = retval[match[2]] || []\n retval[match[2]].push(match[4])\n }\n\n // convert 1e3 back to 1000 - this can be important after uglify-js converted 1000 to 1e3\n var keys = Object.keys(retval);\n for (var i = 0; i < keys.length; i++) {\n for (var j = 0; j < retval[keys[i]].length; j++) {\n if (isNumeric(retval[keys[i]][j])) {\n retval[keys[i]][j] = 1 * retval[keys[i]][j];\n }\n }\n }\n\n return retval\n}\n\nfunction hasValuesInQueues (queues) {\n var keys = Object.keys(queues)\n return keys.reduce(function (hasValues, key) {\n return hasValues || queues[key].length > 0\n }, false)\n}\n\nfunction getRequiredModules (sources, moduleId) {\n var modulesQueue = {\n main: [moduleId]\n }\n var requiredModules = {\n main: []\n }\n var seenModules = {\n main: {}\n }\n\n while (hasValuesInQueues(modulesQueue)) {\n var queues = Object.keys(modulesQueue)\n for (var i = 0; i < queues.length; i++) {\n var queueName = queues[i]\n var queue = modulesQueue[queueName]\n var moduleToCheck = queue.pop()\n seenModules[queueName] = seenModules[queueName] || {}\n if (seenModules[queueName][moduleToCheck] || !sources[queueName][moduleToCheck]) continue\n seenModules[queueName][moduleToCheck] = true\n requiredModules[queueName] = requiredModules[queueName] || []\n requiredModules[queueName].push(moduleToCheck)\n var newModules = getModuleDependencies(sources, sources[queueName][moduleToCheck], queueName)\n var newModulesKeys = Object.keys(newModules)\n for (var j = 0; j < newModulesKeys.length; j++) {\n modulesQueue[newModulesKeys[j]] = modulesQueue[newModulesKeys[j]] || []\n modulesQueue[newModulesKeys[j]] = modulesQueue[newModulesKeys[j]].concat(newModules[newModulesKeys[j]])\n }\n }\n }\n\n return requiredModules\n}\n\nmodule.exports = function (moduleId, options) {\n options = options || {}\n var sources = {\n main: __webpack_modules__\n }\n\n var requiredModules = options.all ? { main: Object.keys(sources.main) } : getRequiredModules(sources, moduleId)\n\n var src = ''\n\n Object.keys(requiredModules).filter(function (m) { return m !== 'main' }).forEach(function (module) {\n var entryModule = 0\n while (requiredModules[module][entryModule]) {\n entryModule++\n }\n requiredModules[module].push(entryModule)\n sources[module][entryModule] = '(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })'\n src = src + 'var ' + module + ' = (' + webpackBootstrapFunc.toString().replace('ENTRY_MODULE', JSON.stringify(entryModule)) + ')({' + requiredModules[module].map(function (id) { return '' + JSON.stringify(id) + ': ' + sources[module][id].toString() }).join(',') + '});\\n'\n })\n\n src = src + 'new ((' + webpackBootstrapFunc.toString().replace('ENTRY_MODULE', JSON.stringify(moduleId)) + ')({' + requiredModules.main.map(function (id) { return '' + JSON.stringify(id) + ': ' + sources.main[id].toString() }).join(',') + '}))(self);'\n\n var blob = new window.Blob([src], { type: 'text/javascript' })\n if (options.bare) { return blob }\n\n var URL = window.URL || window.webkitURL || window.mozURL || window.msURL\n\n var workerUrl = URL.createObjectURL(blob)\n var worker = new window.Worker(workerUrl)\n worker.objectURL = workerUrl\n\n return worker\n}\n","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const defaultConfig = {\n enableWorker: false,\n enableStashBuffer: true,\n stashInitialSize: undefined,\n\n isLive: false,\n\n lazyLoad: true,\n lazyLoadMaxDuration: 3 * 60,\n lazyLoadRecoverDuration: 30,\n deferLoadAfterSourceOpen: true,\n\n // autoCleanupSourceBuffer: default as false, leave unspecified\n autoCleanupMaxBackwardDuration: 3 * 60,\n autoCleanupMinBackwardDuration: 2 * 60,\n\n statisticsInfoReportInterval: 600,\n\n fixAudioTimestampGap: true,\n\n accurateSeek: false,\n seekType: 'range', // [range, param, custom]\n seekParamStart: 'bstart',\n seekParamEnd: 'bend',\n rangeLoadZeroStart: false,\n customSeekHandler: undefined,\n reuseRedirectedURL: false,\n // referrerPolicy: leave as unspecified\n\n headers: undefined,\n customLoader: undefined\n};\n\nexport function createDefaultConfig() {\n return Object.assign({}, defaultConfig);\n}","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport IOController from '../io/io-controller.js';\nimport {createDefaultConfig} from '../config.js';\n\nclass Features {\n\n static supportMSEH264Playback() {\n return window.MediaSource &&\n window.MediaSource.isTypeSupported('video/mp4; codecs=\"avc1.42E01E,mp4a.40.2\"');\n }\n\n static supportNetworkStreamIO() {\n let ioctl = new IOController({}, createDefaultConfig());\n let loaderType = ioctl.loaderType;\n ioctl.destroy();\n return loaderType == 'fetch-stream-loader' || loaderType == 'xhr-moz-chunked-loader';\n }\n\n static getNetworkLoaderTypeName() {\n let ioctl = new IOController({}, createDefaultConfig());\n let loaderType = ioctl.loaderType;\n ioctl.destroy();\n return loaderType;\n }\n\n static supportNativeMediaPlayback(mimeType) {\n if (Features.videoElement == undefined) {\n Features.videoElement = window.document.createElement('video');\n }\n let canPlay = Features.videoElement.canPlayType(mimeType);\n return canPlay === 'probably' || canPlay == 'maybe';\n }\n\n static getFeatureList() {\n let features = {\n mseFlvPlayback: false,\n mseLiveFlvPlayback: false,\n networkStreamIO: false,\n networkLoaderName: '',\n nativeMP4H264Playback: false,\n nativeWebmVP8Playback: false,\n nativeWebmVP9Playback: false\n };\n\n features.mseFlvPlayback = Features.supportMSEH264Playback();\n features.networkStreamIO = Features.supportNetworkStreamIO();\n features.networkLoaderName = Features.getNetworkLoaderTypeName();\n features.mseLiveFlvPlayback = features.mseFlvPlayback && features.networkStreamIO;\n features.nativeMP4H264Playback = Features.supportNativeMediaPlayback('video/mp4; codecs=\"avc1.42001E, mp4a.40.2\"');\n features.nativeWebmVP8Playback = Features.supportNativeMediaPlayback('video/webm; codecs=\"vp8.0, vorbis\"');\n features.nativeWebmVP9Playback = Features.supportNativeMediaPlayback('video/webm; codecs=\"vp9\"');\n\n return features;\n }\n\n}\n\nexport default Features;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nclass MediaInfo {\n\n constructor() {\n this.mimeType = null;\n this.duration = null;\n\n this.hasAudio = null;\n this.hasVideo = null;\n this.audioCodec = null;\n this.videoCodec = null;\n this.audioDataRate = null;\n this.videoDataRate = null;\n\n this.audioSampleRate = null;\n this.audioChannelCount = null;\n\n this.width = null;\n this.height = null;\n this.fps = null;\n this.profile = null;\n this.level = null;\n this.refFrames = null;\n this.chromaFormat = null;\n this.sarNum = null;\n this.sarDen = null;\n\n this.metadata = null;\n this.segments = null; // MediaInfo[]\n this.segmentCount = null;\n this.hasKeyframesIndex = null;\n this.keyframesIndex = null;\n }\n\n isComplete() {\n let audioInfoComplete = (this.hasAudio === false) ||\n (this.hasAudio === true &&\n this.audioCodec != null &&\n this.audioSampleRate != null &&\n this.audioChannelCount != null);\n\n let videoInfoComplete = (this.hasVideo === false) ||\n (this.hasVideo === true &&\n this.videoCodec != null &&\n this.width != null &&\n this.height != null &&\n this.fps != null &&\n this.profile != null &&\n this.level != null &&\n this.refFrames != null &&\n this.chromaFormat != null &&\n this.sarNum != null &&\n this.sarDen != null);\n\n // keyframesIndex may not be present\n return this.mimeType != null &&\n this.duration != null &&\n this.metadata != null &&\n this.hasKeyframesIndex != null &&\n audioInfoComplete &&\n videoInfoComplete;\n }\n\n isSeekable() {\n return this.hasKeyframesIndex === true;\n }\n\n getNearestKeyframe(milliseconds) {\n if (this.keyframesIndex == null) {\n return null;\n }\n\n let table = this.keyframesIndex;\n let keyframeIdx = this._search(table.times, milliseconds);\n\n return {\n index: keyframeIdx,\n milliseconds: table.times[keyframeIdx],\n fileposition: table.filepositions[keyframeIdx]\n };\n }\n\n _search(list, value) {\n let idx = 0;\n\n let last = list.length - 1;\n let mid = 0;\n let lbound = 0;\n let ubound = last;\n\n if (value < list[0]) {\n idx = 0;\n lbound = ubound + 1; // skip search\n }\n\n while (lbound <= ubound) {\n mid = lbound + Math.floor((ubound - lbound) / 2);\n if (mid === last || (value >= list[mid] && value < list[mid + 1])) {\n idx = mid;\n break;\n } else if (list[mid] < value) {\n lbound = mid + 1;\n } else {\n ubound = mid - 1;\n }\n }\n\n return idx;\n }\n\n}\n\nexport default MediaInfo;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Represents an media sample (audio / video)\nexport class SampleInfo {\n\n constructor(dts, pts, duration, originalDts, isSync) {\n this.dts = dts;\n this.pts = pts;\n this.duration = duration;\n this.originalDts = originalDts;\n this.isSyncPoint = isSync;\n this.fileposition = null;\n }\n\n}\n\n// Media Segment concept is defined in Media Source Extensions spec.\n// Particularly in ISO BMFF format, an Media Segment contains a moof box followed by a mdat box.\nexport class MediaSegmentInfo {\n\n constructor() {\n this.beginDts = 0;\n this.endDts = 0;\n this.beginPts = 0;\n this.endPts = 0;\n this.originalBeginDts = 0;\n this.originalEndDts = 0;\n this.syncPoints = []; // SampleInfo[n], for video IDR frames only\n this.firstSample = null; // SampleInfo\n this.lastSample = null; // SampleInfo\n }\n\n appendSyncPoint(sampleInfo) { // also called Random Access Point\n sampleInfo.isSyncPoint = true;\n this.syncPoints.push(sampleInfo);\n }\n\n}\n\n// Ordered list for recording video IDR frames, sorted by originalDts\nexport class IDRSampleList {\n\n constructor() {\n this._list = [];\n }\n\n clear() {\n this._list = [];\n }\n\n appendArray(syncPoints) {\n let list = this._list;\n\n if (syncPoints.length === 0) {\n return;\n }\n\n if (list.length > 0 && syncPoints[0].originalDts < list[list.length - 1].originalDts) {\n this.clear();\n }\n\n Array.prototype.push.apply(list, syncPoints);\n }\n\n getLastSyncPointBeforeDts(dts) {\n if (this._list.length == 0) {\n return null;\n }\n\n let list = this._list;\n let idx = 0;\n let last = list.length - 1;\n let mid = 0;\n let lbound = 0;\n let ubound = last;\n\n if (dts < list[0].dts) {\n idx = 0;\n lbound = ubound + 1;\n }\n\n while (lbound <= ubound) {\n mid = lbound + Math.floor((ubound - lbound) / 2);\n if (mid === last || (dts >= list[mid].dts && dts < list[mid + 1].dts)) {\n idx = mid;\n break;\n } else if (list[mid].dts < dts) {\n lbound = mid + 1;\n } else {\n ubound = mid - 1;\n }\n }\n return this._list[idx];\n }\n\n}\n\n// Data structure for recording information of media segments in single track.\nexport class MediaSegmentInfoList {\n\n constructor(type) {\n this._type = type;\n this._list = [];\n this._lastAppendLocation = -1; // cached last insert location\n }\n\n get type() {\n return this._type;\n }\n\n get length() {\n return this._list.length;\n }\n\n isEmpty() {\n return this._list.length === 0;\n }\n\n clear() {\n this._list = [];\n this._lastAppendLocation = -1;\n }\n\n _searchNearestSegmentBefore(originalBeginDts) {\n let list = this._list;\n if (list.length === 0) {\n return -2;\n }\n let last = list.length - 1;\n let mid = 0;\n let lbound = 0;\n let ubound = last;\n\n let idx = 0;\n\n if (originalBeginDts < list[0].originalBeginDts) {\n idx = -1;\n return idx;\n }\n\n while (lbound <= ubound) {\n mid = lbound + Math.floor((ubound - lbound) / 2);\n if (mid === last || (originalBeginDts > list[mid].lastSample.originalDts &&\n (originalBeginDts < list[mid + 1].originalBeginDts))) {\n idx = mid;\n break;\n } else if (list[mid].originalBeginDts < originalBeginDts) {\n lbound = mid + 1;\n } else {\n ubound = mid - 1;\n }\n }\n return idx;\n }\n\n _searchNearestSegmentAfter(originalBeginDts) {\n return this._searchNearestSegmentBefore(originalBeginDts) + 1;\n }\n\n append(mediaSegmentInfo) {\n let list = this._list;\n let msi = mediaSegmentInfo;\n let lastAppendIdx = this._lastAppendLocation;\n let insertIdx = 0;\n\n if (lastAppendIdx !== -1 && lastAppendIdx < list.length &&\n msi.originalBeginDts >= list[lastAppendIdx].lastSample.originalDts &&\n ((lastAppendIdx === list.length - 1) ||\n (lastAppendIdx < list.length - 1 &&\n msi.originalBeginDts < list[lastAppendIdx + 1].originalBeginDts))) {\n insertIdx = lastAppendIdx + 1; // use cached location idx\n } else {\n if (list.length > 0) {\n insertIdx = this._searchNearestSegmentBefore(msi.originalBeginDts) + 1;\n }\n }\n\n this._lastAppendLocation = insertIdx;\n this._list.splice(insertIdx, 0, msi);\n }\n\n getLastSegmentBefore(originalBeginDts) {\n let idx = this._searchNearestSegmentBefore(originalBeginDts);\n if (idx >= 0) {\n return this._list[idx];\n } else { // -1\n return null;\n }\n }\n\n getLastSampleBefore(originalBeginDts) {\n let segment = this.getLastSegmentBefore(originalBeginDts);\n if (segment != null) {\n return segment.lastSample;\n } else {\n return null;\n }\n }\n\n getLastSyncPointBefore(originalBeginDts) {\n let segmentIdx = this._searchNearestSegmentBefore(originalBeginDts);\n let syncPoints = this._list[segmentIdx].syncPoints;\n while (syncPoints.length === 0 && segmentIdx > 0) {\n segmentIdx--;\n syncPoints = this._list[segmentIdx].syncPoints;\n }\n if (syncPoints.length > 0) {\n return syncPoints[syncPoints.length - 1];\n } else {\n return null;\n }\n }\n\n}","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport EventEmitter from 'events';\nimport Log from '../utils/logger.js';\nimport Browser from '../utils/browser.js';\nimport MSEEvents from './mse-events.js';\nimport {SampleInfo, IDRSampleList} from './media-segment-info.js';\nimport {IllegalStateException} from '../utils/exception.js';\n\n// Media Source Extensions controller\nclass MSEController {\n\n constructor(config) {\n this.TAG = 'MSEController';\n\n this._config = config;\n this._emitter = new EventEmitter();\n\n if (this._config.isLive && this._config.autoCleanupSourceBuffer == undefined) {\n // For live stream, do auto cleanup by default\n this._config.autoCleanupSourceBuffer = true;\n }\n\n this.e = {\n onSourceOpen: this._onSourceOpen.bind(this),\n onSourceEnded: this._onSourceEnded.bind(this),\n onSourceClose: this._onSourceClose.bind(this),\n onSourceBufferError: this._onSourceBufferError.bind(this),\n onSourceBufferUpdateEnd: this._onSourceBufferUpdateEnd.bind(this)\n };\n\n this._mediaSource = null;\n this._mediaSourceObjectURL = null;\n this._mediaElement = null;\n\n this._isBufferFull = false;\n this._hasPendingEos = false;\n\n this._requireSetMediaDuration = false;\n this._pendingMediaDuration = 0;\n\n this._pendingSourceBufferInit = [];\n this._mimeTypes = {\n video: null,\n audio: null\n };\n this._sourceBuffers = {\n video: null,\n audio: null\n };\n this._lastInitSegments = {\n video: null,\n audio: null\n };\n this._pendingSegments = {\n video: [],\n audio: []\n };\n this._pendingRemoveRanges = {\n video: [],\n audio: []\n };\n this._idrList = new IDRSampleList();\n }\n\n destroy() {\n if (this._mediaElement || this._mediaSource) {\n this.detachMediaElement();\n }\n this.e = null;\n this._emitter.removeAllListeners();\n this._emitter = null;\n }\n\n on(event, listener) {\n this._emitter.addListener(event, listener);\n }\n\n off(event, listener) {\n this._emitter.removeListener(event, listener);\n }\n\n attachMediaElement(mediaElement) {\n if (this._mediaSource) {\n throw new IllegalStateException('MediaSource has been attached to an HTMLMediaElement!');\n }\n let ms = this._mediaSource = new window.MediaSource();\n ms.addEventListener('sourceopen', this.e.onSourceOpen);\n ms.addEventListener('sourceended', this.e.onSourceEnded);\n ms.addEventListener('sourceclose', this.e.onSourceClose);\n\n this._mediaElement = mediaElement;\n this._mediaSourceObjectURL = window.URL.createObjectURL(this._mediaSource);\n mediaElement.src = this._mediaSourceObjectURL;\n }\n\n detachMediaElement() {\n if (this._mediaSource) {\n let ms = this._mediaSource;\n for (let type in this._sourceBuffers) {\n // pending segments should be discard\n let ps = this._pendingSegments[type];\n ps.splice(0, ps.length);\n this._pendingSegments[type] = null;\n this._pendingRemoveRanges[type] = null;\n this._lastInitSegments[type] = null;\n\n // remove all sourcebuffers\n let sb = this._sourceBuffers[type];\n if (sb) {\n if (ms.readyState !== 'closed') {\n // ms edge can throw an error: Unexpected call to method or property access\n try {\n ms.removeSourceBuffer(sb);\n } catch (error) {\n Log.e(this.TAG, error.message);\n }\n sb.removeEventListener('error', this.e.onSourceBufferError);\n sb.removeEventListener('updateend', this.e.onSourceBufferUpdateEnd);\n }\n this._mimeTypes[type] = null;\n this._sourceBuffers[type] = null;\n }\n }\n if (ms.readyState === 'open') {\n try {\n ms.endOfStream();\n } catch (error) {\n Log.e(this.TAG, error.message);\n }\n }\n ms.removeEventListener('sourceopen', this.e.onSourceOpen);\n ms.removeEventListener('sourceended', this.e.onSourceEnded);\n ms.removeEventListener('sourceclose', this.e.onSourceClose);\n this._pendingSourceBufferInit = [];\n this._isBufferFull = false;\n this._idrList.clear();\n this._mediaSource = null;\n }\n\n if (this._mediaElement) {\n this._mediaElement.src = '';\n this._mediaElement.removeAttribute('src');\n this._mediaElement = null;\n }\n if (this._mediaSourceObjectURL) {\n window.URL.revokeObjectURL(this._mediaSourceObjectURL);\n this._mediaSourceObjectURL = null;\n }\n }\n\n appendInitSegment(initSegment, deferred) {\n if (!this._mediaSource || this._mediaSource.readyState !== 'open') {\n // sourcebuffer creation requires mediaSource.readyState === 'open'\n // so we defer the sourcebuffer creation, until sourceopen event triggered\n this._pendingSourceBufferInit.push(initSegment);\n // make sure that this InitSegment is in the front of pending segments queue\n this._pendingSegments[initSegment.type].push(initSegment);\n return;\n }\n\n let is = initSegment;\n let mimeType = `${is.container}`;\n if (is.codec && is.codec.length > 0) {\n mimeType += `;codecs=${is.codec}`;\n }\n\n let firstInitSegment = false;\n\n Log.v(this.TAG, 'Received Initialization Segment, mimeType: ' + mimeType);\n this._lastInitSegments[is.type] = is;\n\n if (mimeType !== this._mimeTypes[is.type]) {\n if (!this._mimeTypes[is.type]) { // empty, first chance create sourcebuffer\n firstInitSegment = true;\n try {\n let sb = this._sourceBuffers[is.type] = this._mediaSource.addSourceBuffer(mimeType);\n sb.addEventListener('error', this.e.onSourceBufferError);\n sb.addEventListener('updateend', this.e.onSourceBufferUpdateEnd);\n } catch (error) {\n Log.e(this.TAG, error.message);\n this._emitter.emit(MSEEvents.ERROR, {code: error.code, msg: error.message});\n return;\n }\n } else {\n Log.v(this.TAG, `Notice: ${is.type} mimeType changed, origin: ${this._mimeTypes[is.type]}, target: ${mimeType}`);\n }\n this._mimeTypes[is.type] = mimeType;\n }\n\n if (!deferred) {\n // deferred means this InitSegment has been pushed to pendingSegments queue\n this._pendingSegments[is.type].push(is);\n }\n if (!firstInitSegment) { // append immediately only if init segment in subsequence\n if (this._sourceBuffers[is.type] && !this._sourceBuffers[is.type].updating) {\n this._doAppendSegments();\n }\n }\n if (Browser.safari && is.container === 'audio/mpeg' && is.mediaDuration > 0) {\n // 'audio/mpeg' track under Safari may cause MediaElement's duration to be NaN\n // Manually correct MediaSource.duration to make progress bar seekable, and report right duration\n this._requireSetMediaDuration = true;\n this._pendingMediaDuration = is.mediaDuration / 1000; // in seconds\n this._updateMediaSourceDuration();\n }\n }\n\n appendMediaSegment(mediaSegment) {\n let ms = mediaSegment;\n this._pendingSegments[ms.type].push(ms);\n\n if (this._config.autoCleanupSourceBuffer && this._needCleanupSourceBuffer()) {\n this._doCleanupSourceBuffer();\n }\n\n let sb = this._sourceBuffers[ms.type];\n if (sb && !sb.updating && !this._hasPendingRemoveRanges()) {\n this._doAppendSegments();\n }\n }\n\n seek(seconds) {\n // remove all appended buffers\n for (let type in this._sourceBuffers) {\n if (!this._sourceBuffers[type]) {\n continue;\n }\n\n // abort current buffer append algorithm\n let sb = this._sourceBuffers[type];\n if (this._mediaSource.readyState === 'open') {\n try {\n // If range removal algorithm is running, InvalidStateError will be throwed\n // Ignore it.\n sb.abort();\n } catch (error) {\n Log.e(this.TAG, error.message);\n }\n }\n\n // IDRList should be clear\n this._idrList.clear();\n\n // pending segments should be discard\n let ps = this._pendingSegments[type];\n ps.splice(0, ps.length);\n\n if (this._mediaSource.readyState === 'closed') {\n // Parent MediaSource object has been detached from HTMLMediaElement\n continue;\n }\n\n // record ranges to be remove from SourceBuffer\n for (let i = 0; i < sb.buffered.length; i++) {\n let start = sb.buffered.start(i);\n let end = sb.buffered.end(i);\n this._pendingRemoveRanges[type].push({start, end});\n }\n\n // if sb is not updating, let's remove ranges now!\n if (!sb.updating) {\n this._doRemoveRanges();\n }\n\n // Safari 10 may get InvalidStateError in the later appendBuffer() after SourceBuffer.remove() call\n // Internal parser's state may be invalid at this time. Re-append last InitSegment to workaround.\n // Related issue: https://bugs.webkit.org/show_bug.cgi?id=159230\n if (Browser.safari) {\n let lastInitSegment = this._lastInitSegments[type];\n if (lastInitSegment) {\n this._pendingSegments[type].push(lastInitSegment);\n if (!sb.updating) {\n this._doAppendSegments();\n }\n }\n }\n }\n }\n\n endOfStream() {\n let ms = this._mediaSource;\n let sb = this._sourceBuffers;\n if (!ms || ms.readyState !== 'open') {\n if (ms && ms.readyState === 'closed' && this._hasPendingSegments()) {\n // If MediaSource hasn't turned into open state, and there're pending segments\n // Mark pending endOfStream, defer call until all pending segments appended complete\n this._hasPendingEos = true;\n }\n return;\n }\n if (sb.video && sb.video.updating || sb.audio && sb.audio.updating) {\n // If any sourcebuffer is updating, defer endOfStream operation\n // See _onSourceBufferUpdateEnd()\n this._hasPendingEos = true;\n } else {\n this._hasPendingEos = false;\n // Notify media data loading complete\n // This is helpful for correcting total duration to match last media segment\n // Otherwise MediaElement's ended event may not be triggered\n ms.endOfStream();\n }\n }\n\n getNearestKeyframe(dts) {\n return this._idrList.getLastSyncPointBeforeDts(dts);\n }\n\n _needCleanupSourceBuffer() {\n if (!this._config.autoCleanupSourceBuffer) {\n return false;\n }\n\n let currentTime = this._mediaElement.currentTime;\n\n for (let type in this._sourceBuffers) {\n let sb = this._sourceBuffers[type];\n if (sb) {\n let buffered = sb.buffered;\n if (buffered.length >= 1) {\n if (currentTime - buffered.start(0) >= this._config.autoCleanupMaxBackwardDuration) {\n return true;\n }\n }\n }\n }\n\n return false;\n }\n\n _doCleanupSourceBuffer() {\n let currentTime = this._mediaElement.currentTime;\n\n for (let type in this._sourceBuffers) {\n let sb = this._sourceBuffers[type];\n if (sb) {\n let buffered = sb.buffered;\n let doRemove = false;\n\n for (let i = 0; i < buffered.length; i++) {\n let start = buffered.start(i);\n let end = buffered.end(i);\n\n if (start <= currentTime && currentTime < end + 3) { // padding 3 seconds\n if (currentTime - start >= this._config.autoCleanupMaxBackwardDuration) {\n doRemove = true;\n let removeEnd = currentTime - this._config.autoCleanupMinBackwardDuration;\n this._pendingRemoveRanges[type].push({start: start, end: removeEnd});\n }\n } else if (end < currentTime) {\n doRemove = true;\n this._pendingRemoveRanges[type].push({start: start, end: end});\n }\n }\n\n if (doRemove && !sb.updating) {\n this._doRemoveRanges();\n }\n }\n }\n }\n\n _updateMediaSourceDuration() {\n let sb = this._sourceBuffers;\n if (this._mediaElement.readyState === 0 || this._mediaSource.readyState !== 'open') {\n return;\n }\n if ((sb.video && sb.video.updating) || (sb.audio && sb.audio.updating)) {\n return;\n }\n\n let current = this._mediaSource.duration;\n let target = this._pendingMediaDuration;\n\n if (target > 0 && (isNaN(current) || target > current)) {\n Log.v(this.TAG, `Update MediaSource duration from ${current} to ${target}`);\n this._mediaSource.duration = target;\n }\n\n this._requireSetMediaDuration = false;\n this._pendingMediaDuration = 0;\n }\n\n _doRemoveRanges() {\n for (let type in this._pendingRemoveRanges) {\n if (!this._sourceBuffers[type] || this._sourceBuffers[type].updating) {\n continue;\n }\n let sb = this._sourceBuffers[type];\n let ranges = this._pendingRemoveRanges[type];\n while (ranges.length && !sb.updating) {\n let range = ranges.shift();\n sb.remove(range.start, range.end);\n }\n }\n }\n\n _doAppendSegments() {\n let pendingSegments = this._pendingSegments;\n\n for (let type in pendingSegments) {\n if (!this._sourceBuffers[type] || this._sourceBuffers[type].updating) {\n continue;\n }\n\n if (pendingSegments[type].length > 0) {\n let segment = pendingSegments[type].shift();\n\n if (segment.timestampOffset) {\n // For MPEG audio stream in MSE, if unbuffered-seeking occurred\n // We need explicitly set timestampOffset to the desired point in timeline for mpeg SourceBuffer.\n let currentOffset = this._sourceBuffers[type].timestampOffset;\n let targetOffset = segment.timestampOffset / 1000; // in seconds\n\n let delta = Math.abs(currentOffset - targetOffset);\n if (delta > 0.1) { // If time delta > 100ms\n Log.v(this.TAG, `Update MPEG audio timestampOffset from ${currentOffset} to ${targetOffset}`);\n this._sourceBuffers[type].timestampOffset = targetOffset;\n }\n delete segment.timestampOffset;\n }\n\n if (!segment.data || segment.data.byteLength === 0) {\n // Ignore empty buffer\n continue;\n }\n\n try {\n this._sourceBuffers[type].appendBuffer(segment.data);\n this._isBufferFull = false;\n if (type === 'video' && segment.hasOwnProperty('info')) {\n this._idrList.appendArray(segment.info.syncPoints);\n }\n } catch (error) {\n this._pendingSegments[type].unshift(segment);\n if (error.code === 22) { // QuotaExceededError\n /* Notice that FireFox may not throw QuotaExceededError if SourceBuffer is full\n * Currently we can only do lazy-load to avoid SourceBuffer become scattered.\n * SourceBuffer eviction policy may be changed in future version of FireFox.\n *\n * Related issues:\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1279885\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1280023\n */\n\n // report buffer full, abort network IO\n if (!this._isBufferFull) {\n this._emitter.emit(MSEEvents.BUFFER_FULL);\n }\n this._isBufferFull = true;\n } else {\n Log.e(this.TAG, error.message);\n this._emitter.emit(MSEEvents.ERROR, {code: error.code, msg: error.message});\n }\n }\n }\n }\n }\n\n _onSourceOpen() {\n Log.v(this.TAG, 'MediaSource onSourceOpen');\n this._mediaSource.removeEventListener('sourceopen', this.e.onSourceOpen);\n // deferred sourcebuffer creation / initialization\n if (this._pendingSourceBufferInit.length > 0) {\n let pendings = this._pendingSourceBufferInit;\n while (pendings.length) {\n let segment = pendings.shift();\n this.appendInitSegment(segment, true);\n }\n }\n // there may be some pending media segments, append them\n if (this._hasPendingSegments()) {\n this._doAppendSegments();\n }\n this._emitter.emit(MSEEvents.SOURCE_OPEN);\n }\n\n _onSourceEnded() {\n // fired on endOfStream\n Log.v(this.TAG, 'MediaSource onSourceEnded');\n }\n\n _onSourceClose() {\n // fired on detaching from media element\n Log.v(this.TAG, 'MediaSource onSourceClose');\n if (this._mediaSource && this.e != null) {\n this._mediaSource.removeEventListener('sourceopen', this.e.onSourceOpen);\n this._mediaSource.removeEventListener('sourceended', this.e.onSourceEnded);\n this._mediaSource.removeEventListener('sourceclose', this.e.onSourceClose);\n }\n }\n\n _hasPendingSegments() {\n let ps = this._pendingSegments;\n return ps.video.length > 0 || ps.audio.length > 0;\n }\n\n _hasPendingRemoveRanges() {\n let prr = this._pendingRemoveRanges;\n return prr.video.length > 0 || prr.audio.length > 0;\n }\n\n _onSourceBufferUpdateEnd() {\n if (this._requireSetMediaDuration) {\n this._updateMediaSourceDuration();\n } else if (this._hasPendingRemoveRanges()) {\n this._doRemoveRanges();\n } else if (this._hasPendingSegments()) {\n this._doAppendSegments();\n } else if (this._hasPendingEos) {\n this.endOfStream();\n }\n this._emitter.emit(MSEEvents.UPDATE_END);\n }\n\n _onSourceBufferError(e) {\n Log.e(this.TAG, `SourceBuffer Error: ${e}`);\n // this error might not always be fatal, just ignore it\n }\n\n}\n\nexport default MSEController;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst MSEEvents = {\n ERROR: 'error',\n SOURCE_OPEN: 'source_open',\n UPDATE_END: 'update_end',\n BUFFER_FULL: 'buffer_full'\n};\n\nexport default MSEEvents;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport EventEmitter from 'events';\nimport work from 'webworkify-webpack';\nimport Log from '../utils/logger.js';\nimport LoggingControl from '../utils/logging-control.js';\nimport TransmuxingController from './transmuxing-controller.js';\nimport TransmuxingEvents from './transmuxing-events.js';\nimport TransmuxingWorker from './transmuxing-worker.js';\nimport MediaInfo from './media-info.js';\n\nclass Transmuxer {\n\n constructor(mediaDataSource, config) {\n this.TAG = 'Transmuxer';\n this._emitter = new EventEmitter();\n\n if (config.enableWorker && typeof (Worker) !== 'undefined') {\n try {\n this._worker = work(require.resolve('./transmuxing-worker'));\n this._workerDestroying = false;\n this._worker.addEventListener('message', this._onWorkerMessage.bind(this));\n this._worker.postMessage({cmd: 'init', param: [mediaDataSource, config]});\n this.e = {\n onLoggingConfigChanged: this._onLoggingConfigChanged.bind(this)\n };\n LoggingControl.registerListener(this.e.onLoggingConfigChanged);\n this._worker.postMessage({cmd: 'logging_config', param: LoggingControl.getConfig()});\n } catch (error) {\n Log.e(this.TAG, 'Error while initialize transmuxing worker, fallback to inline transmuxing');\n this._worker = null;\n this._controller = new TransmuxingController(mediaDataSource, config);\n }\n } else {\n this._controller = new TransmuxingController(mediaDataSource, config);\n }\n\n if (this._controller) {\n let ctl = this._controller;\n ctl.on(TransmuxingEvents.IO_ERROR, this._onIOError.bind(this));\n ctl.on(TransmuxingEvents.DEMUX_ERROR, this._onDemuxError.bind(this));\n ctl.on(TransmuxingEvents.INIT_SEGMENT, this._onInitSegment.bind(this));\n ctl.on(TransmuxingEvents.MEDIA_SEGMENT, this._onMediaSegment.bind(this));\n ctl.on(TransmuxingEvents.LOADING_COMPLETE, this._onLoadingComplete.bind(this));\n ctl.on(TransmuxingEvents.RECOVERED_EARLY_EOF, this._onRecoveredEarlyEof.bind(this));\n ctl.on(TransmuxingEvents.MEDIA_INFO, this._onMediaInfo.bind(this));\n ctl.on(TransmuxingEvents.METADATA_ARRIVED, this._onMetaDataArrived.bind(this));\n ctl.on(TransmuxingEvents.SCRIPTDATA_ARRIVED, this._onScriptDataArrived.bind(this));\n ctl.on(TransmuxingEvents.STATISTICS_INFO, this._onStatisticsInfo.bind(this));\n ctl.on(TransmuxingEvents.RECOMMEND_SEEKPOINT, this._onRecommendSeekpoint.bind(this));\n }\n }\n\n destroy() {\n if (this._worker) {\n if (!this._workerDestroying) {\n this._workerDestroying = true;\n this._worker.postMessage({cmd: 'destroy'});\n LoggingControl.removeListener(this.e.onLoggingConfigChanged);\n this.e = null;\n }\n } else {\n this._controller.destroy();\n this._controller = null;\n }\n this._emitter.removeAllListeners();\n this._emitter = null;\n }\n\n on(event, listener) {\n this._emitter.addListener(event, listener);\n }\n\n off(event, listener) {\n this._emitter.removeListener(event, listener);\n }\n\n hasWorker() {\n return this._worker != null;\n }\n\n open() {\n if (this._worker) {\n this._worker.postMessage({cmd: 'start'});\n } else {\n this._controller.start();\n }\n }\n\n close() {\n if (this._worker) {\n this._worker.postMessage({cmd: 'stop'});\n } else {\n this._controller.stop();\n }\n }\n\n seek(milliseconds) {\n if (this._worker) {\n this._worker.postMessage({cmd: 'seek', param: milliseconds});\n } else {\n this._controller.seek(milliseconds);\n }\n }\n\n pause() {\n if (this._worker) {\n this._worker.postMessage({cmd: 'pause'});\n } else {\n this._controller.pause();\n }\n }\n\n resume() {\n if (this._worker) {\n this._worker.postMessage({cmd: 'resume'});\n } else {\n this._controller.resume();\n }\n }\n\n _onInitSegment(type, initSegment) {\n // do async invoke\n Promise.resolve().then(() => {\n this._emitter.emit(TransmuxingEvents.INIT_SEGMENT, type, initSegment);\n });\n }\n\n _onMediaSegment(type, mediaSegment) {\n Promise.resolve().then(() => {\n this._emitter.emit(TransmuxingEvents.MEDIA_SEGMENT, type, mediaSegment);\n });\n }\n\n _onLoadingComplete() {\n Promise.resolve().then(() => {\n this._emitter.emit(TransmuxingEvents.LOADING_COMPLETE);\n });\n }\n\n _onRecoveredEarlyEof() {\n Promise.resolve().then(() => {\n this._emitter.emit(TransmuxingEvents.RECOVERED_EARLY_EOF);\n });\n }\n\n _onMediaInfo(mediaInfo) {\n Promise.resolve().then(() => {\n this._emitter.emit(TransmuxingEvents.MEDIA_INFO, mediaInfo);\n });\n }\n\n _onMetaDataArrived(metadata) {\n Promise.resolve().then(() => {\n this._emitter.emit(TransmuxingEvents.METADATA_ARRIVED, metadata);\n });\n }\n\n _onScriptDataArrived(data) {\n Promise.resolve().then(() => {\n this._emitter.emit(TransmuxingEvents.SCRIPTDATA_ARRIVED, data);\n });\n }\n\n _onStatisticsInfo(statisticsInfo) {\n Promise.resolve().then(() => {\n this._emitter.emit(TransmuxingEvents.STATISTICS_INFO, statisticsInfo);\n });\n }\n\n _onIOError(type, info) {\n Promise.resolve().then(() => {\n this._emitter.emit(TransmuxingEvents.IO_ERROR, type, info);\n });\n }\n\n _onDemuxError(type, info) {\n Promise.resolve().then(() => {\n this._emitter.emit(TransmuxingEvents.DEMUX_ERROR, type, info);\n });\n }\n\n _onRecommendSeekpoint(milliseconds) {\n Promise.resolve().then(() => {\n this._emitter.emit(TransmuxingEvents.RECOMMEND_SEEKPOINT, milliseconds);\n });\n }\n\n _onLoggingConfigChanged(config) {\n if (this._worker) {\n this._worker.postMessage({cmd: 'logging_config', param: config});\n }\n }\n\n _onWorkerMessage(e) {\n let message = e.data;\n let data = message.data;\n\n if (message.msg === 'destroyed' || this._workerDestroying) {\n this._workerDestroying = false;\n this._worker.terminate();\n this._worker = null;\n return;\n }\n\n switch (message.msg) {\n case TransmuxingEvents.INIT_SEGMENT:\n case TransmuxingEvents.MEDIA_SEGMENT:\n this._emitter.emit(message.msg, data.type, data.data);\n break;\n case TransmuxingEvents.LOADING_COMPLETE:\n case TransmuxingEvents.RECOVERED_EARLY_EOF:\n this._emitter.emit(message.msg);\n break;\n case TransmuxingEvents.MEDIA_INFO:\n Object.setPrototypeOf(data, MediaInfo.prototype);\n this._emitter.emit(message.msg, data);\n break;\n case TransmuxingEvents.METADATA_ARRIVED:\n case TransmuxingEvents.SCRIPTDATA_ARRIVED:\n case TransmuxingEvents.STATISTICS_INFO:\n this._emitter.emit(message.msg, data);\n break;\n case TransmuxingEvents.IO_ERROR:\n case TransmuxingEvents.DEMUX_ERROR:\n this._emitter.emit(message.msg, data.type, data.info);\n break;\n case TransmuxingEvents.RECOMMEND_SEEKPOINT:\n this._emitter.emit(message.msg, data);\n break;\n case 'logcat_callback':\n Log.emitter.emit('log', data.type, data.logcat);\n break;\n default:\n break;\n }\n }\n\n}\n\nexport default Transmuxer;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport EventEmitter from 'events';\nimport Log from '../utils/logger.js';\nimport Browser from '../utils/browser.js';\nimport MediaInfo from './media-info.js';\nimport FLVDemuxer from '../demux/flv-demuxer.js';\nimport MP4Remuxer from '../remux/mp4-remuxer.js';\nimport DemuxErrors from '../demux/demux-errors.js';\nimport IOController from '../io/io-controller.js';\nimport TransmuxingEvents from './transmuxing-events.js';\nimport {LoaderStatus, LoaderErrors} from '../io/loader.js';\n\n// Transmuxing (IO, Demuxing, Remuxing) controller, with multipart support\nclass TransmuxingController {\n\n constructor(mediaDataSource, config) {\n this.TAG = 'TransmuxingController';\n this._emitter = new EventEmitter();\n\n this._config = config;\n\n // treat single part media as multipart media, which has only one segment\n if (!mediaDataSource.segments) {\n mediaDataSource.segments = [{\n duration: mediaDataSource.duration,\n filesize: mediaDataSource.filesize,\n url: mediaDataSource.url\n }];\n }\n\n // fill in default IO params if not exists\n if (typeof mediaDataSource.cors !== 'boolean') {\n mediaDataSource.cors = true;\n }\n if (typeof mediaDataSource.withCredentials !== 'boolean') {\n mediaDataSource.withCredentials = false;\n }\n\n this._mediaDataSource = mediaDataSource;\n this._currentSegmentIndex = 0;\n let totalDuration = 0;\n\n this._mediaDataSource.segments.forEach((segment) => {\n // timestampBase for each segment, and calculate total duration\n segment.timestampBase = totalDuration;\n totalDuration += segment.duration;\n // params needed by IOController\n segment.cors = mediaDataSource.cors;\n segment.withCredentials = mediaDataSource.withCredentials;\n // referrer policy control, if exist\n if (config.referrerPolicy) {\n segment.referrerPolicy = config.referrerPolicy;\n }\n });\n\n if (!isNaN(totalDuration) && this._mediaDataSource.duration !== totalDuration) {\n this._mediaDataSource.duration = totalDuration;\n }\n\n this._mediaInfo = null;\n this._demuxer = null;\n this._remuxer = null;\n this._ioctl = null;\n\n this._pendingSeekTime = null;\n this._pendingResolveSeekPoint = null;\n\n this._statisticsReporter = null;\n }\n\n destroy() {\n this._mediaInfo = null;\n this._mediaDataSource = null;\n\n if (this._statisticsReporter) {\n this._disableStatisticsReporter();\n }\n if (this._ioctl) {\n this._ioctl.destroy();\n this._ioctl = null;\n }\n if (this._demuxer) {\n this._demuxer.destroy();\n this._demuxer = null;\n }\n if (this._remuxer) {\n this._remuxer.destroy();\n this._remuxer = null;\n }\n\n this._emitter.removeAllListeners();\n this._emitter = null;\n }\n\n on(event, listener) {\n this._emitter.addListener(event, listener);\n }\n\n off(event, listener) {\n this._emitter.removeListener(event, listener);\n }\n\n start() {\n this._loadSegment(0);\n this._enableStatisticsReporter();\n }\n\n _loadSegment(segmentIndex, optionalFrom) {\n this._currentSegmentIndex = segmentIndex;\n let dataSource = this._mediaDataSource.segments[segmentIndex];\n\n let ioctl = this._ioctl = new IOController(dataSource, this._config, segmentIndex);\n ioctl.onError = this._onIOException.bind(this);\n ioctl.onSeeked = this._onIOSeeked.bind(this);\n ioctl.onComplete = this._onIOComplete.bind(this);\n ioctl.onRedirect = this._onIORedirect.bind(this);\n ioctl.onRecoveredEarlyEof = this._onIORecoveredEarlyEof.bind(this);\n\n if (optionalFrom) {\n this._demuxer.bindDataSource(this._ioctl);\n } else {\n ioctl.onDataArrival = this._onInitChunkArrival.bind(this);\n }\n\n ioctl.open(optionalFrom);\n }\n\n stop() {\n this._internalAbort();\n this._disableStatisticsReporter();\n }\n\n _internalAbort() {\n if (this._ioctl) {\n this._ioctl.destroy();\n this._ioctl = null;\n }\n }\n\n pause() { // take a rest\n if (this._ioctl && this._ioctl.isWorking()) {\n this._ioctl.pause();\n this._disableStatisticsReporter();\n }\n }\n\n resume() {\n if (this._ioctl && this._ioctl.isPaused()) {\n this._ioctl.resume();\n this._enableStatisticsReporter();\n }\n }\n\n seek(milliseconds) {\n if (this._mediaInfo == null || !this._mediaInfo.isSeekable()) {\n return;\n }\n\n let targetSegmentIndex = this._searchSegmentIndexContains(milliseconds);\n\n if (targetSegmentIndex === this._currentSegmentIndex) {\n // intra-segment seeking\n let segmentInfo = this._mediaInfo.segments[targetSegmentIndex];\n\n if (segmentInfo == undefined) {\n // current segment loading started, but mediainfo hasn't received yet\n // wait for the metadata loaded, then seek to expected position\n this._pendingSeekTime = milliseconds;\n } else {\n let keyframe = segmentInfo.getNearestKeyframe(milliseconds);\n this._remuxer.seek(keyframe.milliseconds);\n this._ioctl.seek(keyframe.fileposition);\n // Will be resolved in _onRemuxerMediaSegmentArrival()\n this._pendingResolveSeekPoint = keyframe.milliseconds;\n }\n } else {\n // cross-segment seeking\n let targetSegmentInfo = this._mediaInfo.segments[targetSegmentIndex];\n\n if (targetSegmentInfo == undefined) {\n // target segment hasn't been loaded. We need metadata then seek to expected time\n this._pendingSeekTime = milliseconds;\n this._internalAbort();\n this._remuxer.seek();\n this._remuxer.insertDiscontinuity();\n this._loadSegment(targetSegmentIndex);\n // Here we wait for the metadata loaded, then seek to expected position\n } else {\n // We have target segment's metadata, direct seek to target position\n let keyframe = targetSegmentInfo.getNearestKeyframe(milliseconds);\n this._internalAbort();\n this._remuxer.seek(milliseconds);\n this._remuxer.insertDiscontinuity();\n this._demuxer.resetMediaInfo();\n this._demuxer.timestampBase = this._mediaDataSource.segments[targetSegmentIndex].timestampBase;\n this._loadSegment(targetSegmentIndex, keyframe.fileposition);\n this._pendingResolveSeekPoint = keyframe.milliseconds;\n this._reportSegmentMediaInfo(targetSegmentIndex);\n }\n }\n\n this._enableStatisticsReporter();\n }\n\n _searchSegmentIndexContains(milliseconds) {\n let segments = this._mediaDataSource.segments;\n let idx = segments.length - 1;\n\n for (let i = 0; i < segments.length; i++) {\n if (milliseconds < segments[i].timestampBase) {\n idx = i - 1;\n break;\n }\n }\n return idx;\n }\n\n _onInitChunkArrival(data, byteStart) {\n let probeData = null;\n let consumed = 0;\n\n if (byteStart > 0) {\n // IOController seeked immediately after opened, byteStart > 0 callback may received\n this._demuxer.bindDataSource(this._ioctl);\n this._demuxer.timestampBase = this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase;\n\n consumed = this._demuxer.parseChunks(data, byteStart);\n } else if ((probeData = FLVDemuxer.probe(data)).match) {\n // Always create new FLVDemuxer\n this._demuxer = new FLVDemuxer(probeData, this._config);\n\n if (!this._remuxer) {\n this._remuxer = new MP4Remuxer(this._config);\n }\n\n let mds = this._mediaDataSource;\n if (mds.duration != undefined && !isNaN(mds.duration)) {\n this._demuxer.overridedDuration = mds.duration;\n }\n if (typeof mds.hasAudio === 'boolean') {\n this._demuxer.overridedHasAudio = mds.hasAudio;\n }\n if (typeof mds.hasVideo === 'boolean') {\n this._demuxer.overridedHasVideo = mds.hasVideo;\n }\n\n this._demuxer.timestampBase = mds.segments[this._currentSegmentIndex].timestampBase;\n\n this._demuxer.onError = this._onDemuxException.bind(this);\n this._demuxer.onMediaInfo = this._onMediaInfo.bind(this);\n this._demuxer.onMetaDataArrived = this._onMetaDataArrived.bind(this);\n this._demuxer.onScriptDataArrived = this._onScriptDataArrived.bind(this);\n\n this._remuxer.bindDataSource(this._demuxer\n .bindDataSource(this._ioctl\n ));\n\n this._remuxer.onInitSegment = this._onRemuxerInitSegmentArrival.bind(this);\n this._remuxer.onMediaSegment = this._onRemuxerMediaSegmentArrival.bind(this);\n\n consumed = this._demuxer.parseChunks(data, byteStart);\n } else {\n probeData = null;\n Log.e(this.TAG, 'Non-FLV, Unsupported media type!');\n Promise.resolve().then(() => {\n this._internalAbort();\n });\n this._emitter.emit(TransmuxingEvents.DEMUX_ERROR, DemuxErrors.FORMAT_UNSUPPORTED, 'Non-FLV, Unsupported media type');\n\n consumed = 0;\n }\n\n return consumed;\n }\n\n _onMediaInfo(mediaInfo) {\n if (this._mediaInfo == null) {\n // Store first segment's mediainfo as global mediaInfo\n this._mediaInfo = Object.assign({}, mediaInfo);\n this._mediaInfo.keyframesIndex = null;\n this._mediaInfo.segments = [];\n this._mediaInfo.segmentCount = this._mediaDataSource.segments.length;\n Object.setPrototypeOf(this._mediaInfo, MediaInfo.prototype);\n }\n\n let segmentInfo = Object.assign({}, mediaInfo);\n Object.setPrototypeOf(segmentInfo, MediaInfo.prototype);\n this._mediaInfo.segments[this._currentSegmentIndex] = segmentInfo;\n\n // notify mediaInfo update\n this._reportSegmentMediaInfo(this._currentSegmentIndex);\n\n if (this._pendingSeekTime != null) {\n Promise.resolve().then(() => {\n let target = this._pendingSeekTime;\n this._pendingSeekTime = null;\n this.seek(target);\n });\n }\n }\n\n _onMetaDataArrived(metadata) {\n this._emitter.emit(TransmuxingEvents.METADATA_ARRIVED, metadata);\n }\n\n _onScriptDataArrived(data) {\n this._emitter.emit(TransmuxingEvents.SCRIPTDATA_ARRIVED, data);\n }\n\n _onIOSeeked() {\n this._remuxer.insertDiscontinuity();\n }\n\n _onIOComplete(extraData) {\n let segmentIndex = extraData;\n let nextSegmentIndex = segmentIndex + 1;\n\n if (nextSegmentIndex < this._mediaDataSource.segments.length) {\n this._internalAbort();\n this._remuxer.flushStashedSamples();\n this._loadSegment(nextSegmentIndex);\n } else {\n this._remuxer.flushStashedSamples();\n this._emitter.emit(TransmuxingEvents.LOADING_COMPLETE);\n this._disableStatisticsReporter();\n }\n }\n\n _onIORedirect(redirectedURL) {\n let segmentIndex = this._ioctl.extraData;\n this._mediaDataSource.segments[segmentIndex].redirectedURL = redirectedURL;\n }\n\n _onIORecoveredEarlyEof() {\n this._emitter.emit(TransmuxingEvents.RECOVERED_EARLY_EOF);\n }\n\n _onIOException(type, info) {\n Log.e(this.TAG, `IOException: type = ${type}, code = ${info.code}, msg = ${info.msg}`);\n this._emitter.emit(TransmuxingEvents.IO_ERROR, type, info);\n this._disableStatisticsReporter();\n }\n\n _onDemuxException(type, info) {\n Log.e(this.TAG, `DemuxException: type = ${type}, info = ${info}`);\n this._emitter.emit(TransmuxingEvents.DEMUX_ERROR, type, info);\n }\n\n _onRemuxerInitSegmentArrival(type, initSegment) {\n this._emitter.emit(TransmuxingEvents.INIT_SEGMENT, type, initSegment);\n }\n\n _onRemuxerMediaSegmentArrival(type, mediaSegment) {\n if (this._pendingSeekTime != null) {\n // Media segments after new-segment cross-seeking should be dropped.\n return;\n }\n this._emitter.emit(TransmuxingEvents.MEDIA_SEGMENT, type, mediaSegment);\n\n // Resolve pending seekPoint\n if (this._pendingResolveSeekPoint != null && type === 'video') {\n let syncPoints = mediaSegment.info.syncPoints;\n let seekpoint = this._pendingResolveSeekPoint;\n this._pendingResolveSeekPoint = null;\n\n // Safari: Pass PTS for recommend_seekpoint\n if (Browser.safari && syncPoints.length > 0 && syncPoints[0].originalDts === seekpoint) {\n seekpoint = syncPoints[0].pts;\n }\n // else: use original DTS (keyframe.milliseconds)\n\n this._emitter.emit(TransmuxingEvents.RECOMMEND_SEEKPOINT, seekpoint);\n }\n }\n\n _enableStatisticsReporter() {\n if (this._statisticsReporter == null) {\n this._statisticsReporter = self.setInterval(\n this._reportStatisticsInfo.bind(this),\n this._config.statisticsInfoReportInterval);\n }\n }\n\n _disableStatisticsReporter() {\n if (this._statisticsReporter) {\n self.clearInterval(this._statisticsReporter);\n this._statisticsReporter = null;\n }\n }\n\n _reportSegmentMediaInfo(segmentIndex) {\n let segmentInfo = this._mediaInfo.segments[segmentIndex];\n let exportInfo = Object.assign({}, segmentInfo);\n\n exportInfo.duration = this._mediaInfo.duration;\n exportInfo.segmentCount = this._mediaInfo.segmentCount;\n delete exportInfo.segments;\n delete exportInfo.keyframesIndex;\n\n this._emitter.emit(TransmuxingEvents.MEDIA_INFO, exportInfo);\n }\n\n _reportStatisticsInfo() {\n let info = {};\n\n info.url = this._ioctl.currentURL;\n info.hasRedirect = this._ioctl.hasRedirect;\n if (info.hasRedirect) {\n info.redirectedURL = this._ioctl.currentRedirectedURL;\n }\n\n info.speed = this._ioctl.currentSpeed;\n info.loaderType = this._ioctl.loaderType;\n info.currentSegmentIndex = this._currentSegmentIndex;\n info.totalSegmentCount = this._mediaDataSource.segments.length;\n\n this._emitter.emit(TransmuxingEvents.STATISTICS_INFO, info);\n }\n\n}\n\nexport default TransmuxingController;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst TransmuxingEvents = {\n IO_ERROR: 'io_error',\n DEMUX_ERROR: 'demux_error',\n INIT_SEGMENT: 'init_segment',\n MEDIA_SEGMENT: 'media_segment',\n LOADING_COMPLETE: 'loading_complete',\n RECOVERED_EARLY_EOF: 'recovered_early_eof',\n MEDIA_INFO: 'media_info',\n METADATA_ARRIVED: 'metadata_arrived',\n SCRIPTDATA_ARRIVED: 'scriptdata_arrived',\n STATISTICS_INFO: 'statistics_info',\n RECOMMEND_SEEKPOINT: 'recommend_seekpoint'\n};\n\nexport default TransmuxingEvents;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Log from '../utils/logger.js';\nimport LoggingControl from '../utils/logging-control.js';\nimport Polyfill from '../utils/polyfill.js';\nimport TransmuxingController from './transmuxing-controller.js';\nimport TransmuxingEvents from './transmuxing-events.js';\n\n/* post message to worker:\n data: {\n cmd: string\n param: any\n }\n\n receive message from worker:\n data: {\n msg: string,\n data: any\n }\n */\n\nlet TransmuxingWorker = function (self) {\n\n let TAG = 'TransmuxingWorker';\n let controller = null;\n let logcatListener = onLogcatCallback.bind(this);\n\n Polyfill.install();\n\n self.addEventListener('message', function (e) {\n switch (e.data.cmd) {\n case 'init':\n controller = new TransmuxingController(e.data.param[0], e.data.param[1]);\n controller.on(TransmuxingEvents.IO_ERROR, onIOError.bind(this));\n controller.on(TransmuxingEvents.DEMUX_ERROR, onDemuxError.bind(this));\n controller.on(TransmuxingEvents.INIT_SEGMENT, onInitSegment.bind(this));\n controller.on(TransmuxingEvents.MEDIA_SEGMENT, onMediaSegment.bind(this));\n controller.on(TransmuxingEvents.LOADING_COMPLETE, onLoadingComplete.bind(this));\n controller.on(TransmuxingEvents.RECOVERED_EARLY_EOF, onRecoveredEarlyEof.bind(this));\n controller.on(TransmuxingEvents.MEDIA_INFO, onMediaInfo.bind(this));\n controller.on(TransmuxingEvents.METADATA_ARRIVED, onMetaDataArrived.bind(this));\n controller.on(TransmuxingEvents.SCRIPTDATA_ARRIVED, onScriptDataArrived.bind(this));\n controller.on(TransmuxingEvents.STATISTICS_INFO, onStatisticsInfo.bind(this));\n controller.on(TransmuxingEvents.RECOMMEND_SEEKPOINT, onRecommendSeekpoint.bind(this));\n break;\n case 'destroy':\n if (controller) {\n controller.destroy();\n controller = null;\n }\n self.postMessage({msg: 'destroyed'});\n break;\n case 'start':\n controller.start();\n break;\n case 'stop':\n controller.stop();\n break;\n case 'seek':\n controller.seek(e.data.param);\n break;\n case 'pause':\n controller.pause();\n break;\n case 'resume':\n controller.resume();\n break;\n case 'logging_config': {\n let config = e.data.param;\n LoggingControl.applyConfig(config);\n\n if (config.enableCallback === true) {\n LoggingControl.addLogListener(logcatListener);\n } else {\n LoggingControl.removeLogListener(logcatListener);\n }\n break;\n }\n }\n });\n\n function onInitSegment(type, initSegment) {\n let obj = {\n msg: TransmuxingEvents.INIT_SEGMENT,\n data: {\n type: type,\n data: initSegment\n }\n };\n self.postMessage(obj, [initSegment.data]); // data: ArrayBuffer\n }\n\n function onMediaSegment(type, mediaSegment) {\n let obj = {\n msg: TransmuxingEvents.MEDIA_SEGMENT,\n data: {\n type: type,\n data: mediaSegment\n }\n };\n self.postMessage(obj, [mediaSegment.data]); // data: ArrayBuffer\n }\n\n function onLoadingComplete() {\n let obj = {\n msg: TransmuxingEvents.LOADING_COMPLETE\n };\n self.postMessage(obj);\n }\n\n function onRecoveredEarlyEof() {\n let obj = {\n msg: TransmuxingEvents.RECOVERED_EARLY_EOF\n };\n self.postMessage(obj);\n }\n\n function onMediaInfo(mediaInfo) {\n let obj = {\n msg: TransmuxingEvents.MEDIA_INFO,\n data: mediaInfo\n };\n self.postMessage(obj);\n }\n\n function onMetaDataArrived(metadata) {\n let obj = {\n msg: TransmuxingEvents.METADATA_ARRIVED,\n data: metadata\n };\n self.postMessage(obj);\n }\n\n function onScriptDataArrived(data) {\n let obj = {\n msg: TransmuxingEvents.SCRIPTDATA_ARRIVED,\n data: data\n };\n self.postMessage(obj);\n }\n\n function onStatisticsInfo(statInfo) {\n let obj = {\n msg: TransmuxingEvents.STATISTICS_INFO,\n data: statInfo\n };\n self.postMessage(obj);\n }\n\n function onIOError(type, info) {\n self.postMessage({\n msg: TransmuxingEvents.IO_ERROR,\n data: {\n type: type,\n info: info\n }\n });\n }\n\n function onDemuxError(type, info) {\n self.postMessage({\n msg: TransmuxingEvents.DEMUX_ERROR,\n data: {\n type: type,\n info: info\n }\n });\n }\n\n function onRecommendSeekpoint(milliseconds) {\n self.postMessage({\n msg: TransmuxingEvents.RECOMMEND_SEEKPOINT,\n data: milliseconds\n });\n }\n\n function onLogcatCallback(type, str) {\n self.postMessage({\n msg: 'logcat_callback',\n data: {\n type: type,\n logcat: str\n }\n });\n }\n\n};\n\nexport default TransmuxingWorker;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Log from '../utils/logger.js';\nimport decodeUTF8 from '../utils/utf8-conv.js';\nimport {IllegalStateException} from '../utils/exception.js';\n\nlet le = (function () {\n let buf = new ArrayBuffer(2);\n (new DataView(buf)).setInt16(0, 256, true); // little-endian write\n return (new Int16Array(buf))[0] === 256; // platform-spec read, if equal then LE\n})();\n\nclass AMF {\n\n static parseScriptData(arrayBuffer, dataOffset, dataSize) {\n let data = {};\n\n try {\n let name = AMF.parseValue(arrayBuffer, dataOffset, dataSize);\n let value = AMF.parseValue(arrayBuffer, dataOffset + name.size, dataSize - name.size);\n\n data[name.data] = value.data;\n } catch (e) {\n Log.e('AMF', e.toString());\n }\n\n return data;\n }\n\n static parseObject(arrayBuffer, dataOffset, dataSize) {\n if (dataSize < 3) {\n throw new IllegalStateException('Data not enough when parse ScriptDataObject');\n }\n let name = AMF.parseString(arrayBuffer, dataOffset, dataSize);\n let value = AMF.parseValue(arrayBuffer, dataOffset + name.size, dataSize - name.size);\n let isObjectEnd = value.objectEnd;\n\n return {\n data: {\n name: name.data,\n value: value.data\n },\n size: name.size + value.size,\n objectEnd: isObjectEnd\n };\n }\n\n static parseVariable(arrayBuffer, dataOffset, dataSize) {\n return AMF.parseObject(arrayBuffer, dataOffset, dataSize);\n }\n\n static parseString(arrayBuffer, dataOffset, dataSize) {\n if (dataSize < 2) {\n throw new IllegalStateException('Data not enough when parse String');\n }\n let v = new DataView(arrayBuffer, dataOffset, dataSize);\n let length = v.getUint16(0, !le);\n\n let str;\n if (length > 0) {\n str = decodeUTF8(new Uint8Array(arrayBuffer, dataOffset + 2, length));\n } else {\n str = '';\n }\n\n return {\n data: str,\n size: 2 + length\n };\n }\n\n static parseLongString(arrayBuffer, dataOffset, dataSize) {\n if (dataSize < 4) {\n throw new IllegalStateException('Data not enough when parse LongString');\n }\n let v = new DataView(arrayBuffer, dataOffset, dataSize);\n let length = v.getUint32(0, !le);\n\n let str;\n if (length > 0) {\n str = decodeUTF8(new Uint8Array(arrayBuffer, dataOffset + 4, length));\n } else {\n str = '';\n }\n\n return {\n data: str,\n size: 4 + length\n };\n }\n\n static parseDate(arrayBuffer, dataOffset, dataSize) {\n if (dataSize < 10) {\n throw new IllegalStateException('Data size invalid when parse Date');\n }\n let v = new DataView(arrayBuffer, dataOffset, dataSize);\n let timestamp = v.getFloat64(0, !le);\n let localTimeOffset = v.getInt16(8, !le);\n timestamp += localTimeOffset * 60 * 1000; // get UTC time\n\n return {\n data: new Date(timestamp),\n size: 8 + 2\n };\n }\n\n static parseValue(arrayBuffer, dataOffset, dataSize) {\n if (dataSize < 1) {\n throw new IllegalStateException('Data not enough when parse Value');\n }\n\n let v = new DataView(arrayBuffer, dataOffset, dataSize);\n\n let offset = 1;\n let type = v.getUint8(0);\n let value;\n let objectEnd = false;\n\n try {\n switch (type) {\n case 0: // Number(Double) type\n value = v.getFloat64(1, !le);\n offset += 8;\n break;\n case 1: { // Boolean type\n let b = v.getUint8(1);\n value = b ? true : false;\n offset += 1;\n break;\n }\n case 2: { // String type\n let amfstr = AMF.parseString(arrayBuffer, dataOffset + 1, dataSize - 1);\n value = amfstr.data;\n offset += amfstr.size;\n break;\n }\n case 3: { // Object(s) type\n value = {};\n let terminal = 0; // workaround for malformed Objects which has missing ScriptDataObjectEnd\n if ((v.getUint32(dataSize - 4, !le) & 0x00FFFFFF) === 9) {\n terminal = 3;\n }\n while (offset < dataSize - 4) { // 4 === type(UI8) + ScriptDataObjectEnd(UI24)\n let amfobj = AMF.parseObject(arrayBuffer, dataOffset + offset, dataSize - offset - terminal);\n if (amfobj.objectEnd)\n break;\n value[amfobj.data.name] = amfobj.data.value;\n offset += amfobj.size;\n }\n if (offset <= dataSize - 3) {\n let marker = v.getUint32(offset - 1, !le) & 0x00FFFFFF;\n if (marker === 9) {\n offset += 3;\n }\n }\n break;\n }\n case 8: { // ECMA array type (Mixed array)\n value = {};\n offset += 4; // ECMAArrayLength(UI32)\n let terminal = 0; // workaround for malformed MixedArrays which has missing ScriptDataObjectEnd\n if ((v.getUint32(dataSize - 4, !le) & 0x00FFFFFF) === 9) {\n terminal = 3;\n }\n while (offset < dataSize - 8) { // 8 === type(UI8) + ECMAArrayLength(UI32) + ScriptDataVariableEnd(UI24)\n let amfvar = AMF.parseVariable(arrayBuffer, dataOffset + offset, dataSize - offset - terminal);\n if (amfvar.objectEnd)\n break;\n value[amfvar.data.name] = amfvar.data.value;\n offset += amfvar.size;\n }\n if (offset <= dataSize - 3) {\n let marker = v.getUint32(offset - 1, !le) & 0x00FFFFFF;\n if (marker === 9) {\n offset += 3;\n }\n }\n break;\n }\n case 9: // ScriptDataObjectEnd\n value = undefined;\n offset = 1;\n objectEnd = true;\n break;\n case 10: { // Strict array type\n // ScriptDataValue[n]. NOTE: according to video_file_format_spec_v10_1.pdf\n value = [];\n let strictArrayLength = v.getUint32(1, !le);\n offset += 4;\n for (let i = 0; i < strictArrayLength; i++) {\n let val = AMF.parseValue(arrayBuffer, dataOffset + offset, dataSize - offset);\n value.push(val.data);\n offset += val.size;\n }\n break;\n }\n case 11: { // Date type\n let date = AMF.parseDate(arrayBuffer, dataOffset + 1, dataSize - 1);\n value = date.data;\n offset += date.size;\n break;\n }\n case 12: { // Long string type\n let amfLongStr = AMF.parseString(arrayBuffer, dataOffset + 1, dataSize - 1);\n value = amfLongStr.data;\n offset += amfLongStr.size;\n break;\n }\n default:\n // ignore and skip\n offset = dataSize;\n Log.w('AMF', 'Unsupported AMF value type ' + type);\n }\n } catch (e) {\n Log.e('AMF', e.toString());\n }\n\n return {\n data: value,\n size: offset,\n objectEnd: objectEnd\n };\n }\n\n}\n\nexport default AMF;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst DemuxErrors = {\n OK: 'OK',\n FORMAT_ERROR: 'FormatError',\n FORMAT_UNSUPPORTED: 'FormatUnsupported',\n CODEC_UNSUPPORTED: 'CodecUnsupported'\n};\n\nexport default DemuxErrors;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {IllegalStateException, InvalidArgumentException} from '../utils/exception.js';\n\n// Exponential-Golomb buffer decoder\nclass ExpGolomb {\n\n constructor(uint8array) {\n this.TAG = 'ExpGolomb';\n\n this._buffer = uint8array;\n this._buffer_index = 0;\n this._total_bytes = uint8array.byteLength;\n this._total_bits = uint8array.byteLength * 8;\n this._current_word = 0;\n this._current_word_bits_left = 0;\n }\n\n destroy() {\n this._buffer = null;\n }\n\n _fillCurrentWord() {\n let buffer_bytes_left = this._total_bytes - this._buffer_index;\n if (buffer_bytes_left <= 0)\n throw new IllegalStateException('ExpGolomb: _fillCurrentWord() but no bytes available');\n\n let bytes_read = Math.min(4, buffer_bytes_left);\n let word = new Uint8Array(4);\n word.set(this._buffer.subarray(this._buffer_index, this._buffer_index + bytes_read));\n this._current_word = new DataView(word.buffer).getUint32(0, false);\n\n this._buffer_index += bytes_read;\n this._current_word_bits_left = bytes_read * 8;\n }\n\n readBits(bits) {\n if (bits > 32)\n throw new InvalidArgumentException('ExpGolomb: readBits() bits exceeded max 32bits!');\n\n if (bits <= this._current_word_bits_left) {\n let result = this._current_word >>> (32 - bits);\n this._current_word <<= bits;\n this._current_word_bits_left -= bits;\n return result;\n }\n\n let result = this._current_word_bits_left ? this._current_word : 0;\n result = result >>> (32 - this._current_word_bits_left);\n let bits_need_left = bits - this._current_word_bits_left;\n\n this._fillCurrentWord();\n let bits_read_next = Math.min(bits_need_left, this._current_word_bits_left);\n\n let result2 = this._current_word >>> (32 - bits_read_next);\n this._current_word <<= bits_read_next;\n this._current_word_bits_left -= bits_read_next;\n\n result = (result << bits_read_next) | result2;\n return result;\n }\n\n readBool() {\n return this.readBits(1) === 1;\n }\n\n readByte() {\n return this.readBits(8);\n }\n\n _skipLeadingZero() {\n let zero_count;\n for (zero_count = 0; zero_count < this._current_word_bits_left; zero_count++) {\n if (0 !== (this._current_word & (0x80000000 >>> zero_count))) {\n this._current_word <<= zero_count;\n this._current_word_bits_left -= zero_count;\n return zero_count;\n }\n }\n this._fillCurrentWord();\n return zero_count + this._skipLeadingZero();\n }\n\n readUEG() { // unsigned exponential golomb\n let leading_zeros = this._skipLeadingZero();\n return this.readBits(leading_zeros + 1) - 1;\n }\n\n readSEG() { // signed exponential golomb\n let value = this.readUEG();\n if (value & 0x01) {\n return (value + 1) >>> 1;\n } else {\n return -1 * (value >>> 1);\n }\n }\n\n}\n\nexport default ExpGolomb;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Log from '../utils/logger.js';\nimport AMF from './amf-parser.js';\nimport SPSParser from './sps-parser.js';\nimport DemuxErrors from './demux-errors.js';\nimport MediaInfo from '../core/media-info.js';\nimport {IllegalStateException} from '../utils/exception.js';\n\nfunction Swap16(src) {\n return (((src >>> 8) & 0xFF) |\n ((src & 0xFF) << 8));\n}\n\nfunction Swap32(src) {\n return (((src & 0xFF000000) >>> 24) |\n ((src & 0x00FF0000) >>> 8) |\n ((src & 0x0000FF00) << 8) |\n ((src & 0x000000FF) << 24));\n}\n\nfunction ReadBig32(array, index) {\n return ((array[index] << 24) |\n (array[index + 1] << 16) |\n (array[index + 2] << 8) |\n (array[index + 3]));\n}\n\n\nclass FLVDemuxer {\n\n constructor(probeData, config) {\n this.TAG = 'FLVDemuxer';\n\n this._config = config;\n\n this._onError = null;\n this._onMediaInfo = null;\n this._onMetaDataArrived = null;\n this._onScriptDataArrived = null;\n this._onTrackMetadata = null;\n this._onDataAvailable = null;\n\n this._dataOffset = probeData.dataOffset;\n this._firstParse = true;\n this._dispatch = false;\n\n this._hasAudio = probeData.hasAudioTrack;\n this._hasVideo = probeData.hasVideoTrack;\n\n this._hasAudioFlagOverrided = false;\n this._hasVideoFlagOverrided = false;\n\n this._audioInitialMetadataDispatched = false;\n this._videoInitialMetadataDispatched = false;\n\n this._mediaInfo = new MediaInfo();\n this._mediaInfo.hasAudio = this._hasAudio;\n this._mediaInfo.hasVideo = this._hasVideo;\n this._metadata = null;\n this._audioMetadata = null;\n this._videoMetadata = null;\n\n this._naluLengthSize = 4;\n this._timestampBase = 0; // int32, in milliseconds\n this._timescale = 1000;\n this._duration = 0; // int32, in milliseconds\n this._durationOverrided = false;\n this._referenceFrameRate = {\n fixed: true,\n fps: 23.976,\n fps_num: 23976,\n fps_den: 1000\n };\n\n this._flvSoundRateTable = [5500, 11025, 22050, 44100, 48000];\n\n this._mpegSamplingRates = [\n 96000, 88200, 64000, 48000, 44100, 32000,\n 24000, 22050, 16000, 12000, 11025, 8000, 7350\n ];\n\n this._mpegAudioV10SampleRateTable = [44100, 48000, 32000, 0];\n this._mpegAudioV20SampleRateTable = [22050, 24000, 16000, 0];\n this._mpegAudioV25SampleRateTable = [11025, 12000, 8000, 0];\n\n this._mpegAudioL1BitRateTable = [0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, -1];\n this._mpegAudioL2BitRateTable = [0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, -1];\n this._mpegAudioL3BitRateTable = [0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1];\n\n this._videoTrack = {type: 'video', id: 1, sequenceNumber: 0, samples: [], length: 0};\n this._audioTrack = {type: 'audio', id: 2, sequenceNumber: 0, samples: [], length: 0};\n\n this._littleEndian = (function () {\n let buf = new ArrayBuffer(2);\n (new DataView(buf)).setInt16(0, 256, true); // little-endian write\n return (new Int16Array(buf))[0] === 256; // platform-spec read, if equal then LE\n })();\n }\n\n destroy() {\n this._mediaInfo = null;\n this._metadata = null;\n this._audioMetadata = null;\n this._videoMetadata = null;\n this._videoTrack = null;\n this._audioTrack = null;\n\n this._onError = null;\n this._onMediaInfo = null;\n this._onMetaDataArrived = null;\n this._onScriptDataArrived = null;\n this._onTrackMetadata = null;\n this._onDataAvailable = null;\n }\n\n static probe(buffer) {\n let data = new Uint8Array(buffer);\n let mismatch = {match: false};\n\n if (data[0] !== 0x46 || data[1] !== 0x4C || data[2] !== 0x56 || data[3] !== 0x01) {\n return mismatch;\n }\n\n let hasAudio = ((data[4] & 4) >>> 2) !== 0;\n let hasVideo = (data[4] & 1) !== 0;\n\n let offset = ReadBig32(data, 5);\n\n if (offset < 9) {\n return mismatch;\n }\n\n return {\n match: true,\n consumed: offset,\n dataOffset: offset,\n hasAudioTrack: hasAudio,\n hasVideoTrack: hasVideo\n };\n }\n\n bindDataSource(loader) {\n loader.onDataArrival = this.parseChunks.bind(this);\n return this;\n }\n\n // prototype: function(type: string, metadata: any): void\n get onTrackMetadata() {\n return this._onTrackMetadata;\n }\n\n set onTrackMetadata(callback) {\n this._onTrackMetadata = callback;\n }\n\n // prototype: function(mediaInfo: MediaInfo): void\n get onMediaInfo() {\n return this._onMediaInfo;\n }\n\n set onMediaInfo(callback) {\n this._onMediaInfo = callback;\n }\n\n get onMetaDataArrived() {\n return this._onMetaDataArrived;\n }\n\n set onMetaDataArrived(callback) {\n this._onMetaDataArrived = callback;\n }\n\n get onScriptDataArrived() {\n return this._onScriptDataArrived;\n }\n\n set onScriptDataArrived(callback) {\n this._onScriptDataArrived = callback;\n }\n\n // prototype: function(type: number, info: string): void\n get onError() {\n return this._onError;\n }\n\n set onError(callback) {\n this._onError = callback;\n }\n\n // prototype: function(videoTrack: any, audioTrack: any): void\n get onDataAvailable() {\n return this._onDataAvailable;\n }\n\n set onDataAvailable(callback) {\n this._onDataAvailable = callback;\n }\n\n // timestamp base for output samples, must be in milliseconds\n get timestampBase() {\n return this._timestampBase;\n }\n\n set timestampBase(base) {\n this._timestampBase = base;\n }\n\n get overridedDuration() {\n return this._duration;\n }\n\n // Force-override media duration. Must be in milliseconds, int32\n set overridedDuration(duration) {\n this._durationOverrided = true;\n this._duration = duration;\n this._mediaInfo.duration = duration;\n }\n\n // Force-override audio track present flag, boolean\n set overridedHasAudio(hasAudio) {\n this._hasAudioFlagOverrided = true;\n this._hasAudio = hasAudio;\n this._mediaInfo.hasAudio = hasAudio;\n }\n\n // Force-override video track present flag, boolean\n set overridedHasVideo(hasVideo) {\n this._hasVideoFlagOverrided = true;\n this._hasVideo = hasVideo;\n this._mediaInfo.hasVideo = hasVideo;\n }\n\n resetMediaInfo() {\n this._mediaInfo = new MediaInfo();\n }\n\n _isInitialMetadataDispatched() {\n if (this._hasAudio && this._hasVideo) { // both audio & video\n return this._audioInitialMetadataDispatched && this._videoInitialMetadataDispatched;\n }\n if (this._hasAudio && !this._hasVideo) { // audio only\n return this._audioInitialMetadataDispatched;\n }\n if (!this._hasAudio && this._hasVideo) { // video only\n return this._videoInitialMetadataDispatched;\n }\n return false;\n }\n\n // function parseChunks(chunk: ArrayBuffer, byteStart: number): number;\n parseChunks(chunk, byteStart) {\n if (!this._onError || !this._onMediaInfo || !this._onTrackMetadata || !this._onDataAvailable) {\n throw new IllegalStateException('Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified');\n }\n\n let offset = 0;\n let le = this._littleEndian;\n\n if (byteStart === 0) { // buffer with FLV header\n if (chunk.byteLength > 13) {\n let probeData = FLVDemuxer.probe(chunk);\n offset = probeData.dataOffset;\n } else {\n return 0;\n }\n }\n\n if (this._firstParse) { // handle PreviousTagSize0 before Tag1\n this._firstParse = false;\n if (byteStart + offset !== this._dataOffset) {\n Log.w(this.TAG, 'First time parsing but chunk byteStart invalid!');\n }\n\n let v = new DataView(chunk, offset);\n let prevTagSize0 = v.getUint32(0, !le);\n if (prevTagSize0 !== 0) {\n Log.w(this.TAG, 'PrevTagSize0 !== 0 !!!');\n }\n offset += 4;\n }\n\n while (offset < chunk.byteLength) {\n this._dispatch = true;\n\n let v = new DataView(chunk, offset);\n\n if (offset + 11 + 4 > chunk.byteLength) {\n // data not enough for parsing an flv tag\n break;\n }\n\n let tagType = v.getUint8(0);\n let dataSize = v.getUint32(0, !le) & 0x00FFFFFF;\n\n if (offset + 11 + dataSize + 4 > chunk.byteLength) {\n // data not enough for parsing actual data body\n break;\n }\n\n if (tagType !== 8 && tagType !== 9 && tagType !== 18) {\n Log.w(this.TAG, `Unsupported tag type ${tagType}, skipped`);\n // consume the whole tag (skip it)\n offset += 11 + dataSize + 4;\n continue;\n }\n\n let ts2 = v.getUint8(4);\n let ts1 = v.getUint8(5);\n let ts0 = v.getUint8(6);\n let ts3 = v.getUint8(7);\n\n let timestamp = ts0 | (ts1 << 8) | (ts2 << 16) | (ts3 << 24);\n\n let streamId = v.getUint32(7, !le) & 0x00FFFFFF;\n if (streamId !== 0) {\n Log.w(this.TAG, 'Meet tag which has StreamID != 0!');\n }\n\n let dataOffset = offset + 11;\n\n switch (tagType) {\n case 8: // Audio\n this._parseAudioData(chunk, dataOffset, dataSize, timestamp);\n break;\n case 9: // Video\n this._parseVideoData(chunk, dataOffset, dataSize, timestamp, byteStart + offset);\n break;\n case 18: // ScriptDataObject\n this._parseScriptData(chunk, dataOffset, dataSize);\n break;\n }\n\n let prevTagSize = v.getUint32(11 + dataSize, !le);\n if (prevTagSize !== 11 + dataSize) {\n Log.w(this.TAG, `Invalid PrevTagSize ${prevTagSize}`);\n }\n\n offset += 11 + dataSize + 4; // tagBody + dataSize + prevTagSize\n }\n\n // dispatch parsed frames to consumer (typically, the remuxer)\n if (this._isInitialMetadataDispatched()) {\n if (this._dispatch && (this._audioTrack.length || this._videoTrack.length)) {\n this._onDataAvailable(this._audioTrack, this._videoTrack);\n }\n }\n\n return offset; // consumed bytes, just equals latest offset index\n }\n\n _parseScriptData(arrayBuffer, dataOffset, dataSize) {\n let scriptData = AMF.parseScriptData(arrayBuffer, dataOffset, dataSize);\n\n if (scriptData.hasOwnProperty('onMetaData')) {\n if (scriptData.onMetaData == null || typeof scriptData.onMetaData !== 'object') {\n Log.w(this.TAG, 'Invalid onMetaData structure!');\n return;\n }\n if (this._metadata) {\n Log.w(this.TAG, 'Found another onMetaData tag!');\n }\n this._metadata = scriptData;\n let onMetaData = this._metadata.onMetaData;\n\n if (this._onMetaDataArrived) {\n this._onMetaDataArrived(Object.assign({}, onMetaData));\n }\n\n if (typeof onMetaData.hasAudio === 'boolean') { // hasAudio\n if (this._hasAudioFlagOverrided === false) {\n this._hasAudio = onMetaData.hasAudio;\n this._mediaInfo.hasAudio = this._hasAudio;\n }\n }\n if (typeof onMetaData.hasVideo === 'boolean') { // hasVideo\n if (this._hasVideoFlagOverrided === false) {\n this._hasVideo = onMetaData.hasVideo;\n this._mediaInfo.hasVideo = this._hasVideo;\n }\n }\n if (typeof onMetaData.audiodatarate === 'number') { // audiodatarate\n this._mediaInfo.audioDataRate = onMetaData.audiodatarate;\n }\n if (typeof onMetaData.videodatarate === 'number') { // videodatarate\n this._mediaInfo.videoDataRate = onMetaData.videodatarate;\n }\n if (typeof onMetaData.width === 'number') { // width\n this._mediaInfo.width = onMetaData.width;\n }\n if (typeof onMetaData.height === 'number') { // height\n this._mediaInfo.height = onMetaData.height;\n }\n if (typeof onMetaData.duration === 'number') { // duration\n if (!this._durationOverrided) {\n let duration = Math.floor(onMetaData.duration * this._timescale);\n this._duration = duration;\n this._mediaInfo.duration = duration;\n }\n } else {\n this._mediaInfo.duration = 0;\n }\n if (typeof onMetaData.framerate === 'number') { // framerate\n let fps_num = Math.floor(onMetaData.framerate * 1000);\n if (fps_num > 0) {\n let fps = fps_num / 1000;\n this._referenceFrameRate.fixed = true;\n this._referenceFrameRate.fps = fps;\n this._referenceFrameRate.fps_num = fps_num;\n this._referenceFrameRate.fps_den = 1000;\n this._mediaInfo.fps = fps;\n }\n }\n if (typeof onMetaData.keyframes === 'object') { // keyframes\n this._mediaInfo.hasKeyframesIndex = true;\n let keyframes = onMetaData.keyframes;\n this._mediaInfo.keyframesIndex = this._parseKeyframesIndex(keyframes);\n onMetaData.keyframes = null; // keyframes has been extracted, remove it\n } else {\n this._mediaInfo.hasKeyframesIndex = false;\n }\n this._dispatch = false;\n this._mediaInfo.metadata = onMetaData;\n Log.v(this.TAG, 'Parsed onMetaData');\n if (this._mediaInfo.isComplete()) {\n this._onMediaInfo(this._mediaInfo);\n }\n }\n\n if (Object.keys(scriptData).length > 0) {\n if (this._onScriptDataArrived) {\n this._onScriptDataArrived(Object.assign({}, scriptData));\n }\n }\n }\n\n _parseKeyframesIndex(keyframes) {\n let times = [];\n let filepositions = [];\n\n // ignore first keyframe which is actually AVC Sequence Header (AVCDecoderConfigurationRecord)\n for (let i = 1; i < keyframes.times.length; i++) {\n let time = this._timestampBase + Math.floor(keyframes.times[i] * 1000);\n times.push(time);\n filepositions.push(keyframes.filepositions[i]);\n }\n\n return {\n times: times,\n filepositions: filepositions\n };\n }\n\n _parseAudioData(arrayBuffer, dataOffset, dataSize, tagTimestamp) {\n if (dataSize <= 1) {\n Log.w(this.TAG, 'Flv: Invalid audio packet, missing SoundData payload!');\n return;\n }\n\n if (this._hasAudioFlagOverrided === true && this._hasAudio === false) {\n // If hasAudio: false indicated explicitly in MediaDataSource,\n // Ignore all the audio packets\n return;\n }\n\n let le = this._littleEndian;\n let v = new DataView(arrayBuffer, dataOffset, dataSize);\n\n let soundSpec = v.getUint8(0);\n\n let soundFormat = soundSpec >>> 4;\n if (soundFormat !== 2 && soundFormat !== 10) { // MP3 or AAC\n this._onError(DemuxErrors.CODEC_UNSUPPORTED, 'Flv: Unsupported audio codec idx: ' + soundFormat);\n return;\n }\n\n let soundRate = 0;\n let soundRateIndex = (soundSpec & 12) >>> 2;\n if (soundRateIndex >= 0 && soundRateIndex <= 4) {\n soundRate = this._flvSoundRateTable[soundRateIndex];\n } else {\n this._onError(DemuxErrors.FORMAT_ERROR, 'Flv: Invalid audio sample rate idx: ' + soundRateIndex);\n return;\n }\n\n let soundSize = (soundSpec & 2) >>> 1; // unused\n let soundType = (soundSpec & 1);\n\n\n let meta = this._audioMetadata;\n let track = this._audioTrack;\n\n if (!meta) {\n if (this._hasAudio === false && this._hasAudioFlagOverrided === false) {\n this._hasAudio = true;\n this._mediaInfo.hasAudio = true;\n }\n\n // initial metadata\n meta = this._audioMetadata = {};\n meta.type = 'audio';\n meta.id = track.id;\n meta.timescale = this._timescale;\n meta.duration = this._duration;\n meta.audioSampleRate = soundRate;\n meta.channelCount = (soundType === 0 ? 1 : 2);\n }\n\n if (soundFormat === 10) { // AAC\n let aacData = this._parseAACAudioData(arrayBuffer, dataOffset + 1, dataSize - 1);\n if (aacData == undefined) {\n return;\n }\n\n if (aacData.packetType === 0) { // AAC sequence header (AudioSpecificConfig)\n if (meta.config) {\n Log.w(this.TAG, 'Found another AudioSpecificConfig!');\n }\n let misc = aacData.data;\n meta.audioSampleRate = misc.samplingRate;\n meta.channelCount = misc.channelCount;\n meta.codec = misc.codec;\n meta.originalCodec = misc.originalCodec;\n meta.config = misc.config;\n // The decode result of an aac sample is 1024 PCM samples\n meta.refSampleDuration = 1024 / meta.audioSampleRate * meta.timescale;\n Log.v(this.TAG, 'Parsed AudioSpecificConfig');\n\n if (this._isInitialMetadataDispatched()) {\n // Non-initial metadata, force dispatch (or flush) parsed frames to remuxer\n if (this._dispatch && (this._audioTrack.length || this._videoTrack.length)) {\n this._onDataAvailable(this._audioTrack, this._videoTrack);\n }\n } else {\n this._audioInitialMetadataDispatched = true;\n }\n // then notify new metadata\n this._dispatch = false;\n this._onTrackMetadata('audio', meta);\n\n let mi = this._mediaInfo;\n mi.audioCodec = meta.originalCodec;\n mi.audioSampleRate = meta.audioSampleRate;\n mi.audioChannelCount = meta.channelCount;\n if (mi.hasVideo) {\n if (mi.videoCodec != null) {\n mi.mimeType = 'video/x-flv; codecs=\"' + mi.videoCodec + ',' + mi.audioCodec + '\"';\n }\n } else {\n mi.mimeType = 'video/x-flv; codecs=\"' + mi.audioCodec + '\"';\n }\n if (mi.isComplete()) {\n this._onMediaInfo(mi);\n }\n } else if (aacData.packetType === 1) { // AAC raw frame data\n let dts = this._timestampBase + tagTimestamp;\n let aacSample = {unit: aacData.data, length: aacData.data.byteLength, dts: dts, pts: dts};\n track.samples.push(aacSample);\n track.length += aacData.data.length;\n } else {\n Log.e(this.TAG, `Flv: Unsupported AAC data type ${aacData.packetType}`);\n }\n } else if (soundFormat === 2) { // MP3\n if (!meta.codec) {\n // We need metadata for mp3 audio track, extract info from frame header\n let misc = this._parseMP3AudioData(arrayBuffer, dataOffset + 1, dataSize - 1, true);\n if (misc == undefined) {\n return;\n }\n meta.audioSampleRate = misc.samplingRate;\n meta.channelCount = misc.channelCount;\n meta.codec = misc.codec;\n meta.originalCodec = misc.originalCodec;\n // The decode result of an mp3 sample is 1152 PCM samples\n meta.refSampleDuration = 1152 / meta.audioSampleRate * meta.timescale;\n Log.v(this.TAG, 'Parsed MPEG Audio Frame Header');\n\n this._audioInitialMetadataDispatched = true;\n this._onTrackMetadata('audio', meta);\n\n let mi = this._mediaInfo;\n mi.audioCodec = meta.codec;\n mi.audioSampleRate = meta.audioSampleRate;\n mi.audioChannelCount = meta.channelCount;\n mi.audioDataRate = misc.bitRate;\n if (mi.hasVideo) {\n if (mi.videoCodec != null) {\n mi.mimeType = 'video/x-flv; codecs=\"' + mi.videoCodec + ',' + mi.audioCodec + '\"';\n }\n } else {\n mi.mimeType = 'video/x-flv; codecs=\"' + mi.audioCodec + '\"';\n }\n if (mi.isComplete()) {\n this._onMediaInfo(mi);\n }\n }\n\n // This packet is always a valid audio packet, extract it\n let data = this._parseMP3AudioData(arrayBuffer, dataOffset + 1, dataSize - 1, false);\n if (data == undefined) {\n return;\n }\n let dts = this._timestampBase + tagTimestamp;\n let mp3Sample = {unit: data, length: data.byteLength, dts: dts, pts: dts};\n track.samples.push(mp3Sample);\n track.length += data.length;\n }\n }\n\n _parseAACAudioData(arrayBuffer, dataOffset, dataSize) {\n if (dataSize <= 1) {\n Log.w(this.TAG, 'Flv: Invalid AAC packet, missing AACPacketType or/and Data!');\n return;\n }\n\n let result = {};\n let array = new Uint8Array(arrayBuffer, dataOffset, dataSize);\n\n result.packetType = array[0];\n\n if (array[0] === 0) {\n result.data = this._parseAACAudioSpecificConfig(arrayBuffer, dataOffset + 1, dataSize - 1);\n } else {\n result.data = array.subarray(1);\n }\n\n return result;\n }\n\n _parseAACAudioSpecificConfig(arrayBuffer, dataOffset, dataSize) {\n let array = new Uint8Array(arrayBuffer, dataOffset, dataSize);\n let config = null;\n\n /* Audio Object Type:\n 0: Null\n 1: AAC Main\n 2: AAC LC\n 3: AAC SSR (Scalable Sample Rate)\n 4: AAC LTP (Long Term Prediction)\n 5: HE-AAC / SBR (Spectral Band Replication)\n 6: AAC Scalable\n */\n\n let audioObjectType = 0;\n let originalAudioObjectType = 0;\n let audioExtensionObjectType = null;\n let samplingIndex = 0;\n let extensionSamplingIndex = null;\n\n // 5 bits\n audioObjectType = originalAudioObjectType = array[0] >>> 3;\n // 4 bits\n samplingIndex = ((array[0] & 0x07) << 1) | (array[1] >>> 7);\n if (samplingIndex < 0 || samplingIndex >= this._mpegSamplingRates.length) {\n this._onError(DemuxErrors.FORMAT_ERROR, 'Flv: AAC invalid sampling frequency index!');\n return;\n }\n\n let samplingFrequence = this._mpegSamplingRates[samplingIndex];\n\n // 4 bits\n let channelConfig = (array[1] & 0x78) >>> 3;\n if (channelConfig < 0 || channelConfig >= 8) {\n this._onError(DemuxErrors.FORMAT_ERROR, 'Flv: AAC invalid channel configuration');\n return;\n }\n\n if (audioObjectType === 5) { // HE-AAC?\n // 4 bits\n extensionSamplingIndex = ((array[1] & 0x07) << 1) | (array[2] >>> 7);\n // 5 bits\n audioExtensionObjectType = (array[2] & 0x7C) >>> 2;\n }\n\n // workarounds for various browsers\n let userAgent = self.navigator.userAgent.toLowerCase();\n\n if (userAgent.indexOf('firefox') !== -1) {\n // firefox: use SBR (HE-AAC) if freq less than 24kHz\n if (samplingIndex >= 6) {\n audioObjectType = 5;\n config = new Array(4);\n extensionSamplingIndex = samplingIndex - 3;\n } else { // use LC-AAC\n audioObjectType = 2;\n config = new Array(2);\n extensionSamplingIndex = samplingIndex;\n }\n } else if (userAgent.indexOf('android') !== -1) {\n // android: always use LC-AAC\n audioObjectType = 2;\n config = new Array(2);\n extensionSamplingIndex = samplingIndex;\n } else {\n // for other browsers, e.g. chrome...\n // Always use HE-AAC to make it easier to switch aac codec profile\n audioObjectType = 5;\n extensionSamplingIndex = samplingIndex;\n config = new Array(4);\n\n if (samplingIndex >= 6) {\n extensionSamplingIndex = samplingIndex - 3;\n } else if (channelConfig === 1) { // Mono channel\n audioObjectType = 2;\n config = new Array(2);\n extensionSamplingIndex = samplingIndex;\n }\n }\n\n config[0] = audioObjectType << 3;\n config[0] |= (samplingIndex & 0x0F) >>> 1;\n config[1] = (samplingIndex & 0x0F) << 7;\n config[1] |= (channelConfig & 0x0F) << 3;\n if (audioObjectType === 5) {\n config[1] |= ((extensionSamplingIndex & 0x0F) >>> 1);\n config[2] = (extensionSamplingIndex & 0x01) << 7;\n // extended audio object type: force to 2 (LC-AAC)\n config[2] |= (2 << 2);\n config[3] = 0;\n }\n\n return {\n config: config,\n samplingRate: samplingFrequence,\n channelCount: channelConfig,\n codec: 'mp4a.40.' + audioObjectType,\n originalCodec: 'mp4a.40.' + originalAudioObjectType\n };\n }\n\n _parseMP3AudioData(arrayBuffer, dataOffset, dataSize, requestHeader) {\n if (dataSize < 4) {\n Log.w(this.TAG, 'Flv: Invalid MP3 packet, header missing!');\n return;\n }\n\n let le = this._littleEndian;\n let array = new Uint8Array(arrayBuffer, dataOffset, dataSize);\n let result = null;\n\n if (requestHeader) {\n if (array[0] !== 0xFF) {\n return;\n }\n let ver = (array[1] >>> 3) & 0x03;\n let layer = (array[1] & 0x06) >> 1;\n\n let bitrate_index = (array[2] & 0xF0) >>> 4;\n let sampling_freq_index = (array[2] & 0x0C) >>> 2;\n\n let channel_mode = (array[3] >>> 6) & 0x03;\n let channel_count = channel_mode !== 3 ? 2 : 1;\n\n let sample_rate = 0;\n let bit_rate = 0;\n let object_type = 34; // Layer-3, listed in MPEG-4 Audio Object Types\n\n let codec = 'mp3';\n\n switch (ver) {\n case 0: // MPEG 2.5\n sample_rate = this._mpegAudioV25SampleRateTable[sampling_freq_index];\n break;\n case 2: // MPEG 2\n sample_rate = this._mpegAudioV20SampleRateTable[sampling_freq_index];\n break;\n case 3: // MPEG 1\n sample_rate = this._mpegAudioV10SampleRateTable[sampling_freq_index];\n break;\n }\n\n switch (layer) {\n case 1: // Layer 3\n object_type = 34;\n if (bitrate_index < this._mpegAudioL3BitRateTable.length) {\n bit_rate = this._mpegAudioL3BitRateTable[bitrate_index];\n }\n break;\n case 2: // Layer 2\n object_type = 33;\n if (bitrate_index < this._mpegAudioL2BitRateTable.length) {\n bit_rate = this._mpegAudioL2BitRateTable[bitrate_index];\n }\n break;\n case 3: // Layer 1\n object_type = 32;\n if (bitrate_index < this._mpegAudioL1BitRateTable.length) {\n bit_rate = this._mpegAudioL1BitRateTable[bitrate_index];\n }\n break;\n }\n\n result = {\n bitRate: bit_rate,\n samplingRate: sample_rate,\n channelCount: channel_count,\n codec: codec,\n originalCodec: codec\n };\n } else {\n result = array;\n }\n\n return result;\n }\n\n _parseVideoData(arrayBuffer, dataOffset, dataSize, tagTimestamp, tagPosition) {\n if (dataSize <= 1) {\n Log.w(this.TAG, 'Flv: Invalid video packet, missing VideoData payload!');\n return;\n }\n\n if (this._hasVideoFlagOverrided === true && this._hasVideo === false) {\n // If hasVideo: false indicated explicitly in MediaDataSource,\n // Ignore all the video packets\n return;\n }\n\n let spec = (new Uint8Array(arrayBuffer, dataOffset, dataSize))[0];\n\n let frameType = (spec & 240) >>> 4;\n let codecId = spec & 15;\n\n if (codecId !== 7) {\n this._onError(DemuxErrors.CODEC_UNSUPPORTED, `Flv: Unsupported codec in video frame: ${codecId}`);\n return;\n }\n\n this._parseAVCVideoPacket(arrayBuffer, dataOffset + 1, dataSize - 1, tagTimestamp, tagPosition, frameType);\n }\n\n _parseAVCVideoPacket(arrayBuffer, dataOffset, dataSize, tagTimestamp, tagPosition, frameType) {\n if (dataSize < 4) {\n Log.w(this.TAG, 'Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime');\n return;\n }\n\n let le = this._littleEndian;\n let v = new DataView(arrayBuffer, dataOffset, dataSize);\n\n let packetType = v.getUint8(0);\n let cts_unsigned = v.getUint32(0, !le) & 0x00FFFFFF;\n let cts = (cts_unsigned << 8) >> 8; // convert to 24-bit signed int\n\n if (packetType === 0) { // AVCDecoderConfigurationRecord\n this._parseAVCDecoderConfigurationRecord(arrayBuffer, dataOffset + 4, dataSize - 4);\n } else if (packetType === 1) { // One or more Nalus\n this._parseAVCVideoData(arrayBuffer, dataOffset + 4, dataSize - 4, tagTimestamp, tagPosition, frameType, cts);\n } else if (packetType === 2) {\n // empty, AVC end of sequence\n } else {\n this._onError(DemuxErrors.FORMAT_ERROR, `Flv: Invalid video packet type ${packetType}`);\n return;\n }\n }\n\n _parseAVCDecoderConfigurationRecord(arrayBuffer, dataOffset, dataSize) {\n if (dataSize < 7) {\n Log.w(this.TAG, 'Flv: Invalid AVCDecoderConfigurationRecord, lack of data!');\n return;\n }\n\n let meta = this._videoMetadata;\n let track = this._videoTrack;\n let le = this._littleEndian;\n let v = new DataView(arrayBuffer, dataOffset, dataSize);\n\n if (!meta) {\n if (this._hasVideo === false && this._hasVideoFlagOverrided === false) {\n this._hasVideo = true;\n this._mediaInfo.hasVideo = true;\n }\n\n meta = this._videoMetadata = {};\n meta.type = 'video';\n meta.id = track.id;\n meta.timescale = this._timescale;\n meta.duration = this._duration;\n } else {\n if (typeof meta.avcc !== 'undefined') {\n Log.w(this.TAG, 'Found another AVCDecoderConfigurationRecord!');\n }\n }\n\n let version = v.getUint8(0); // configurationVersion\n let avcProfile = v.getUint8(1); // avcProfileIndication\n let profileCompatibility = v.getUint8(2); // profile_compatibility\n let avcLevel = v.getUint8(3); // AVCLevelIndication\n\n if (version !== 1 || avcProfile === 0) {\n this._onError(DemuxErrors.FORMAT_ERROR, 'Flv: Invalid AVCDecoderConfigurationRecord');\n return;\n }\n\n this._naluLengthSize = (v.getUint8(4) & 3) + 1; // lengthSizeMinusOne\n if (this._naluLengthSize !== 3 && this._naluLengthSize !== 4) { // holy shit!!!\n this._onError(DemuxErrors.FORMAT_ERROR, `Flv: Strange NaluLengthSizeMinusOne: ${this._naluLengthSize - 1}`);\n return;\n }\n\n let spsCount = v.getUint8(5) & 31; // numOfSequenceParameterSets\n if (spsCount === 0) {\n this._onError(DemuxErrors.FORMAT_ERROR, 'Flv: Invalid AVCDecoderConfigurationRecord: No SPS');\n return;\n } else if (spsCount > 1) {\n Log.w(this.TAG, `Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${spsCount}`);\n }\n\n let offset = 6;\n\n for (let i = 0; i < spsCount; i++) {\n let len = v.getUint16(offset, !le); // sequenceParameterSetLength\n offset += 2;\n\n if (len === 0) {\n continue;\n }\n\n // Notice: Nalu without startcode header (00 00 00 01)\n let sps = new Uint8Array(arrayBuffer, dataOffset + offset, len);\n offset += len;\n\n let config = SPSParser.parseSPS(sps);\n if (i !== 0) {\n // ignore other sps's config\n continue;\n }\n\n meta.codecWidth = config.codec_size.width;\n meta.codecHeight = config.codec_size.height;\n meta.presentWidth = config.present_size.width;\n meta.presentHeight = config.present_size.height;\n\n meta.profile = config.profile_string;\n meta.level = config.level_string;\n meta.bitDepth = config.bit_depth;\n meta.chromaFormat = config.chroma_format;\n meta.sarRatio = config.sar_ratio;\n meta.frameRate = config.frame_rate;\n\n if (config.frame_rate.fixed === false ||\n config.frame_rate.fps_num === 0 ||\n config.frame_rate.fps_den === 0) {\n meta.frameRate = this._referenceFrameRate;\n }\n\n let fps_den = meta.frameRate.fps_den;\n let fps_num = meta.frameRate.fps_num;\n meta.refSampleDuration = meta.timescale * (fps_den / fps_num);\n\n let codecArray = sps.subarray(1, 4);\n let codecString = 'avc1.';\n for (let j = 0; j < 3; j++) {\n let h = codecArray[j].toString(16);\n if (h.length < 2) {\n h = '0' + h;\n }\n codecString += h;\n }\n meta.codec = codecString;\n\n let mi = this._mediaInfo;\n mi.width = meta.codecWidth;\n mi.height = meta.codecHeight;\n mi.fps = meta.frameRate.fps;\n mi.profile = meta.profile;\n mi.level = meta.level;\n mi.refFrames = config.ref_frames;\n mi.chromaFormat = config.chroma_format_string;\n mi.sarNum = meta.sarRatio.width;\n mi.sarDen = meta.sarRatio.height;\n mi.videoCodec = codecString;\n\n if (mi.hasAudio) {\n if (mi.audioCodec != null) {\n mi.mimeType = 'video/x-flv; codecs=\"' + mi.videoCodec + ',' + mi.audioCodec + '\"';\n }\n } else {\n mi.mimeType = 'video/x-flv; codecs=\"' + mi.videoCodec + '\"';\n }\n if (mi.isComplete()) {\n this._onMediaInfo(mi);\n }\n }\n\n let ppsCount = v.getUint8(offset); // numOfPictureParameterSets\n if (ppsCount === 0) {\n this._onError(DemuxErrors.FORMAT_ERROR, 'Flv: Invalid AVCDecoderConfigurationRecord: No PPS');\n return;\n } else if (ppsCount > 1) {\n Log.w(this.TAG, `Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${ppsCount}`);\n }\n\n offset++;\n\n for (let i = 0; i < ppsCount; i++) {\n let len = v.getUint16(offset, !le); // pictureParameterSetLength\n offset += 2;\n\n if (len === 0) {\n continue;\n }\n\n // pps is useless for extracting video information\n offset += len;\n }\n\n meta.avcc = new Uint8Array(dataSize);\n meta.avcc.set(new Uint8Array(arrayBuffer, dataOffset, dataSize), 0);\n Log.v(this.TAG, 'Parsed AVCDecoderConfigurationRecord');\n\n if (this._isInitialMetadataDispatched()) {\n // flush parsed frames\n if (this._dispatch && (this._audioTrack.length || this._videoTrack.length)) {\n this._onDataAvailable(this._audioTrack, this._videoTrack);\n }\n } else {\n this._videoInitialMetadataDispatched = true;\n }\n // notify new metadata\n this._dispatch = false;\n this._onTrackMetadata('video', meta);\n }\n\n _parseAVCVideoData(arrayBuffer, dataOffset, dataSize, tagTimestamp, tagPosition, frameType, cts) {\n let le = this._littleEndian;\n let v = new DataView(arrayBuffer, dataOffset, dataSize);\n\n let units = [], length = 0;\n\n let offset = 0;\n const lengthSize = this._naluLengthSize;\n let dts = this._timestampBase + tagTimestamp;\n let keyframe = (frameType === 1); // from FLV Frame Type constants\n\n while (offset < dataSize) {\n if (offset + 4 >= dataSize) {\n Log.w(this.TAG, `Malformed Nalu near timestamp ${dts}, offset = ${offset}, dataSize = ${dataSize}`);\n break; // data not enough for next Nalu\n }\n // Nalu with length-header (AVC1)\n let naluSize = v.getUint32(offset, !le); // Big-Endian read\n if (lengthSize === 3) {\n naluSize >>>= 8;\n }\n if (naluSize > dataSize - lengthSize) {\n Log.w(this.TAG, `Malformed Nalus near timestamp ${dts}, NaluSize > DataSize!`);\n return;\n }\n\n let unitType = v.getUint8(offset + lengthSize) & 0x1F;\n\n if (unitType === 5) { // IDR\n keyframe = true;\n }\n\n let data = new Uint8Array(arrayBuffer, dataOffset + offset, lengthSize + naluSize);\n let unit = {type: unitType, data: data};\n units.push(unit);\n length += data.byteLength;\n\n offset += lengthSize + naluSize;\n }\n\n if (units.length) {\n let track = this._videoTrack;\n let avcSample = {\n units: units,\n length: length,\n isKeyframe: keyframe,\n dts: dts,\n cts: cts,\n pts: (dts + cts)\n };\n if (keyframe) {\n avcSample.fileposition = tagPosition;\n }\n track.samples.push(avcSample);\n track.length += length;\n }\n }\n\n}\n\nexport default FLVDemuxer;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport ExpGolomb from './exp-golomb.js';\n\nclass SPSParser {\n\n static _ebsp2rbsp(uint8array) {\n let src = uint8array;\n let src_length = src.byteLength;\n let dst = new Uint8Array(src_length);\n let dst_idx = 0;\n\n for (let i = 0; i < src_length; i++) {\n if (i >= 2) {\n // Unescape: Skip 0x03 after 00 00\n if (src[i] === 0x03 && src[i - 1] === 0x00 && src[i - 2] === 0x00) {\n continue;\n }\n }\n dst[dst_idx] = src[i];\n dst_idx++;\n }\n\n return new Uint8Array(dst.buffer, 0, dst_idx);\n }\n\n static parseSPS(uint8array) {\n let rbsp = SPSParser._ebsp2rbsp(uint8array);\n let gb = new ExpGolomb(rbsp);\n\n gb.readByte();\n let profile_idc = gb.readByte(); // profile_idc\n gb.readByte(); // constraint_set_flags[5] + reserved_zero[3]\n let level_idc = gb.readByte(); // level_idc\n gb.readUEG(); // seq_parameter_set_id\n\n let profile_string = SPSParser.getProfileString(profile_idc);\n let level_string = SPSParser.getLevelString(level_idc);\n let chroma_format_idc = 1;\n let chroma_format = 420;\n let chroma_format_table = [0, 420, 422, 444];\n let bit_depth = 8;\n\n if (profile_idc === 100 || profile_idc === 110 || profile_idc === 122 ||\n profile_idc === 244 || profile_idc === 44 || profile_idc === 83 ||\n profile_idc === 86 || profile_idc === 118 || profile_idc === 128 ||\n profile_idc === 138 || profile_idc === 144) {\n\n chroma_format_idc = gb.readUEG();\n if (chroma_format_idc === 3) {\n gb.readBits(1); // separate_colour_plane_flag\n }\n if (chroma_format_idc <= 3) {\n chroma_format = chroma_format_table[chroma_format_idc];\n }\n\n bit_depth = gb.readUEG() + 8; // bit_depth_luma_minus8\n gb.readUEG(); // bit_depth_chroma_minus8\n gb.readBits(1); // qpprime_y_zero_transform_bypass_flag\n if (gb.readBool()) { // seq_scaling_matrix_present_flag\n let scaling_list_count = (chroma_format_idc !== 3) ? 8 : 12;\n for (let i = 0; i < scaling_list_count; i++) {\n if (gb.readBool()) { // seq_scaling_list_present_flag\n if (i < 6) {\n SPSParser._skipScalingList(gb, 16);\n } else {\n SPSParser._skipScalingList(gb, 64);\n }\n }\n }\n }\n }\n gb.readUEG(); // log2_max_frame_num_minus4\n let pic_order_cnt_type = gb.readUEG();\n if (pic_order_cnt_type === 0) {\n gb.readUEG(); // log2_max_pic_order_cnt_lsb_minus_4\n } else if (pic_order_cnt_type === 1) {\n gb.readBits(1); // delta_pic_order_always_zero_flag\n gb.readSEG(); // offset_for_non_ref_pic\n gb.readSEG(); // offset_for_top_to_bottom_field\n let num_ref_frames_in_pic_order_cnt_cycle = gb.readUEG();\n for (let i = 0; i < num_ref_frames_in_pic_order_cnt_cycle; i++) {\n gb.readSEG(); // offset_for_ref_frame\n }\n }\n let ref_frames = gb.readUEG(); // max_num_ref_frames\n gb.readBits(1); // gaps_in_frame_num_value_allowed_flag\n\n let pic_width_in_mbs_minus1 = gb.readUEG();\n let pic_height_in_map_units_minus1 = gb.readUEG();\n\n let frame_mbs_only_flag = gb.readBits(1);\n if (frame_mbs_only_flag === 0) {\n gb.readBits(1); // mb_adaptive_frame_field_flag\n }\n gb.readBits(1); // direct_8x8_inference_flag\n\n let frame_crop_left_offset = 0;\n let frame_crop_right_offset = 0;\n let frame_crop_top_offset = 0;\n let frame_crop_bottom_offset = 0;\n\n let frame_cropping_flag = gb.readBool();\n if (frame_cropping_flag) {\n frame_crop_left_offset = gb.readUEG();\n frame_crop_right_offset = gb.readUEG();\n frame_crop_top_offset = gb.readUEG();\n frame_crop_bottom_offset = gb.readUEG();\n }\n\n let sar_width = 1, sar_height = 1;\n let fps = 0, fps_fixed = true, fps_num = 0, fps_den = 0;\n\n let vui_parameters_present_flag = gb.readBool();\n if (vui_parameters_present_flag) {\n if (gb.readBool()) { // aspect_ratio_info_present_flag\n let aspect_ratio_idc = gb.readByte();\n let sar_w_table = [1, 12, 10, 16, 40, 24, 20, 32, 80, 18, 15, 64, 160, 4, 3, 2];\n let sar_h_table = [1, 11, 11, 11, 33, 11, 11, 11, 33, 11, 11, 33, 99, 3, 2, 1];\n\n if (aspect_ratio_idc > 0 && aspect_ratio_idc < 16) {\n sar_width = sar_w_table[aspect_ratio_idc - 1];\n sar_height = sar_h_table[aspect_ratio_idc - 1];\n } else if (aspect_ratio_idc === 255) {\n sar_width = gb.readByte() << 8 | gb.readByte();\n sar_height = gb.readByte() << 8 | gb.readByte();\n }\n }\n\n if (gb.readBool()) { // overscan_info_present_flag\n gb.readBool(); // overscan_appropriate_flag\n }\n if (gb.readBool()) { // video_signal_type_present_flag\n gb.readBits(4); // video_format & video_full_range_flag\n if (gb.readBool()) { // colour_description_present_flag\n gb.readBits(24); // colour_primaries & transfer_characteristics & matrix_coefficients\n }\n }\n if (gb.readBool()) { // chroma_loc_info_present_flag\n gb.readUEG(); // chroma_sample_loc_type_top_field\n gb.readUEG(); // chroma_sample_loc_type_bottom_field\n }\n if (gb.readBool()) { // timing_info_present_flag\n let num_units_in_tick = gb.readBits(32);\n let time_scale = gb.readBits(32);\n fps_fixed = gb.readBool(); // fixed_frame_rate_flag\n\n fps_num = time_scale;\n fps_den = num_units_in_tick * 2;\n fps = fps_num / fps_den;\n }\n }\n\n let sarScale = 1;\n if (sar_width !== 1 || sar_height !== 1) {\n sarScale = sar_width / sar_height;\n }\n\n let crop_unit_x = 0, crop_unit_y = 0;\n if (chroma_format_idc === 0) {\n crop_unit_x = 1;\n crop_unit_y = 2 - frame_mbs_only_flag;\n } else {\n let sub_wc = (chroma_format_idc === 3) ? 1 : 2;\n let sub_hc = (chroma_format_idc === 1) ? 2 : 1;\n crop_unit_x = sub_wc;\n crop_unit_y = sub_hc * (2 - frame_mbs_only_flag);\n }\n\n let codec_width = (pic_width_in_mbs_minus1 + 1) * 16;\n let codec_height = (2 - frame_mbs_only_flag) * ((pic_height_in_map_units_minus1 + 1) * 16);\n\n codec_width -= (frame_crop_left_offset + frame_crop_right_offset) * crop_unit_x;\n codec_height -= (frame_crop_top_offset + frame_crop_bottom_offset) * crop_unit_y;\n\n let present_width = Math.ceil(codec_width * sarScale);\n\n gb.destroy();\n gb = null;\n\n return {\n profile_string: profile_string, // baseline, high, high10, ...\n level_string: level_string, // 3, 3.1, 4, 4.1, 5, 5.1, ...\n bit_depth: bit_depth, // 8bit, 10bit, ...\n ref_frames: ref_frames,\n chroma_format: chroma_format, // 4:2:0, 4:2:2, ...\n chroma_format_string: SPSParser.getChromaFormatString(chroma_format),\n\n frame_rate: {\n fixed: fps_fixed,\n fps: fps,\n fps_den: fps_den,\n fps_num: fps_num\n },\n\n sar_ratio: {\n width: sar_width,\n height: sar_height\n },\n\n codec_size: {\n width: codec_width,\n height: codec_height\n },\n\n present_size: {\n width: present_width,\n height: codec_height\n }\n };\n }\n\n static _skipScalingList(gb, count) {\n let last_scale = 8, next_scale = 8;\n let delta_scale = 0;\n for (let i = 0; i < count; i++) {\n if (next_scale !== 0) {\n delta_scale = gb.readSEG();\n next_scale = (last_scale + delta_scale + 256) % 256;\n }\n last_scale = (next_scale === 0) ? last_scale : next_scale;\n }\n }\n\n static getProfileString(profile_idc) {\n switch (profile_idc) {\n case 66:\n return 'Baseline';\n case 77:\n return 'Main';\n case 88:\n return 'Extended';\n case 100:\n return 'High';\n case 110:\n return 'High10';\n case 122:\n return 'High422';\n case 244:\n return 'High444';\n default:\n return 'Unknown';\n }\n }\n\n static getLevelString(level_idc) {\n return (level_idc / 10).toFixed(1);\n }\n\n static getChromaFormatString(chroma) {\n switch (chroma) {\n case 420:\n return '4:2:0';\n case 422:\n return '4:2:2';\n case 444:\n return '4:4:4';\n default:\n return 'Unknown';\n }\n }\n\n}\n\nexport default SPSParser;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Polyfill from './utils/polyfill.js';\nimport Features from './core/features.js';\nimport {BaseLoader, LoaderStatus, LoaderErrors} from './io/loader.js';\nimport FlvPlayer from './player/flv-player.js';\nimport NativePlayer from './player/native-player.js';\nimport PlayerEvents from './player/player-events.js';\nimport {ErrorTypes, ErrorDetails} from './player/player-errors.js';\nimport LoggingControl from './utils/logging-control.js';\nimport {InvalidArgumentException} from './utils/exception.js';\n\n// here are all the interfaces\n\n// install polyfills\nPolyfill.install();\n\n\n// factory method\nfunction createPlayer(mediaDataSource, optionalConfig) {\n let mds = mediaDataSource;\n if (mds == null || typeof mds !== 'object') {\n throw new InvalidArgumentException('MediaDataSource must be an javascript object!');\n }\n\n if (!mds.hasOwnProperty('type')) {\n throw new InvalidArgumentException('MediaDataSource must has type field to indicate video file type!');\n }\n\n switch (mds.type) {\n case 'flv':\n return new FlvPlayer(mds, optionalConfig);\n default:\n return new NativePlayer(mds, optionalConfig);\n }\n}\n\n\n// feature detection\nfunction isSupported() {\n return Features.supportMSEH264Playback();\n}\n\nfunction getFeatureList() {\n return Features.getFeatureList();\n}\n\n\n// interfaces\nlet flvjs = {};\n\nflvjs.createPlayer = createPlayer;\nflvjs.isSupported = isSupported;\nflvjs.getFeatureList = getFeatureList;\n\nflvjs.BaseLoader = BaseLoader;\nflvjs.LoaderStatus = LoaderStatus;\nflvjs.LoaderErrors = LoaderErrors;\n\nflvjs.Events = PlayerEvents;\nflvjs.ErrorTypes = ErrorTypes;\nflvjs.ErrorDetails = ErrorDetails;\n\nflvjs.FlvPlayer = FlvPlayer;\nflvjs.NativePlayer = NativePlayer;\nflvjs.LoggingControl = LoggingControl;\n\nObject.defineProperty(flvjs, 'version', {\n enumerable: true,\n get: function () {\n // replace by webpack.DefinePlugin\n return __VERSION__;\n }\n});\n\nexport default flvjs;","// entry/index file\n\n// make it compatible with browserify's umd wrapper\nmodule.exports = require('./flv.js').default;\n","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Log from '../utils/logger.js';\nimport Browser from '../utils/browser.js';\nimport {BaseLoader, LoaderStatus, LoaderErrors} from './loader.js';\nimport {RuntimeException} from '../utils/exception.js';\n\n/* fetch + stream IO loader. Currently working on chrome 43+.\n * fetch provides a better alternative http API to XMLHttpRequest\n *\n * fetch spec https://fetch.spec.whatwg.org/\n * stream spec https://streams.spec.whatwg.org/\n */\nclass FetchStreamLoader extends BaseLoader {\n\n static isSupported() {\n try {\n // fetch + stream is broken on Microsoft Edge. Disable before build 15048.\n // see https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8196907/\n // Fixed in Jan 10, 2017. Build 15048+ removed from blacklist.\n let isWorkWellEdge = Browser.msedge && Browser.version.minor >= 15048;\n let browserNotBlacklisted = Browser.msedge ? isWorkWellEdge : true;\n return (self.fetch && self.ReadableStream && browserNotBlacklisted);\n } catch (e) {\n return false;\n }\n }\n\n constructor(seekHandler, config) {\n super('fetch-stream-loader');\n this.TAG = 'FetchStreamLoader';\n\n this._seekHandler = seekHandler;\n this._config = config;\n this._needStash = true;\n\n this._requestAbort = false;\n this._contentLength = null;\n this._receivedLength = 0;\n }\n\n destroy() {\n if (this.isWorking()) {\n this.abort();\n }\n super.destroy();\n }\n\n open(dataSource, range) {\n this._dataSource = dataSource;\n this._range = range;\n\n let sourceURL = dataSource.url;\n if (this._config.reuseRedirectedURL && dataSource.redirectedURL != undefined) {\n sourceURL = dataSource.redirectedURL;\n }\n\n let seekConfig = this._seekHandler.getConfig(sourceURL, range);\n\n let headers = new self.Headers();\n\n if (typeof seekConfig.headers === 'object') {\n let configHeaders = seekConfig.headers;\n for (let key in configHeaders) {\n if (configHeaders.hasOwnProperty(key)) {\n headers.append(key, configHeaders[key]);\n }\n }\n }\n\n let params = {\n method: 'GET',\n headers: headers,\n mode: 'cors',\n cache: 'default',\n // The default policy of Fetch API in the whatwg standard\n // Safari incorrectly indicates 'no-referrer' as default policy, fuck it\n referrerPolicy: 'no-referrer-when-downgrade'\n };\n\n // add additional headers\n if (typeof this._config.headers === 'object') {\n for (let key in this._config.headers) {\n headers.append(key, this._config.headers[key]);\n }\n }\n\n // cors is enabled by default\n if (dataSource.cors === false) {\n // no-cors means 'disregard cors policy', which can only be used in ServiceWorker\n params.mode = 'same-origin';\n }\n\n // withCredentials is disabled by default\n if (dataSource.withCredentials) {\n params.credentials = 'include';\n }\n\n // referrerPolicy from config\n if (dataSource.referrerPolicy) {\n params.referrerPolicy = dataSource.referrerPolicy;\n }\n\n // add abort controller, by wmlgl 2019-5-10 12:21:27\n if (self.AbortController) {\n this._abortController = new self.AbortController();\n params.signal = this._abortController.signal; \n }\n\n this._status = LoaderStatus.kConnecting;\n self.fetch(seekConfig.url, params).then((res) => {\n if (this._requestAbort) {\n this._status = LoaderStatus.kIdle;\n res.body.cancel();\n return;\n }\n if (res.ok && (res.status >= 200 && res.status <= 299)) {\n if (res.url !== seekConfig.url) {\n if (this._onURLRedirect) {\n let redirectedURL = this._seekHandler.removeURLParameters(res.url);\n this._onURLRedirect(redirectedURL);\n }\n }\n\n let lengthHeader = res.headers.get('Content-Length');\n if (lengthHeader != null) {\n this._contentLength = parseInt(lengthHeader);\n if (this._contentLength !== 0) {\n if (this._onContentLengthKnown) {\n this._onContentLengthKnown(this._contentLength);\n }\n }\n }\n\n return this._pump.call(this, res.body.getReader());\n } else {\n this._status = LoaderStatus.kError;\n if (this._onError) {\n this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID, {code: res.status, msg: res.statusText});\n } else {\n throw new RuntimeException('FetchStreamLoader: Http code invalid, ' + res.status + ' ' + res.statusText);\n }\n }\n }).catch((e) => {\n if (this._abortController && this._abortController.signal.aborted) {\n return;\n }\n\n this._status = LoaderStatus.kError;\n if (this._onError) {\n this._onError(LoaderErrors.EXCEPTION, {code: -1, msg: e.message});\n } else {\n throw e;\n }\n });\n }\n\n abort() {\n this._requestAbort = true;\n\n if (this._status !== LoaderStatus.kBuffering || !Browser.chrome) {\n // Chrome may throw Exception-like things here, avoid using if is buffering\n if (this._abortController) {\n try {\n this._abortController.abort();\n } catch (e) {}\n }\n }\n }\n\n _pump(reader) { // ReadableStreamReader\n return reader.read().then((result) => {\n if (result.done) {\n // First check received length\n if (this._contentLength !== null && this._receivedLength < this._contentLength) {\n // Report Early-EOF\n this._status = LoaderStatus.kError;\n let type = LoaderErrors.EARLY_EOF;\n let info = {code: -1, msg: 'Fetch stream meet Early-EOF'};\n if (this._onError) {\n this._onError(type, info);\n } else {\n throw new RuntimeException(info.msg);\n }\n } else {\n // OK. Download complete\n this._status = LoaderStatus.kComplete;\n if (this._onComplete) {\n this._onComplete(this._range.from, this._range.from + this._receivedLength - 1);\n }\n }\n } else {\n if (this._abortController && this._abortController.signal.aborted) {\n this._status = LoaderStatus.kComplete;\n return;\n } else if (this._requestAbort === true) {\n this._status = LoaderStatus.kComplete;\n return reader.cancel();\n }\n\n this._status = LoaderStatus.kBuffering;\n\n let chunk = result.value.buffer;\n let byteStart = this._range.from + this._receivedLength;\n this._receivedLength += chunk.byteLength;\n\n if (this._onDataArrival) {\n this._onDataArrival(chunk, byteStart, this._receivedLength);\n }\n\n this._pump(reader);\n }\n }).catch((e) => {\n if (this._abortController && this._abortController.signal.aborted) {\n this._status = LoaderStatus.kComplete;\n return;\n }\n\n if (e.code === 11 && Browser.msedge) { // InvalidStateError on Microsoft Edge\n // Workaround: Edge may throw InvalidStateError after ReadableStreamReader.cancel() call\n // Ignore the unknown exception.\n // Related issue: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11265202/\n return;\n }\n\n this._status = LoaderStatus.kError;\n let type = 0;\n let info = null;\n\n if ((e.code === 19 || e.message === 'network error') && // NETWORK_ERR\n (this._contentLength === null ||\n (this._contentLength !== null && this._receivedLength < this._contentLength))) {\n type = LoaderErrors.EARLY_EOF;\n info = {code: e.code, msg: 'Fetch stream meet Early-EOF'};\n } else {\n type = LoaderErrors.EXCEPTION;\n info = {code: e.code, msg: e.message};\n }\n\n if (this._onError) {\n this._onError(type, info);\n } else {\n throw new RuntimeException(info.msg);\n }\n });\n }\n\n}\n\nexport default FetchStreamLoader;\n","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Log from '../utils/logger.js';\nimport SpeedSampler from './speed-sampler.js';\nimport {LoaderStatus, LoaderErrors} from './loader.js';\nimport FetchStreamLoader from './fetch-stream-loader.js';\nimport MozChunkedLoader from './xhr-moz-chunked-loader.js';\nimport MSStreamLoader from './xhr-msstream-loader.js';\nimport RangeLoader from './xhr-range-loader.js';\nimport WebSocketLoader from './websocket-loader.js';\nimport RangeSeekHandler from './range-seek-handler.js';\nimport ParamSeekHandler from './param-seek-handler.js';\nimport {RuntimeException, IllegalStateException, InvalidArgumentException} from '../utils/exception.js';\n\n/**\n * DataSource: {\n * url: string,\n * filesize: number,\n * cors: boolean,\n * withCredentials: boolean\n * }\n * \n */\n\n// Manage IO Loaders\nclass IOController {\n\n constructor(dataSource, config, extraData) {\n this.TAG = 'IOController';\n\n this._config = config;\n this._extraData = extraData;\n\n this._stashInitialSize = 1024 * 384; // default initial size: 384KB\n if (config.stashInitialSize != undefined && config.stashInitialSize > 0) {\n // apply from config\n this._stashInitialSize = config.stashInitialSize;\n }\n\n this._stashUsed = 0;\n this._stashSize = this._stashInitialSize;\n this._bufferSize = 1024 * 1024 * 3; // initial size: 3MB\n this._stashBuffer = new ArrayBuffer(this._bufferSize);\n this._stashByteStart = 0;\n this._enableStash = true;\n if (config.enableStashBuffer === false) {\n this._enableStash = false;\n }\n\n this._loader = null;\n this._loaderClass = null;\n this._seekHandler = null;\n\n this._dataSource = dataSource;\n this._isWebSocketURL = /wss?:\\/\\/(.+?)/.test(dataSource.url);\n this._refTotalLength = dataSource.filesize ? dataSource.filesize : null;\n this._totalLength = this._refTotalLength;\n this._fullRequestFlag = false;\n this._currentRange = null;\n this._redirectedURL = null;\n\n this._speedNormalized = 0;\n this._speedSampler = new SpeedSampler();\n this._speedNormalizeList = [64, 128, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096];\n\n this._isEarlyEofReconnecting = false;\n\n this._paused = false;\n this._resumeFrom = 0;\n\n this._onDataArrival = null;\n this._onSeeked = null;\n this._onError = null;\n this._onComplete = null;\n this._onRedirect = null;\n this._onRecoveredEarlyEof = null;\n\n this._selectSeekHandler();\n this._selectLoader();\n this._createLoader();\n }\n\n destroy() {\n if (this._loader.isWorking()) {\n this._loader.abort();\n }\n this._loader.destroy();\n this._loader = null;\n this._loaderClass = null;\n this._dataSource = null;\n this._stashBuffer = null;\n this._stashUsed = this._stashSize = this._bufferSize = this._stashByteStart = 0;\n this._currentRange = null;\n this._speedSampler = null;\n\n this._isEarlyEofReconnecting = false;\n\n this._onDataArrival = null;\n this._onSeeked = null;\n this._onError = null;\n this._onComplete = null;\n this._onRedirect = null;\n this._onRecoveredEarlyEof = null;\n\n this._extraData = null;\n }\n\n isWorking() {\n return this._loader && this._loader.isWorking() && !this._paused;\n }\n\n isPaused() {\n return this._paused;\n }\n\n get status() {\n return this._loader.status;\n }\n\n get extraData() {\n return this._extraData;\n }\n\n set extraData(data) {\n this._extraData = data;\n }\n\n // prototype: function onDataArrival(chunks: ArrayBuffer, byteStart: number): number\n get onDataArrival() {\n return this._onDataArrival;\n }\n\n set onDataArrival(callback) {\n this._onDataArrival = callback;\n }\n\n get onSeeked() {\n return this._onSeeked;\n }\n\n set onSeeked(callback) {\n this._onSeeked = callback;\n }\n\n // prototype: function onError(type: number, info: {code: number, msg: string}): void\n get onError() {\n return this._onError;\n }\n\n set onError(callback) {\n this._onError = callback;\n }\n\n get onComplete() {\n return this._onComplete;\n }\n\n set onComplete(callback) {\n this._onComplete = callback;\n }\n\n get onRedirect() {\n return this._onRedirect;\n }\n\n set onRedirect(callback) {\n this._onRedirect = callback;\n }\n\n get onRecoveredEarlyEof() {\n return this._onRecoveredEarlyEof;\n }\n\n set onRecoveredEarlyEof(callback) {\n this._onRecoveredEarlyEof = callback;\n }\n\n get currentURL() {\n return this._dataSource.url;\n }\n\n get hasRedirect() {\n return (this._redirectedURL != null || this._dataSource.redirectedURL != undefined);\n }\n\n get currentRedirectedURL() {\n return this._redirectedURL || this._dataSource.redirectedURL;\n }\n\n // in KB/s\n get currentSpeed() {\n if (this._loaderClass === RangeLoader) {\n // SpeedSampler is inaccuracy if loader is RangeLoader\n return this._loader.currentSpeed;\n }\n return this._speedSampler.lastSecondKBps;\n }\n\n get loaderType() {\n return this._loader.type;\n }\n\n _selectSeekHandler() {\n let config = this._config;\n\n if (config.seekType === 'range') {\n this._seekHandler = new RangeSeekHandler(this._config.rangeLoadZeroStart);\n } else if (config.seekType === 'param') {\n let paramStart = config.seekParamStart || 'bstart';\n let paramEnd = config.seekParamEnd || 'bend';\n\n this._seekHandler = new ParamSeekHandler(paramStart, paramEnd);\n } else if (config.seekType === 'custom') {\n if (typeof config.customSeekHandler !== 'function') {\n throw new InvalidArgumentException('Custom seekType specified in config but invalid customSeekHandler!');\n }\n this._seekHandler = new config.customSeekHandler();\n } else {\n throw new InvalidArgumentException(`Invalid seekType in config: ${config.seekType}`);\n }\n }\n\n _selectLoader() {\n if (this._config.customLoader != null) {\n this._loaderClass = this._config.customLoader;\n } else if (this._isWebSocketURL) {\n this._loaderClass = WebSocketLoader;\n } else if (FetchStreamLoader.isSupported()) {\n this._loaderClass = FetchStreamLoader;\n } else if (MozChunkedLoader.isSupported()) {\n this._loaderClass = MozChunkedLoader;\n } else if (RangeLoader.isSupported()) {\n this._loaderClass = RangeLoader;\n } else {\n throw new RuntimeException('Your browser doesn\\'t support xhr with arraybuffer responseType!');\n }\n }\n\n _createLoader() {\n this._loader = new this._loaderClass(this._seekHandler, this._config);\n if (this._loader.needStashBuffer === false) {\n this._enableStash = false;\n }\n this._loader.onContentLengthKnown = this._onContentLengthKnown.bind(this);\n this._loader.onURLRedirect = this._onURLRedirect.bind(this);\n this._loader.onDataArrival = this._onLoaderChunkArrival.bind(this);\n this._loader.onComplete = this._onLoaderComplete.bind(this);\n this._loader.onError = this._onLoaderError.bind(this);\n }\n\n open(optionalFrom) {\n this._currentRange = {from: 0, to: -1};\n if (optionalFrom) {\n this._currentRange.from = optionalFrom;\n }\n\n this._speedSampler.reset();\n if (!optionalFrom) {\n this._fullRequestFlag = true;\n }\n\n this._loader.open(this._dataSource, Object.assign({}, this._currentRange));\n }\n\n abort() {\n this._loader.abort();\n\n if (this._paused) {\n this._paused = false;\n this._resumeFrom = 0;\n }\n }\n\n pause() {\n if (this.isWorking()) {\n this._loader.abort();\n\n if (this._stashUsed !== 0) {\n this._resumeFrom = this._stashByteStart;\n this._currentRange.to = this._stashByteStart - 1;\n } else {\n this._resumeFrom = this._currentRange.to + 1;\n }\n this._stashUsed = 0;\n this._stashByteStart = 0;\n this._paused = true;\n }\n }\n\n resume() {\n if (this._paused) {\n this._paused = false;\n let bytes = this._resumeFrom;\n this._resumeFrom = 0;\n this._internalSeek(bytes, true);\n }\n }\n\n seek(bytes) {\n this._paused = false;\n this._stashUsed = 0;\n this._stashByteStart = 0;\n this._internalSeek(bytes, true);\n }\n\n /**\n * When seeking request is from media seeking, unconsumed stash data should be dropped\n * However, stash data shouldn't be dropped if seeking requested from http reconnection\n *\n * @dropUnconsumed: Ignore and discard all unconsumed data in stash buffer\n */\n _internalSeek(bytes, dropUnconsumed) {\n if (this._loader.isWorking()) {\n this._loader.abort();\n }\n\n // dispatch & flush stash buffer before seek\n this._flushStashBuffer(dropUnconsumed);\n\n this._loader.destroy();\n this._loader = null;\n\n let requestRange = {from: bytes, to: -1};\n this._currentRange = {from: requestRange.from, to: -1};\n\n this._speedSampler.reset();\n this._stashSize = this._stashInitialSize;\n this._createLoader();\n this._loader.open(this._dataSource, requestRange);\n\n if (this._onSeeked) {\n this._onSeeked();\n }\n }\n\n updateUrl(url) {\n if (!url || typeof url !== 'string' || url.length === 0) {\n throw new InvalidArgumentException('Url must be a non-empty string!');\n }\n\n this._dataSource.url = url;\n\n // TODO: replace with new url\n }\n\n _expandBuffer(expectedBytes) {\n let bufferNewSize = this._stashSize;\n while (bufferNewSize + 1024 * 1024 * 1 < expectedBytes) {\n bufferNewSize *= 2;\n }\n\n bufferNewSize += 1024 * 1024 * 1; // bufferSize = stashSize + 1MB\n if (bufferNewSize === this._bufferSize) {\n return;\n }\n\n let newBuffer = new ArrayBuffer(bufferNewSize);\n\n if (this._stashUsed > 0) { // copy existing data into new buffer\n let stashOldArray = new Uint8Array(this._stashBuffer, 0, this._stashUsed);\n let stashNewArray = new Uint8Array(newBuffer, 0, bufferNewSize);\n stashNewArray.set(stashOldArray, 0);\n }\n\n this._stashBuffer = newBuffer;\n this._bufferSize = bufferNewSize;\n }\n\n _normalizeSpeed(input) {\n let list = this._speedNormalizeList;\n let last = list.length - 1;\n let mid = 0;\n let lbound = 0;\n let ubound = last;\n\n if (input < list[0]) {\n return list[0];\n }\n\n // binary search\n while (lbound <= ubound) {\n mid = lbound + Math.floor((ubound - lbound) / 2);\n if (mid === last || (input >= list[mid] && input < list[mid + 1])) {\n return list[mid];\n } else if (list[mid] < input) {\n lbound = mid + 1;\n } else {\n ubound = mid - 1;\n }\n }\n }\n\n _adjustStashSize(normalized) {\n let stashSizeKB = 0;\n\n if (this._config.isLive) {\n // live stream: always use single normalized speed for size of stashSizeKB\n stashSizeKB = normalized;\n } else {\n if (normalized < 512) {\n stashSizeKB = normalized;\n } else if (normalized >= 512 && normalized <= 1024) {\n stashSizeKB = Math.floor(normalized * 1.5);\n } else {\n stashSizeKB = normalized * 2;\n }\n }\n\n if (stashSizeKB > 8192) {\n stashSizeKB = 8192;\n }\n\n let bufferSize = stashSizeKB * 1024 + 1024 * 1024 * 1; // stashSize + 1MB\n if (this._bufferSize < bufferSize) {\n this._expandBuffer(bufferSize);\n }\n this._stashSize = stashSizeKB * 1024;\n }\n\n _dispatchChunks(chunks, byteStart) {\n this._currentRange.to = byteStart + chunks.byteLength - 1;\n return this._onDataArrival(chunks, byteStart);\n }\n\n _onURLRedirect(redirectedURL) {\n this._redirectedURL = redirectedURL;\n if (this._onRedirect) {\n this._onRedirect(redirectedURL);\n }\n }\n\n _onContentLengthKnown(contentLength) {\n if (contentLength && this._fullRequestFlag) {\n this._totalLength = contentLength;\n this._fullRequestFlag = false;\n }\n }\n\n _onLoaderChunkArrival(chunk, byteStart, receivedLength) {\n if (!this._onDataArrival) {\n throw new IllegalStateException('IOController: No existing consumer (onDataArrival) callback!');\n }\n if (this._paused) {\n return;\n }\n if (this._isEarlyEofReconnecting) {\n // Auto-reconnect for EarlyEof succeed, notify to upper-layer by callback\n this._isEarlyEofReconnecting = false;\n if (this._onRecoveredEarlyEof) {\n this._onRecoveredEarlyEof();\n }\n }\n\n this._speedSampler.addBytes(chunk.byteLength);\n\n // adjust stash buffer size according to network speed dynamically\n let KBps = this._speedSampler.lastSecondKBps;\n if (KBps !== 0) {\n let normalized = this._normalizeSpeed(KBps);\n if (this._speedNormalized !== normalized) {\n this._speedNormalized = normalized;\n this._adjustStashSize(normalized);\n }\n }\n\n if (!this._enableStash) { // disable stash\n if (this._stashUsed === 0) {\n // dispatch chunk directly to consumer;\n // check ret value (consumed bytes) and stash unconsumed to stashBuffer\n let consumed = this._dispatchChunks(chunk, byteStart);\n if (consumed < chunk.byteLength) { // unconsumed data remain.\n let remain = chunk.byteLength - consumed;\n if (remain > this._bufferSize) {\n this._expandBuffer(remain);\n }\n let stashArray = new Uint8Array(this._stashBuffer, 0, this._bufferSize);\n stashArray.set(new Uint8Array(chunk, consumed), 0);\n this._stashUsed += remain;\n this._stashByteStart = byteStart + consumed;\n }\n } else {\n // else: Merge chunk into stashBuffer, and dispatch stashBuffer to consumer.\n if (this._stashUsed + chunk.byteLength > this._bufferSize) {\n this._expandBuffer(this._stashUsed + chunk.byteLength);\n }\n let stashArray = new Uint8Array(this._stashBuffer, 0, this._bufferSize);\n stashArray.set(new Uint8Array(chunk), this._stashUsed);\n this._stashUsed += chunk.byteLength;\n let consumed = this._dispatchChunks(this._stashBuffer.slice(0, this._stashUsed), this._stashByteStart);\n if (consumed < this._stashUsed && consumed > 0) { // unconsumed data remain\n let remainArray = new Uint8Array(this._stashBuffer, consumed);\n stashArray.set(remainArray, 0);\n }\n this._stashUsed -= consumed;\n this._stashByteStart += consumed;\n }\n } else { // enable stash\n if (this._stashUsed === 0 && this._stashByteStart === 0) { // seeked? or init chunk?\n // This is the first chunk after seek action\n this._stashByteStart = byteStart;\n }\n if (this._stashUsed + chunk.byteLength <= this._stashSize) {\n // just stash\n let stashArray = new Uint8Array(this._stashBuffer, 0, this._stashSize);\n stashArray.set(new Uint8Array(chunk), this._stashUsed);\n this._stashUsed += chunk.byteLength;\n } else { // stashUsed + chunkSize > stashSize, size limit exceeded\n let stashArray = new Uint8Array(this._stashBuffer, 0, this._bufferSize);\n if (this._stashUsed > 0) { // There're stash datas in buffer\n // dispatch the whole stashBuffer, and stash remain data\n // then append chunk to stashBuffer (stash)\n let buffer = this._stashBuffer.slice(0, this._stashUsed);\n let consumed = this._dispatchChunks(buffer, this._stashByteStart);\n if (consumed < buffer.byteLength) {\n if (consumed > 0) {\n let remainArray = new Uint8Array(buffer, consumed);\n stashArray.set(remainArray, 0);\n this._stashUsed = remainArray.byteLength;\n this._stashByteStart += consumed;\n }\n } else {\n this._stashUsed = 0;\n this._stashByteStart += consumed;\n }\n if (this._stashUsed + chunk.byteLength > this._bufferSize) {\n this._expandBuffer(this._stashUsed + chunk.byteLength);\n stashArray = new Uint8Array(this._stashBuffer, 0, this._bufferSize);\n }\n stashArray.set(new Uint8Array(chunk), this._stashUsed);\n this._stashUsed += chunk.byteLength;\n } else { // stash buffer empty, but chunkSize > stashSize (oh, holy shit)\n // dispatch chunk directly and stash remain data\n let consumed = this._dispatchChunks(chunk, byteStart);\n if (consumed < chunk.byteLength) {\n let remain = chunk.byteLength - consumed;\n if (remain > this._bufferSize) {\n this._expandBuffer(remain);\n stashArray = new Uint8Array(this._stashBuffer, 0, this._bufferSize);\n }\n stashArray.set(new Uint8Array(chunk, consumed), 0);\n this._stashUsed += remain;\n this._stashByteStart = byteStart + consumed;\n }\n }\n }\n }\n }\n\n _flushStashBuffer(dropUnconsumed) {\n if (this._stashUsed > 0) {\n let buffer = this._stashBuffer.slice(0, this._stashUsed);\n let consumed = this._dispatchChunks(buffer, this._stashByteStart);\n let remain = buffer.byteLength - consumed;\n\n if (consumed < buffer.byteLength) {\n if (dropUnconsumed) {\n Log.w(this.TAG, `${remain} bytes unconsumed data remain when flush buffer, dropped`);\n } else {\n if (consumed > 0) {\n let stashArray = new Uint8Array(this._stashBuffer, 0, this._bufferSize);\n let remainArray = new Uint8Array(buffer, consumed);\n stashArray.set(remainArray, 0);\n this._stashUsed = remainArray.byteLength;\n this._stashByteStart += consumed;\n }\n return 0;\n }\n }\n this._stashUsed = 0;\n this._stashByteStart = 0;\n return remain;\n }\n return 0;\n }\n\n _onLoaderComplete(from, to) {\n // Force-flush stash buffer, and drop unconsumed data\n this._flushStashBuffer(true);\n\n if (this._onComplete) {\n this._onComplete(this._extraData);\n }\n }\n\n _onLoaderError(type, data) {\n Log.e(this.TAG, `Loader error, code = ${data.code}, msg = ${data.msg}`);\n\n this._flushStashBuffer(false);\n\n if (this._isEarlyEofReconnecting) {\n // Auto-reconnect for EarlyEof failed, throw UnrecoverableEarlyEof error to upper-layer\n this._isEarlyEofReconnecting = false;\n type = LoaderErrors.UNRECOVERABLE_EARLY_EOF;\n }\n\n switch (type) {\n case LoaderErrors.EARLY_EOF: {\n if (!this._config.isLive) {\n // Do internal http reconnect if not live stream\n if (this._totalLength) {\n let nextFrom = this._currentRange.to + 1;\n if (nextFrom < this._totalLength) {\n Log.w(this.TAG, 'Connection lost, trying reconnect...');\n this._isEarlyEofReconnecting = true;\n this._internalSeek(nextFrom, false);\n }\n return;\n }\n // else: We don't know totalLength, throw UnrecoverableEarlyEof\n }\n // live stream: throw UnrecoverableEarlyEof error to upper-layer\n type = LoaderErrors.UNRECOVERABLE_EARLY_EOF;\n break;\n }\n case LoaderErrors.UNRECOVERABLE_EARLY_EOF:\n case LoaderErrors.CONNECTING_TIMEOUT:\n case LoaderErrors.HTTP_STATUS_CODE_INVALID:\n case LoaderErrors.EXCEPTION:\n break;\n }\n\n if (this._onError) {\n this._onError(type, data);\n } else {\n throw new RuntimeException('IOException: ' + data.msg);\n }\n }\n\n}\n\nexport default IOController;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NotImplementedException} from '../utils/exception.js';\n\nexport const LoaderStatus = {\n kIdle: 0,\n kConnecting: 1,\n kBuffering: 2,\n kError: 3,\n kComplete: 4\n};\n\nexport const LoaderErrors = {\n OK: 'OK',\n EXCEPTION: 'Exception',\n HTTP_STATUS_CODE_INVALID: 'HttpStatusCodeInvalid',\n CONNECTING_TIMEOUT: 'ConnectingTimeout',\n EARLY_EOF: 'EarlyEof',\n UNRECOVERABLE_EARLY_EOF: 'UnrecoverableEarlyEof'\n};\n\n/* Loader has callbacks which have following prototypes:\n * function onContentLengthKnown(contentLength: number): void\n * function onURLRedirect(url: string): void\n * function onDataArrival(chunk: ArrayBuffer, byteStart: number, receivedLength: number): void\n * function onError(errorType: number, errorInfo: {code: number, msg: string}): void\n * function onComplete(rangeFrom: number, rangeTo: number): void\n */\nexport class BaseLoader {\n\n constructor(typeName) {\n this._type = typeName || 'undefined';\n this._status = LoaderStatus.kIdle;\n this._needStash = false;\n // callbacks\n this._onContentLengthKnown = null;\n this._onURLRedirect = null;\n this._onDataArrival = null;\n this._onError = null;\n this._onComplete = null;\n }\n\n destroy() {\n this._status = LoaderStatus.kIdle;\n this._onContentLengthKnown = null;\n this._onURLRedirect = null;\n this._onDataArrival = null;\n this._onError = null;\n this._onComplete = null;\n }\n\n isWorking() {\n return this._status === LoaderStatus.kConnecting || this._status === LoaderStatus.kBuffering;\n }\n\n get type() {\n return this._type;\n }\n\n get status() {\n return this._status;\n }\n\n get needStashBuffer() {\n return this._needStash;\n }\n\n get onContentLengthKnown() {\n return this._onContentLengthKnown;\n }\n\n set onContentLengthKnown(callback) {\n this._onContentLengthKnown = callback;\n }\n\n get onURLRedirect() {\n return this._onURLRedirect;\n }\n\n set onURLRedirect(callback) {\n this._onURLRedirect = callback;\n }\n\n get onDataArrival() {\n return this._onDataArrival;\n }\n\n set onDataArrival(callback) {\n this._onDataArrival = callback;\n }\n\n get onError() {\n return this._onError;\n }\n\n set onError(callback) {\n this._onError = callback;\n }\n\n get onComplete() {\n return this._onComplete;\n }\n\n set onComplete(callback) {\n this._onComplete = callback;\n }\n\n // pure virtual\n open(dataSource, range) {\n throw new NotImplementedException('Unimplemented abstract function!');\n }\n\n abort() {\n throw new NotImplementedException('Unimplemented abstract function!');\n }\n\n\n}","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nclass ParamSeekHandler {\n\n constructor(paramStart, paramEnd) {\n this._startName = paramStart;\n this._endName = paramEnd;\n }\n\n getConfig(baseUrl, range) {\n let url = baseUrl;\n\n if (range.from !== 0 || range.to !== -1) {\n let needAnd = true;\n if (url.indexOf('?') === -1) {\n url += '?';\n needAnd = false;\n }\n\n if (needAnd) {\n url += '&';\n }\n\n url += `${this._startName}=${range.from.toString()}`;\n\n if (range.to !== -1) {\n url += `&${this._endName}=${range.to.toString()}`;\n }\n }\n\n return {\n url: url,\n headers: {}\n };\n }\n\n removeURLParameters(seekedURL) {\n let baseURL = seekedURL.split('?')[0];\n let params = undefined;\n\n let queryIndex = seekedURL.indexOf('?');\n if (queryIndex !== -1) {\n params = seekedURL.substring(queryIndex + 1);\n }\n\n let resultParams = '';\n\n if (params != undefined && params.length > 0) {\n let pairs = params.split('&');\n\n for (let i = 0; i < pairs.length; i++) {\n let pair = pairs[i].split('=');\n let requireAnd = (i > 0);\n\n if (pair[0] !== this._startName && pair[0] !== this._endName) {\n if (requireAnd) {\n resultParams += '&';\n }\n resultParams += pairs[i];\n }\n }\n }\n\n return (resultParams.length === 0) ? baseURL : baseURL + '?' + resultParams;\n }\n\n}\n\nexport default ParamSeekHandler;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nclass RangeSeekHandler {\n\n constructor(zeroStart) {\n this._zeroStart = zeroStart || false;\n }\n\n getConfig(url, range) {\n let headers = {};\n\n if (range.from !== 0 || range.to !== -1) {\n let param;\n if (range.to !== -1) {\n param = `bytes=${range.from.toString()}-${range.to.toString()}`;\n } else {\n param = `bytes=${range.from.toString()}-`;\n }\n headers['Range'] = param;\n } else if (this._zeroStart) {\n headers['Range'] = 'bytes=0-';\n }\n\n return {\n url: url,\n headers: headers\n };\n }\n\n removeURLParameters(seekedURL) {\n return seekedURL;\n }\n\n}\n\nexport default RangeSeekHandler;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Utility class to calculate realtime network I/O speed\nclass SpeedSampler {\n\n constructor() {\n // milliseconds\n this._firstCheckpoint = 0;\n this._lastCheckpoint = 0;\n this._intervalBytes = 0;\n this._totalBytes = 0;\n this._lastSecondBytes = 0;\n\n // compatibility detection\n if (self.performance && self.performance.now) {\n this._now = self.performance.now.bind(self.performance);\n } else {\n this._now = Date.now;\n }\n }\n\n reset() {\n this._firstCheckpoint = this._lastCheckpoint = 0;\n this._totalBytes = this._intervalBytes = 0;\n this._lastSecondBytes = 0;\n }\n\n addBytes(bytes) {\n if (this._firstCheckpoint === 0) {\n this._firstCheckpoint = this._now();\n this._lastCheckpoint = this._firstCheckpoint;\n this._intervalBytes += bytes;\n this._totalBytes += bytes;\n } else if (this._now() - this._lastCheckpoint < 1000) {\n this._intervalBytes += bytes;\n this._totalBytes += bytes;\n } else { // duration >= 1000\n this._lastSecondBytes = this._intervalBytes;\n this._intervalBytes = bytes;\n this._totalBytes += bytes;\n this._lastCheckpoint = this._now();\n }\n }\n\n get currentKBps() {\n this.addBytes(0);\n\n let durationSeconds = (this._now() - this._lastCheckpoint) / 1000;\n if (durationSeconds == 0) durationSeconds = 1;\n return (this._intervalBytes / durationSeconds) / 1024;\n }\n\n get lastSecondKBps() {\n this.addBytes(0);\n\n if (this._lastSecondBytes !== 0) {\n return this._lastSecondBytes / 1024;\n } else { // lastSecondBytes === 0\n if (this._now() - this._lastCheckpoint >= 500) {\n // if time interval since last checkpoint has exceeded 500ms\n // the speed is nearly accurate\n return this.currentKBps;\n } else {\n // We don't know\n return 0;\n }\n }\n }\n\n get averageKBps() {\n let durationSeconds = (this._now() - this._firstCheckpoint) / 1000;\n return (this._totalBytes / durationSeconds) / 1024;\n }\n\n}\n\nexport default SpeedSampler;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Log from '../utils/logger.js';\nimport {BaseLoader, LoaderStatus, LoaderErrors} from './loader.js';\nimport {RuntimeException} from '../utils/exception.js';\n\n// For FLV over WebSocket live stream\nclass WebSocketLoader extends BaseLoader {\n\n static isSupported() {\n try {\n return (typeof self.WebSocket !== 'undefined');\n } catch (e) {\n return false;\n }\n }\n\n constructor() {\n super('websocket-loader');\n this.TAG = 'WebSocketLoader';\n\n this._needStash = true;\n\n this._ws = null;\n this._requestAbort = false;\n this._receivedLength = 0;\n }\n\n destroy() {\n if (this._ws) {\n this.abort();\n }\n super.destroy();\n }\n\n open(dataSource) {\n try {\n let ws = this._ws = new self.WebSocket(dataSource.url);\n ws.binaryType = 'arraybuffer';\n ws.onopen = this._onWebSocketOpen.bind(this);\n ws.onclose = this._onWebSocketClose.bind(this);\n ws.onmessage = this._onWebSocketMessage.bind(this);\n ws.onerror = this._onWebSocketError.bind(this);\n\n this._status = LoaderStatus.kConnecting;\n } catch (e) {\n this._status = LoaderStatus.kError;\n\n let info = {code: e.code, msg: e.message};\n\n if (this._onError) {\n this._onError(LoaderErrors.EXCEPTION, info);\n } else {\n throw new RuntimeException(info.msg);\n }\n }\n }\n\n abort() {\n let ws = this._ws;\n if (ws && (ws.readyState === 0 || ws.readyState === 1)) { // CONNECTING || OPEN\n this._requestAbort = true;\n ws.close();\n }\n\n this._ws = null;\n this._status = LoaderStatus.kComplete;\n }\n\n _onWebSocketOpen(e) {\n this._status = LoaderStatus.kBuffering;\n }\n\n _onWebSocketClose(e) {\n if (this._requestAbort === true) {\n this._requestAbort = false;\n return;\n }\n\n this._status = LoaderStatus.kComplete;\n\n if (this._onComplete) {\n this._onComplete(0, this._receivedLength - 1);\n }\n }\n\n _onWebSocketMessage(e) {\n if (e.data instanceof ArrayBuffer) {\n this._dispatchArrayBuffer(e.data);\n } else if (e.data instanceof Blob) {\n let reader = new FileReader();\n reader.onload = () => {\n this._dispatchArrayBuffer(reader.result);\n };\n reader.readAsArrayBuffer(e.data);\n } else {\n this._status = LoaderStatus.kError;\n let info = {code: -1, msg: 'Unsupported WebSocket message type: ' + e.data.constructor.name};\n\n if (this._onError) {\n this._onError(LoaderErrors.EXCEPTION, info);\n } else {\n throw new RuntimeException(info.msg);\n }\n }\n }\n\n _dispatchArrayBuffer(arraybuffer) {\n let chunk = arraybuffer;\n let byteStart = this._receivedLength;\n this._receivedLength += chunk.byteLength;\n\n if (this._onDataArrival) {\n this._onDataArrival(chunk, byteStart, this._receivedLength);\n }\n }\n\n _onWebSocketError(e) {\n this._status = LoaderStatus.kError;\n\n let info = {\n code: e.code,\n msg: e.message\n };\n\n if (this._onError) {\n this._onError(LoaderErrors.EXCEPTION, info);\n } else {\n throw new RuntimeException(info.msg);\n }\n }\n\n}\n\nexport default WebSocketLoader;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Log from '../utils/logger.js';\nimport {BaseLoader, LoaderStatus, LoaderErrors} from './loader.js';\nimport {RuntimeException} from '../utils/exception.js';\n\n// For FireFox browser which supports `xhr.responseType = 'moz-chunked-arraybuffer'`\nclass MozChunkedLoader extends BaseLoader {\n\n static isSupported() {\n try {\n let xhr = new XMLHttpRequest();\n // Firefox 37- requires .open() to be called before setting responseType\n xhr.open('GET', 'https://example.com', true);\n xhr.responseType = 'moz-chunked-arraybuffer';\n return (xhr.responseType === 'moz-chunked-arraybuffer');\n } catch (e) {\n Log.w('MozChunkedLoader', e.message);\n return false;\n }\n }\n\n constructor(seekHandler, config) {\n super('xhr-moz-chunked-loader');\n this.TAG = 'MozChunkedLoader';\n\n this._seekHandler = seekHandler;\n this._config = config;\n this._needStash = true;\n\n this._xhr = null;\n this._requestAbort = false;\n this._contentLength = null;\n this._receivedLength = 0;\n }\n\n destroy() {\n if (this.isWorking()) {\n this.abort();\n }\n if (this._xhr) {\n this._xhr.onreadystatechange = null;\n this._xhr.onprogress = null;\n this._xhr.onloadend = null;\n this._xhr.onerror = null;\n this._xhr = null;\n }\n super.destroy();\n }\n\n open(dataSource, range) {\n this._dataSource = dataSource;\n this._range = range;\n\n let sourceURL = dataSource.url;\n if (this._config.reuseRedirectedURL && dataSource.redirectedURL != undefined) {\n sourceURL = dataSource.redirectedURL;\n }\n\n let seekConfig = this._seekHandler.getConfig(sourceURL, range);\n this._requestURL = seekConfig.url;\n\n let xhr = this._xhr = new XMLHttpRequest();\n xhr.open('GET', seekConfig.url, true);\n xhr.responseType = 'moz-chunked-arraybuffer';\n xhr.onreadystatechange = this._onReadyStateChange.bind(this);\n xhr.onprogress = this._onProgress.bind(this);\n xhr.onloadend = this._onLoadEnd.bind(this);\n xhr.onerror = this._onXhrError.bind(this);\n\n // cors is auto detected and enabled by xhr\n\n // withCredentials is disabled by default\n if (dataSource.withCredentials) {\n xhr.withCredentials = true;\n }\n\n if (typeof seekConfig.headers === 'object') {\n let headers = seekConfig.headers;\n\n for (let key in headers) {\n if (headers.hasOwnProperty(key)) {\n xhr.setRequestHeader(key, headers[key]);\n }\n }\n }\n\n // add additional headers\n if (typeof this._config.headers === 'object') {\n let headers = this._config.headers;\n\n for (let key in headers) {\n if (headers.hasOwnProperty(key)) {\n xhr.setRequestHeader(key, headers[key]);\n }\n }\n }\n\n this._status = LoaderStatus.kConnecting;\n xhr.send();\n }\n\n abort() {\n this._requestAbort = true;\n if (this._xhr) {\n this._xhr.abort();\n }\n this._status = LoaderStatus.kComplete;\n }\n\n _onReadyStateChange(e) {\n let xhr = e.target;\n\n if (xhr.readyState === 2) { // HEADERS_RECEIVED\n if (xhr.responseURL != undefined && xhr.responseURL !== this._requestURL) {\n if (this._onURLRedirect) {\n let redirectedURL = this._seekHandler.removeURLParameters(xhr.responseURL);\n this._onURLRedirect(redirectedURL);\n }\n }\n\n if (xhr.status !== 0 && (xhr.status < 200 || xhr.status > 299)) {\n this._status = LoaderStatus.kError;\n if (this._onError) {\n this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID, {code: xhr.status, msg: xhr.statusText});\n } else {\n throw new RuntimeException('MozChunkedLoader: Http code invalid, ' + xhr.status + ' ' + xhr.statusText);\n }\n } else {\n this._status = LoaderStatus.kBuffering;\n }\n }\n }\n\n _onProgress(e) {\n if (this._status === LoaderStatus.kError) {\n // Ignore error response\n return;\n }\n\n if (this._contentLength === null) {\n if (e.total !== null && e.total !== 0) {\n this._contentLength = e.total;\n if (this._onContentLengthKnown) {\n this._onContentLengthKnown(this._contentLength);\n }\n }\n }\n\n let chunk = e.target.response;\n let byteStart = this._range.from + this._receivedLength;\n this._receivedLength += chunk.byteLength;\n\n if (this._onDataArrival) {\n this._onDataArrival(chunk, byteStart, this._receivedLength);\n }\n }\n\n _onLoadEnd(e) {\n if (this._requestAbort === true) {\n this._requestAbort = false;\n return;\n } else if (this._status === LoaderStatus.kError) {\n return;\n }\n\n this._status = LoaderStatus.kComplete;\n if (this._onComplete) {\n this._onComplete(this._range.from, this._range.from + this._receivedLength - 1);\n }\n }\n\n _onXhrError(e) {\n this._status = LoaderStatus.kError;\n let type = 0;\n let info = null;\n\n if (this._contentLength && e.loaded < this._contentLength) {\n type = LoaderErrors.EARLY_EOF;\n info = {code: -1, msg: 'Moz-Chunked stream meet Early-Eof'};\n } else {\n type = LoaderErrors.EXCEPTION;\n info = {code: -1, msg: e.constructor.name + ' ' + e.type};\n }\n\n if (this._onError) {\n this._onError(type, info);\n } else {\n throw new RuntimeException(info.msg);\n }\n }\n\n}\n\nexport default MozChunkedLoader;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Log from '../utils/logger.js';\nimport SpeedSampler from './speed-sampler.js';\nimport {BaseLoader, LoaderStatus, LoaderErrors} from './loader.js';\nimport {RuntimeException} from '../utils/exception.js';\n\n// Universal IO Loader, implemented by adding Range header in xhr's request header\nclass RangeLoader extends BaseLoader {\n\n static isSupported() {\n try {\n let xhr = new XMLHttpRequest();\n xhr.open('GET', 'https://example.com', true);\n xhr.responseType = 'arraybuffer';\n return (xhr.responseType === 'arraybuffer');\n } catch (e) {\n Log.w('RangeLoader', e.message);\n return false;\n }\n }\n\n constructor(seekHandler, config) {\n super('xhr-range-loader');\n this.TAG = 'RangeLoader';\n\n this._seekHandler = seekHandler;\n this._config = config;\n this._needStash = false;\n\n this._chunkSizeKBList = [\n 128, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 5120, 6144, 7168, 8192\n ];\n this._currentChunkSizeKB = 384;\n this._currentSpeedNormalized = 0;\n this._zeroSpeedChunkCount = 0;\n\n this._xhr = null;\n this._speedSampler = new SpeedSampler();\n\n this._requestAbort = false;\n this._waitForTotalLength = false;\n this._totalLengthReceived = false;\n\n this._currentRequestURL = null;\n this._currentRedirectedURL = null;\n this._currentRequestRange = null;\n this._totalLength = null; // size of the entire file\n this._contentLength = null; // Content-Length of entire request range\n this._receivedLength = 0; // total received bytes\n this._lastTimeLoaded = 0; // received bytes of current request sub-range\n }\n\n destroy() {\n if (this.isWorking()) {\n this.abort();\n }\n if (this._xhr) {\n this._xhr.onreadystatechange = null;\n this._xhr.onprogress = null;\n this._xhr.onload = null;\n this._xhr.onerror = null;\n this._xhr = null;\n }\n super.destroy();\n }\n\n get currentSpeed() {\n return this._speedSampler.lastSecondKBps;\n }\n\n open(dataSource, range) {\n this._dataSource = dataSource;\n this._range = range;\n this._status = LoaderStatus.kConnecting;\n\n let useRefTotalLength = false;\n if (this._dataSource.filesize != undefined && this._dataSource.filesize !== 0) {\n useRefTotalLength = true;\n this._totalLength = this._dataSource.filesize;\n }\n\n if (!this._totalLengthReceived && !useRefTotalLength) {\n // We need total filesize\n this._waitForTotalLength = true;\n this._internalOpen(this._dataSource, {from: 0, to: -1});\n } else {\n // We have filesize, start loading\n this._openSubRange();\n }\n }\n\n _openSubRange() {\n let chunkSize = this._currentChunkSizeKB * 1024;\n\n let from = this._range.from + this._receivedLength;\n let to = from + chunkSize;\n\n if (this._contentLength != null) {\n if (to - this._range.from >= this._contentLength) {\n to = this._range.from + this._contentLength - 1;\n }\n }\n\n this._currentRequestRange = {from, to};\n this._internalOpen(this._dataSource, this._currentRequestRange);\n }\n\n _internalOpen(dataSource, range) {\n this._lastTimeLoaded = 0;\n\n let sourceURL = dataSource.url;\n if (this._config.reuseRedirectedURL) {\n if (this._currentRedirectedURL != undefined) {\n sourceURL = this._currentRedirectedURL;\n } else if (dataSource.redirectedURL != undefined) {\n sourceURL = dataSource.redirectedURL;\n }\n }\n\n let seekConfig = this._seekHandler.getConfig(sourceURL, range);\n this._currentRequestURL = seekConfig.url;\n\n let xhr = this._xhr = new XMLHttpRequest();\n xhr.open('GET', seekConfig.url, true);\n xhr.responseType = 'arraybuffer';\n xhr.onreadystatechange = this._onReadyStateChange.bind(this);\n xhr.onprogress = this._onProgress.bind(this);\n xhr.onload = this._onLoad.bind(this);\n xhr.onerror = this._onXhrError.bind(this);\n\n if (dataSource.withCredentials) {\n xhr.withCredentials = true;\n }\n\n if (typeof seekConfig.headers === 'object') {\n let headers = seekConfig.headers;\n\n for (let key in headers) {\n if (headers.hasOwnProperty(key)) {\n xhr.setRequestHeader(key, headers[key]);\n }\n }\n }\n\n // add additional headers\n if (typeof this._config.headers === 'object') {\n let headers = this._config.headers;\n\n for (let key in headers) {\n if (headers.hasOwnProperty(key)) {\n xhr.setRequestHeader(key, headers[key]);\n }\n }\n }\n\n xhr.send();\n }\n\n abort() {\n this._requestAbort = true;\n this._internalAbort();\n this._status = LoaderStatus.kComplete;\n }\n\n _internalAbort() {\n if (this._xhr) {\n this._xhr.onreadystatechange = null;\n this._xhr.onprogress = null;\n this._xhr.onload = null;\n this._xhr.onerror = null;\n this._xhr.abort();\n this._xhr = null;\n }\n }\n\n _onReadyStateChange(e) {\n let xhr = e.target;\n\n if (xhr.readyState === 2) { // HEADERS_RECEIVED\n if (xhr.responseURL != undefined) { // if the browser support this property\n let redirectedURL = this._seekHandler.removeURLParameters(xhr.responseURL);\n if (xhr.responseURL !== this._currentRequestURL && redirectedURL !== this._currentRedirectedURL) {\n this._currentRedirectedURL = redirectedURL;\n if (this._onURLRedirect) {\n this._onURLRedirect(redirectedURL);\n }\n }\n }\n\n if ((xhr.status >= 200 && xhr.status <= 299)) {\n if (this._waitForTotalLength) {\n return;\n }\n this._status = LoaderStatus.kBuffering;\n } else {\n this._status = LoaderStatus.kError;\n if (this._onError) {\n this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID, {code: xhr.status, msg: xhr.statusText});\n } else {\n throw new RuntimeException('RangeLoader: Http code invalid, ' + xhr.status + ' ' + xhr.statusText);\n }\n }\n }\n }\n\n _onProgress(e) {\n if (this._status === LoaderStatus.kError) {\n // Ignore error response\n return;\n }\n\n if (this._contentLength === null) {\n let openNextRange = false;\n\n if (this._waitForTotalLength) {\n this._waitForTotalLength = false;\n this._totalLengthReceived = true;\n openNextRange = true;\n\n let total = e.total;\n this._internalAbort();\n if (total != null & total !== 0) {\n this._totalLength = total;\n }\n }\n\n // calculate currrent request range's contentLength\n if (this._range.to === -1) {\n this._contentLength = this._totalLength - this._range.from;\n } else { // to !== -1\n this._contentLength = this._range.to - this._range.from + 1;\n }\n\n if (openNextRange) {\n this._openSubRange();\n return;\n }\n if (this._onContentLengthKnown) {\n this._onContentLengthKnown(this._contentLength);\n }\n }\n\n let delta = e.loaded - this._lastTimeLoaded;\n this._lastTimeLoaded = e.loaded;\n this._speedSampler.addBytes(delta);\n }\n\n _normalizeSpeed(input) {\n let list = this._chunkSizeKBList;\n let last = list.length - 1;\n let mid = 0;\n let lbound = 0;\n let ubound = last;\n\n if (input < list[0]) {\n return list[0];\n }\n\n while (lbound <= ubound) {\n mid = lbound + Math.floor((ubound - lbound) / 2);\n if (mid === last || (input >= list[mid] && input < list[mid + 1])) {\n return list[mid];\n } else if (list[mid] < input) {\n lbound = mid + 1;\n } else {\n ubound = mid - 1;\n }\n }\n }\n\n _onLoad(e) {\n if (this._status === LoaderStatus.kError) {\n // Ignore error response\n return;\n }\n\n if (this._waitForTotalLength) {\n this._waitForTotalLength = false;\n return;\n }\n\n this._lastTimeLoaded = 0;\n let KBps = this._speedSampler.lastSecondKBps;\n if (KBps === 0) {\n this._zeroSpeedChunkCount++;\n if (this._zeroSpeedChunkCount >= 3) {\n // Try get currentKBps after 3 chunks\n KBps = this._speedSampler.currentKBps;\n }\n }\n\n if (KBps !== 0) {\n let normalized = this._normalizeSpeed(KBps);\n if (this._currentSpeedNormalized !== normalized) {\n this._currentSpeedNormalized = normalized;\n this._currentChunkSizeKB = normalized;\n }\n }\n\n let chunk = e.target.response;\n let byteStart = this._range.from + this._receivedLength;\n this._receivedLength += chunk.byteLength;\n\n let reportComplete = false;\n\n if (this._contentLength != null && this._receivedLength < this._contentLength) {\n // continue load next chunk\n this._openSubRange();\n } else {\n reportComplete = true;\n }\n\n // dispatch received chunk\n if (this._onDataArrival) {\n this._onDataArrival(chunk, byteStart, this._receivedLength);\n }\n\n if (reportComplete) {\n this._status = LoaderStatus.kComplete;\n if (this._onComplete) {\n this._onComplete(this._range.from, this._range.from + this._receivedLength - 1);\n }\n }\n }\n\n _onXhrError(e) {\n this._status = LoaderStatus.kError;\n let type = 0;\n let info = null;\n\n if (this._contentLength && this._receivedLength > 0\n && this._receivedLength < this._contentLength) {\n type = LoaderErrors.EARLY_EOF;\n info = {code: -1, msg: 'RangeLoader meet Early-Eof'};\n } else {\n type = LoaderErrors.EXCEPTION;\n info = {code: -1, msg: e.constructor.name + ' ' + e.type};\n }\n\n if (this._onError) {\n this._onError(type, info);\n } else {\n throw new RuntimeException(info.msg);\n }\n }\n\n}\n\nexport default RangeLoader;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport EventEmitter from 'events';\nimport Log from '../utils/logger.js';\nimport Browser from '../utils/browser.js';\nimport PlayerEvents from './player-events.js';\nimport Transmuxer from '../core/transmuxer.js';\nimport TransmuxingEvents from '../core/transmuxing-events.js';\nimport MSEController from '../core/mse-controller.js';\nimport MSEEvents from '../core/mse-events.js';\nimport {ErrorTypes, ErrorDetails} from './player-errors.js';\nimport {createDefaultConfig} from '../config.js';\nimport {InvalidArgumentException, IllegalStateException} from '../utils/exception.js';\n\nclass FlvPlayer {\n\n constructor(mediaDataSource, config) {\n this.TAG = 'FlvPlayer';\n this._type = 'FlvPlayer';\n this._emitter = new EventEmitter();\n\n this._config = createDefaultConfig();\n if (typeof config === 'object') {\n Object.assign(this._config, config);\n }\n\n if (mediaDataSource.type.toLowerCase() !== 'flv') {\n throw new InvalidArgumentException('FlvPlayer requires an flv MediaDataSource input!');\n }\n\n if (mediaDataSource.isLive === true) {\n this._config.isLive = true;\n }\n\n this.e = {\n onvLoadedMetadata: this._onvLoadedMetadata.bind(this),\n onvSeeking: this._onvSeeking.bind(this),\n onvCanPlay: this._onvCanPlay.bind(this),\n onvStalled: this._onvStalled.bind(this),\n onvProgress: this._onvProgress.bind(this)\n };\n\n if (self.performance && self.performance.now) {\n this._now = self.performance.now.bind(self.performance);\n } else {\n this._now = Date.now;\n }\n\n this._pendingSeekTime = null; // in seconds\n this._requestSetTime = false;\n this._seekpointRecord = null;\n this._progressChecker = null;\n\n this._mediaDataSource = mediaDataSource;\n this._mediaElement = null;\n this._msectl = null;\n this._transmuxer = null;\n\n this._mseSourceOpened = false;\n this._hasPendingLoad = false;\n this._receivedCanPlay = false;\n\n this._mediaInfo = null;\n this._statisticsInfo = null;\n\n let chromeNeedIDRFix = (Browser.chrome &&\n (Browser.version.major < 50 ||\n (Browser.version.major === 50 && Browser.version.build < 2661)));\n this._alwaysSeekKeyframe = (chromeNeedIDRFix || Browser.msedge || Browser.msie) ? true : false;\n\n if (this._alwaysSeekKeyframe) {\n this._config.accurateSeek = false;\n }\n }\n\n destroy() {\n if (this._progressChecker != null) {\n window.clearInterval(this._progressChecker);\n this._progressChecker = null;\n }\n if (this._transmuxer) {\n this.unload();\n }\n if (this._mediaElement) {\n this.detachMediaElement();\n }\n this.e = null;\n this._mediaDataSource = null;\n\n this._emitter.removeAllListeners();\n this._emitter = null;\n }\n\n on(event, listener) {\n if (event === PlayerEvents.MEDIA_INFO) {\n if (this._mediaInfo != null) {\n Promise.resolve().then(() => {\n this._emitter.emit(PlayerEvents.MEDIA_INFO, this.mediaInfo);\n });\n }\n } else if (event === PlayerEvents.STATISTICS_INFO) {\n if (this._statisticsInfo != null) {\n Promise.resolve().then(() => {\n this._emitter.emit(PlayerEvents.STATISTICS_INFO, this.statisticsInfo);\n });\n }\n }\n this._emitter.addListener(event, listener);\n }\n\n off(event, listener) {\n this._emitter.removeListener(event, listener);\n }\n\n attachMediaElement(mediaElement) {\n this._mediaElement = mediaElement;\n mediaElement.addEventListener('loadedmetadata', this.e.onvLoadedMetadata);\n mediaElement.addEventListener('seeking', this.e.onvSeeking);\n mediaElement.addEventListener('canplay', this.e.onvCanPlay);\n mediaElement.addEventListener('stalled', this.e.onvStalled);\n mediaElement.addEventListener('progress', this.e.onvProgress);\n\n this._msectl = new MSEController(this._config);\n\n this._msectl.on(MSEEvents.UPDATE_END, this._onmseUpdateEnd.bind(this));\n this._msectl.on(MSEEvents.BUFFER_FULL, this._onmseBufferFull.bind(this));\n this._msectl.on(MSEEvents.SOURCE_OPEN, () => {\n this._mseSourceOpened = true;\n if (this._hasPendingLoad) {\n this._hasPendingLoad = false;\n this.load();\n }\n });\n this._msectl.on(MSEEvents.ERROR, (info) => {\n this._emitter.emit(PlayerEvents.ERROR,\n ErrorTypes.MEDIA_ERROR,\n ErrorDetails.MEDIA_MSE_ERROR,\n info\n );\n });\n\n this._msectl.attachMediaElement(mediaElement);\n\n if (this._pendingSeekTime != null) {\n try {\n mediaElement.currentTime = this._pendingSeekTime;\n this._pendingSeekTime = null;\n } catch (e) {\n // IE11 may throw InvalidStateError if readyState === 0\n // We can defer set currentTime operation after loadedmetadata\n }\n }\n }\n\n detachMediaElement() {\n if (this._mediaElement) {\n this._msectl.detachMediaElement();\n this._mediaElement.removeEventListener('loadedmetadata', this.e.onvLoadedMetadata);\n this._mediaElement.removeEventListener('seeking', this.e.onvSeeking);\n this._mediaElement.removeEventListener('canplay', this.e.onvCanPlay);\n this._mediaElement.removeEventListener('stalled', this.e.onvStalled);\n this._mediaElement.removeEventListener('progress', this.e.onvProgress);\n this._mediaElement = null;\n }\n if (this._msectl) {\n this._msectl.destroy();\n this._msectl = null;\n }\n }\n\n load() {\n if (!this._mediaElement) {\n throw new IllegalStateException('HTMLMediaElement must be attached before load()!');\n }\n if (this._transmuxer) {\n throw new IllegalStateException('FlvPlayer.load() has been called, please call unload() first!');\n }\n if (this._hasPendingLoad) {\n return;\n }\n\n if (this._config.deferLoadAfterSourceOpen && this._mseSourceOpened === false) {\n this._hasPendingLoad = true;\n return;\n }\n\n if (this._mediaElement.readyState > 0) {\n this._requestSetTime = true;\n // IE11 may throw InvalidStateError if readyState === 0\n this._mediaElement.currentTime = 0;\n }\n\n this._transmuxer = new Transmuxer(this._mediaDataSource, this._config);\n\n this._transmuxer.on(TransmuxingEvents.INIT_SEGMENT, (type, is) => {\n this._msectl.appendInitSegment(is);\n });\n this._transmuxer.on(TransmuxingEvents.MEDIA_SEGMENT, (type, ms) => {\n this._msectl.appendMediaSegment(ms);\n\n // lazyLoad check\n if (this._config.lazyLoad && !this._config.isLive) {\n let currentTime = this._mediaElement.currentTime;\n if (ms.info.endDts >= (currentTime + this._config.lazyLoadMaxDuration) * 1000) {\n if (this._progressChecker == null) {\n Log.v(this.TAG, 'Maximum buffering duration exceeded, suspend transmuxing task');\n this._suspendTransmuxer();\n }\n }\n }\n });\n this._transmuxer.on(TransmuxingEvents.LOADING_COMPLETE, () => {\n this._msectl.endOfStream();\n this._emitter.emit(PlayerEvents.LOADING_COMPLETE);\n });\n this._transmuxer.on(TransmuxingEvents.RECOVERED_EARLY_EOF, () => {\n this._emitter.emit(PlayerEvents.RECOVERED_EARLY_EOF);\n });\n this._transmuxer.on(TransmuxingEvents.IO_ERROR, (detail, info) => {\n this._emitter.emit(PlayerEvents.ERROR, ErrorTypes.NETWORK_ERROR, detail, info);\n });\n this._transmuxer.on(TransmuxingEvents.DEMUX_ERROR, (detail, info) => {\n this._emitter.emit(PlayerEvents.ERROR, ErrorTypes.MEDIA_ERROR, detail, {code: -1, msg: info});\n });\n this._transmuxer.on(TransmuxingEvents.MEDIA_INFO, (mediaInfo) => {\n this._mediaInfo = mediaInfo;\n this._emitter.emit(PlayerEvents.MEDIA_INFO, Object.assign({}, mediaInfo));\n });\n this._transmuxer.on(TransmuxingEvents.METADATA_ARRIVED, (metadata) => {\n this._emitter.emit(PlayerEvents.METADATA_ARRIVED, metadata);\n });\n this._transmuxer.on(TransmuxingEvents.SCRIPTDATA_ARRIVED, (data) => {\n this._emitter.emit(PlayerEvents.SCRIPTDATA_ARRIVED, data);\n });\n this._transmuxer.on(TransmuxingEvents.STATISTICS_INFO, (statInfo) => {\n this._statisticsInfo = this._fillStatisticsInfo(statInfo);\n this._emitter.emit(PlayerEvents.STATISTICS_INFO, Object.assign({}, this._statisticsInfo));\n });\n this._transmuxer.on(TransmuxingEvents.RECOMMEND_SEEKPOINT, (milliseconds) => {\n if (this._mediaElement && !this._config.accurateSeek) {\n this._requestSetTime = true;\n this._mediaElement.currentTime = milliseconds / 1000;\n }\n });\n\n this._transmuxer.open();\n }\n\n unload() {\n if (this._mediaElement) {\n this._mediaElement.pause();\n }\n if (this._msectl) {\n this._msectl.seek(0);\n }\n if (this._transmuxer) {\n this._transmuxer.close();\n this._transmuxer.destroy();\n this._transmuxer = null;\n }\n }\n\n play() {\n return this._mediaElement.play();\n }\n\n pause() {\n this._mediaElement.pause();\n }\n\n get type() {\n return this._type;\n }\n\n get buffered() {\n return this._mediaElement.buffered;\n }\n\n get duration() {\n return this._mediaElement.duration;\n }\n\n get volume() {\n return this._mediaElement.volume;\n }\n\n set volume(value) {\n this._mediaElement.volume = value;\n }\n\n get muted() {\n return this._mediaElement.muted;\n }\n\n set muted(muted) {\n this._mediaElement.muted = muted;\n }\n\n get currentTime() {\n if (this._mediaElement) {\n return this._mediaElement.currentTime;\n }\n return 0;\n }\n\n set currentTime(seconds) {\n if (this._mediaElement) {\n this._internalSeek(seconds);\n } else {\n this._pendingSeekTime = seconds;\n }\n }\n\n get mediaInfo() {\n return Object.assign({}, this._mediaInfo);\n }\n\n get statisticsInfo() {\n if (this._statisticsInfo == null) {\n this._statisticsInfo = {};\n }\n this._statisticsInfo = this._fillStatisticsInfo(this._statisticsInfo);\n return Object.assign({}, this._statisticsInfo);\n }\n\n _fillStatisticsInfo(statInfo) {\n statInfo.playerType = this._type;\n\n if (!(this._mediaElement instanceof HTMLVideoElement)) {\n return statInfo;\n }\n\n let hasQualityInfo = true;\n let decoded = 0;\n let dropped = 0;\n\n if (this._mediaElement.getVideoPlaybackQuality) {\n let quality = this._mediaElement.getVideoPlaybackQuality();\n decoded = quality.totalVideoFrames;\n dropped = quality.droppedVideoFrames;\n } else if (this._mediaElement.webkitDecodedFrameCount != undefined) {\n decoded = this._mediaElement.webkitDecodedFrameCount;\n dropped = this._mediaElement.webkitDroppedFrameCount;\n } else {\n hasQualityInfo = false;\n }\n\n if (hasQualityInfo) {\n statInfo.decodedFrames = decoded;\n statInfo.droppedFrames = dropped;\n }\n\n return statInfo;\n }\n\n _onmseUpdateEnd() {\n if (!this._config.lazyLoad || this._config.isLive) {\n return;\n }\n\n let buffered = this._mediaElement.buffered;\n let currentTime = this._mediaElement.currentTime;\n let currentRangeStart = 0;\n let currentRangeEnd = 0;\n\n for (let i = 0; i < buffered.length; i++) {\n let start = buffered.start(i);\n let end = buffered.end(i);\n if (start <= currentTime && currentTime < end) {\n currentRangeStart = start;\n currentRangeEnd = end;\n break;\n }\n }\n\n if (currentRangeEnd >= currentTime + this._config.lazyLoadMaxDuration && this._progressChecker == null) {\n Log.v(this.TAG, 'Maximum buffering duration exceeded, suspend transmuxing task');\n this._suspendTransmuxer();\n }\n }\n\n _onmseBufferFull() {\n Log.v(this.TAG, 'MSE SourceBuffer is full, suspend transmuxing task');\n if (this._progressChecker == null) {\n this._suspendTransmuxer();\n }\n }\n\n _suspendTransmuxer() {\n if (this._transmuxer) {\n this._transmuxer.pause();\n\n if (this._progressChecker == null) {\n this._progressChecker = window.setInterval(this._checkProgressAndResume.bind(this), 1000);\n }\n }\n }\n\n _checkProgressAndResume() {\n let currentTime = this._mediaElement.currentTime;\n let buffered = this._mediaElement.buffered;\n\n let needResume = false;\n\n for (let i = 0; i < buffered.length; i++) {\n let from = buffered.start(i);\n let to = buffered.end(i);\n if (currentTime >= from && currentTime < to) {\n if (currentTime >= to - this._config.lazyLoadRecoverDuration) {\n needResume = true;\n }\n break;\n }\n }\n\n if (needResume) {\n window.clearInterval(this._progressChecker);\n this._progressChecker = null;\n if (needResume) {\n Log.v(this.TAG, 'Continue loading from paused position');\n this._transmuxer.resume();\n }\n }\n }\n\n _isTimepointBuffered(seconds) {\n let buffered = this._mediaElement.buffered;\n\n for (let i = 0; i < buffered.length; i++) {\n let from = buffered.start(i);\n let to = buffered.end(i);\n if (seconds >= from && seconds < to) {\n return true;\n }\n }\n return false;\n }\n\n _internalSeek(seconds) {\n let directSeek = this._isTimepointBuffered(seconds);\n\n let directSeekBegin = false;\n let directSeekBeginTime = 0;\n\n if (seconds < 1.0 && this._mediaElement.buffered.length > 0) {\n let videoBeginTime = this._mediaElement.buffered.start(0);\n if ((videoBeginTime < 1.0 && seconds < videoBeginTime) || Browser.safari) {\n directSeekBegin = true;\n // also workaround for Safari: Seek to 0 may cause video stuck, use 0.1 to avoid\n directSeekBeginTime = Browser.safari ? 0.1 : videoBeginTime;\n }\n }\n\n if (directSeekBegin) { // seek to video begin, set currentTime directly if beginPTS buffered\n this._requestSetTime = true;\n this._mediaElement.currentTime = directSeekBeginTime;\n } else if (directSeek) { // buffered position\n if (!this._alwaysSeekKeyframe) {\n this._requestSetTime = true;\n this._mediaElement.currentTime = seconds;\n } else {\n let idr = this._msectl.getNearestKeyframe(Math.floor(seconds * 1000));\n this._requestSetTime = true;\n if (idr != null) {\n this._mediaElement.currentTime = idr.dts / 1000;\n } else {\n this._mediaElement.currentTime = seconds;\n }\n }\n if (this._progressChecker != null) {\n this._checkProgressAndResume();\n }\n } else {\n if (this._progressChecker != null) {\n window.clearInterval(this._progressChecker);\n this._progressChecker = null;\n }\n this._msectl.seek(seconds);\n this._transmuxer.seek(Math.floor(seconds * 1000)); // in milliseconds\n // no need to set mediaElement.currentTime if non-accurateSeek,\n // just wait for the recommend_seekpoint callback\n if (this._config.accurateSeek) {\n this._requestSetTime = true;\n this._mediaElement.currentTime = seconds;\n }\n }\n }\n\n _checkAndApplyUnbufferedSeekpoint() {\n if (this._seekpointRecord) {\n if (this._seekpointRecord.recordTime <= this._now() - 100) {\n let target = this._mediaElement.currentTime;\n this._seekpointRecord = null;\n if (!this._isTimepointBuffered(target)) {\n if (this._progressChecker != null) {\n window.clearTimeout(this._progressChecker);\n this._progressChecker = null;\n }\n // .currentTime is consists with .buffered timestamp\n // Chrome/Edge use DTS, while FireFox/Safari use PTS\n this._msectl.seek(target);\n this._transmuxer.seek(Math.floor(target * 1000));\n // set currentTime if accurateSeek, or wait for recommend_seekpoint callback\n if (this._config.accurateSeek) {\n this._requestSetTime = true;\n this._mediaElement.currentTime = target;\n }\n }\n } else {\n window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this), 50);\n }\n }\n }\n\n _checkAndResumeStuckPlayback(stalled) {\n let media = this._mediaElement;\n if (stalled || !this._receivedCanPlay || media.readyState < 2) { // HAVE_CURRENT_DATA\n let buffered = media.buffered;\n if (buffered.length > 0 && media.currentTime < buffered.start(0)) {\n Log.w(this.TAG, `Playback seems stuck at ${media.currentTime}, seek to ${buffered.start(0)}`);\n this._requestSetTime = true;\n this._mediaElement.currentTime = buffered.start(0);\n this._mediaElement.removeEventListener('progress', this.e.onvProgress);\n }\n } else {\n // Playback didn't stuck, remove progress event listener\n this._mediaElement.removeEventListener('progress', this.e.onvProgress);\n }\n }\n\n _onvLoadedMetadata(e) {\n if (this._pendingSeekTime != null) {\n this._mediaElement.currentTime = this._pendingSeekTime;\n this._pendingSeekTime = null;\n }\n }\n\n _onvSeeking(e) { // handle seeking request from browser's progress bar\n let target = this._mediaElement.currentTime;\n let buffered = this._mediaElement.buffered;\n\n if (this._requestSetTime) {\n this._requestSetTime = false;\n return;\n }\n\n if (target < 1.0 && buffered.length > 0) {\n // seek to video begin, set currentTime directly if beginPTS buffered\n let videoBeginTime = buffered.start(0);\n if ((videoBeginTime < 1.0 && target < videoBeginTime) || Browser.safari) {\n this._requestSetTime = true;\n // also workaround for Safari: Seek to 0 may cause video stuck, use 0.1 to avoid\n this._mediaElement.currentTime = Browser.safari ? 0.1 : videoBeginTime;\n return;\n }\n }\n\n if (this._isTimepointBuffered(target)) {\n if (this._alwaysSeekKeyframe) {\n let idr = this._msectl.getNearestKeyframe(Math.floor(target * 1000));\n if (idr != null) {\n this._requestSetTime = true;\n this._mediaElement.currentTime = idr.dts / 1000;\n }\n }\n if (this._progressChecker != null) {\n this._checkProgressAndResume();\n }\n return;\n }\n\n this._seekpointRecord = {\n seekPoint: target,\n recordTime: this._now()\n };\n window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this), 50);\n }\n\n _onvCanPlay(e) {\n this._receivedCanPlay = true;\n this._mediaElement.removeEventListener('canplay', this.e.onvCanPlay);\n }\n\n _onvStalled(e) {\n this._checkAndResumeStuckPlayback(true);\n }\n\n _onvProgress(e) {\n this._checkAndResumeStuckPlayback();\n }\n\n}\n\nexport default FlvPlayer;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport EventEmitter from 'events';\nimport PlayerEvents from './player-events.js';\nimport {createDefaultConfig} from '../config.js';\nimport {InvalidArgumentException, IllegalStateException} from '../utils/exception.js';\n\n// Player wrapper for browser's native player (HTMLVideoElement) without MediaSource src. \nclass NativePlayer {\n\n constructor(mediaDataSource, config) {\n this.TAG = 'NativePlayer';\n this._type = 'NativePlayer';\n this._emitter = new EventEmitter();\n\n this._config = createDefaultConfig();\n if (typeof config === 'object') {\n Object.assign(this._config, config);\n }\n\n if (mediaDataSource.type.toLowerCase() === 'flv') {\n throw new InvalidArgumentException('NativePlayer does\\'t support flv MediaDataSource input!');\n }\n if (mediaDataSource.hasOwnProperty('segments')) {\n throw new InvalidArgumentException(`NativePlayer(${mediaDataSource.type}) doesn't support multipart playback!`);\n }\n\n this.e = {\n onvLoadedMetadata: this._onvLoadedMetadata.bind(this)\n };\n\n this._pendingSeekTime = null;\n this._statisticsReporter = null;\n\n this._mediaDataSource = mediaDataSource;\n this._mediaElement = null;\n }\n\n destroy() {\n if (this._mediaElement) {\n this.unload();\n this.detachMediaElement();\n }\n this.e = null;\n this._mediaDataSource = null;\n this._emitter.removeAllListeners();\n this._emitter = null;\n }\n\n on(event, listener) {\n if (event === PlayerEvents.MEDIA_INFO) {\n if (this._mediaElement != null && this._mediaElement.readyState !== 0) { // HAVE_NOTHING\n Promise.resolve().then(() => {\n this._emitter.emit(PlayerEvents.MEDIA_INFO, this.mediaInfo);\n });\n }\n } else if (event === PlayerEvents.STATISTICS_INFO) {\n if (this._mediaElement != null && this._mediaElement.readyState !== 0) {\n Promise.resolve().then(() => {\n this._emitter.emit(PlayerEvents.STATISTICS_INFO, this.statisticsInfo);\n });\n }\n }\n this._emitter.addListener(event, listener);\n }\n\n off(event, listener) {\n this._emitter.removeListener(event, listener);\n }\n\n attachMediaElement(mediaElement) {\n this._mediaElement = mediaElement;\n mediaElement.addEventListener('loadedmetadata', this.e.onvLoadedMetadata);\n\n if (this._pendingSeekTime != null) {\n try {\n mediaElement.currentTime = this._pendingSeekTime;\n this._pendingSeekTime = null;\n } catch (e) {\n // IE11 may throw InvalidStateError if readyState === 0\n // Defer set currentTime operation after loadedmetadata\n }\n }\n }\n\n detachMediaElement() {\n if (this._mediaElement) {\n this._mediaElement.src = '';\n this._mediaElement.removeAttribute('src');\n this._mediaElement.removeEventListener('loadedmetadata', this.e.onvLoadedMetadata);\n this._mediaElement = null;\n }\n if (this._statisticsReporter != null) {\n window.clearInterval(this._statisticsReporter);\n this._statisticsReporter = null;\n }\n }\n\n load() {\n if (!this._mediaElement) {\n throw new IllegalStateException('HTMLMediaElement must be attached before load()!');\n }\n this._mediaElement.src = this._mediaDataSource.url;\n\n if (this._mediaElement.readyState > 0) {\n this._mediaElement.currentTime = 0;\n }\n\n this._mediaElement.preload = 'auto';\n this._mediaElement.load();\n this._statisticsReporter = window.setInterval(\n this._reportStatisticsInfo.bind(this),\n this._config.statisticsInfoReportInterval);\n }\n\n unload() {\n if (this._mediaElement) {\n this._mediaElement.src = '';\n this._mediaElement.removeAttribute('src');\n }\n if (this._statisticsReporter != null) {\n window.clearInterval(this._statisticsReporter);\n this._statisticsReporter = null;\n }\n }\n\n play() {\n return this._mediaElement.play();\n }\n\n pause() {\n this._mediaElement.pause();\n }\n\n get type() {\n return this._type;\n }\n\n get buffered() {\n return this._mediaElement.buffered;\n }\n\n get duration() {\n return this._mediaElement.duration;\n }\n\n get volume() {\n return this._mediaElement.volume;\n }\n\n set volume(value) {\n this._mediaElement.volume = value;\n }\n\n get muted() {\n return this._mediaElement.muted;\n }\n\n set muted(muted) {\n this._mediaElement.muted = muted;\n }\n\n get currentTime() {\n if (this._mediaElement) {\n return this._mediaElement.currentTime;\n }\n return 0;\n }\n\n set currentTime(seconds) {\n if (this._mediaElement) {\n this._mediaElement.currentTime = seconds;\n } else {\n this._pendingSeekTime = seconds;\n }\n }\n\n get mediaInfo() {\n let mediaPrefix = (this._mediaElement instanceof HTMLAudioElement) ? 'audio/' : 'video/';\n let info = {\n mimeType: mediaPrefix + this._mediaDataSource.type\n };\n if (this._mediaElement) {\n info.duration = Math.floor(this._mediaElement.duration * 1000);\n if (this._mediaElement instanceof HTMLVideoElement) {\n info.width = this._mediaElement.videoWidth;\n info.height = this._mediaElement.videoHeight;\n }\n }\n return info;\n }\n\n get statisticsInfo() {\n let info = {\n playerType: this._type,\n url: this._mediaDataSource.url\n };\n\n if (!(this._mediaElement instanceof HTMLVideoElement)) {\n return info;\n }\n\n let hasQualityInfo = true;\n let decoded = 0;\n let dropped = 0;\n\n if (this._mediaElement.getVideoPlaybackQuality) {\n let quality = this._mediaElement.getVideoPlaybackQuality();\n decoded = quality.totalVideoFrames;\n dropped = quality.droppedVideoFrames;\n } else if (this._mediaElement.webkitDecodedFrameCount != undefined) {\n decoded = this._mediaElement.webkitDecodedFrameCount;\n dropped = this._mediaElement.webkitDroppedFrameCount;\n } else {\n hasQualityInfo = false;\n }\n\n if (hasQualityInfo) {\n info.decodedFrames = decoded;\n info.droppedFrames = dropped;\n }\n \n return info;\n }\n\n _onvLoadedMetadata(e) {\n if (this._pendingSeekTime != null) {\n this._mediaElement.currentTime = this._pendingSeekTime;\n this._pendingSeekTime = null;\n }\n this._emitter.emit(PlayerEvents.MEDIA_INFO, this.mediaInfo);\n }\n\n _reportStatisticsInfo() {\n this._emitter.emit(PlayerEvents.STATISTICS_INFO, this.statisticsInfo);\n }\n\n}\n\nexport default NativePlayer;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {LoaderErrors} from '../io/loader.js';\nimport DemuxErrors from '../demux/demux-errors.js';\n\nexport const ErrorTypes = {\n NETWORK_ERROR: 'NetworkError',\n MEDIA_ERROR: 'MediaError',\n OTHER_ERROR: 'OtherError'\n};\n\nexport const ErrorDetails = {\n NETWORK_EXCEPTION: LoaderErrors.EXCEPTION,\n NETWORK_STATUS_CODE_INVALID: LoaderErrors.HTTP_STATUS_CODE_INVALID,\n NETWORK_TIMEOUT: LoaderErrors.CONNECTING_TIMEOUT,\n NETWORK_UNRECOVERABLE_EARLY_EOF: LoaderErrors.UNRECOVERABLE_EARLY_EOF,\n\n MEDIA_MSE_ERROR: 'MediaMSEError',\n\n MEDIA_FORMAT_ERROR: DemuxErrors.FORMAT_ERROR,\n MEDIA_FORMAT_UNSUPPORTED: DemuxErrors.FORMAT_UNSUPPORTED,\n MEDIA_CODEC_UNSUPPORTED: DemuxErrors.CODEC_UNSUPPORTED\n};","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst PlayerEvents = {\n ERROR: 'error',\n LOADING_COMPLETE: 'loading_complete',\n RECOVERED_EARLY_EOF: 'recovered_early_eof',\n MEDIA_INFO: 'media_info',\n METADATA_ARRIVED: 'metadata_arrived',\n SCRIPTDATA_ARRIVED: 'scriptdata_arrived',\n STATISTICS_INFO: 'statistics_info'\n};\n\nexport default PlayerEvents;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * This file is modified from dailymotion's hls.js library (hls.js/src/helper/aac.js)\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nclass AAC {\n\n static getSilentFrame(codec, channelCount) {\n if (codec === 'mp4a.40.2') {\n // handle LC-AAC\n if (channelCount === 1) {\n return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x23, 0x80]);\n } else if (channelCount === 2) {\n return new Uint8Array([0x21, 0x00, 0x49, 0x90, 0x02, 0x19, 0x00, 0x23, 0x80]);\n } else if (channelCount === 3) {\n return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x8e]);\n } else if (channelCount === 4) {\n return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x80, 0x2c, 0x80, 0x08, 0x02, 0x38]);\n } else if (channelCount === 5) {\n return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x82, 0x30, 0x04, 0x99, 0x00, 0x21, 0x90, 0x02, 0x38]);\n } else if (channelCount === 6) {\n return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x82, 0x30, 0x04, 0x99, 0x00, 0x21, 0x90, 0x02, 0x00, 0xb2, 0x00, 0x20, 0x08, 0xe0]);\n }\n } else {\n // handle HE-AAC (mp4a.40.5 / mp4a.40.29)\n if (channelCount === 1) {\n // ffmpeg -y -f lavfi -i \"aevalsrc=0:d=0.05\" -c:a libfdk_aac -profile:a aac_he -b:a 4k output.aac && hexdump -v -e '16/1 \"0x%x,\" \"\\n\"' -v output.aac\n return new Uint8Array([0x1, 0x40, 0x22, 0x80, 0xa3, 0x4e, 0xe6, 0x80, 0xba, 0x8, 0x0, 0x0, 0x0, 0x1c, 0x6, 0xf1, 0xc1, 0xa, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5e]);\n } else if (channelCount === 2) {\n // ffmpeg -y -f lavfi -i \"aevalsrc=0|0:d=0.05\" -c:a libfdk_aac -profile:a aac_he_v2 -b:a 4k output.aac && hexdump -v -e '16/1 \"0x%x,\" \"\\n\"' -v output.aac\n return new Uint8Array([0x1, 0x40, 0x22, 0x80, 0xa3, 0x5e, 0xe6, 0x80, 0xba, 0x8, 0x0, 0x0, 0x0, 0x0, 0x95, 0x0, 0x6, 0xf1, 0xa1, 0xa, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5e]);\n } else if (channelCount === 3) {\n // ffmpeg -y -f lavfi -i \"aevalsrc=0|0|0:d=0.05\" -c:a libfdk_aac -profile:a aac_he_v2 -b:a 4k output.aac && hexdump -v -e '16/1 \"0x%x,\" \"\\n\"' -v output.aac\n return new Uint8Array([0x1, 0x40, 0x22, 0x80, 0xa3, 0x5e, 0xe6, 0x80, 0xba, 0x8, 0x0, 0x0, 0x0, 0x0, 0x95, 0x0, 0x6, 0xf1, 0xa1, 0xa, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5e]);\n }\n }\n return null;\n }\n\n}\n\nexport default AAC;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * This file is derived from dailymotion's hls.js library (hls.js/src/remux/mp4-generator.js)\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// MP4 boxes generator for ISO BMFF (ISO Base Media File Format, defined in ISO/IEC 14496-12)\nclass MP4 {\n\n static init() {\n MP4.types = {\n avc1: [], avcC: [], btrt: [], dinf: [],\n dref: [], esds: [], ftyp: [], hdlr: [],\n mdat: [], mdhd: [], mdia: [], mfhd: [],\n minf: [], moof: [], moov: [], mp4a: [],\n mvex: [], mvhd: [], sdtp: [], stbl: [],\n stco: [], stsc: [], stsd: [], stsz: [],\n stts: [], tfdt: [], tfhd: [], traf: [],\n trak: [], trun: [], trex: [], tkhd: [],\n vmhd: [], smhd: [], '.mp3': []\n };\n\n for (let name in MP4.types) {\n if (MP4.types.hasOwnProperty(name)) {\n MP4.types[name] = [\n name.charCodeAt(0),\n name.charCodeAt(1),\n name.charCodeAt(2),\n name.charCodeAt(3)\n ];\n }\n }\n\n let constants = MP4.constants = {};\n\n constants.FTYP = new Uint8Array([\n 0x69, 0x73, 0x6F, 0x6D, // major_brand: isom\n 0x0, 0x0, 0x0, 0x1, // minor_version: 0x01\n 0x69, 0x73, 0x6F, 0x6D, // isom\n 0x61, 0x76, 0x63, 0x31 // avc1\n ]);\n\n constants.STSD_PREFIX = new Uint8Array([\n 0x00, 0x00, 0x00, 0x00, // version(0) + flags\n 0x00, 0x00, 0x00, 0x01 // entry_count\n ]);\n\n constants.STTS = new Uint8Array([\n 0x00, 0x00, 0x00, 0x00, // version(0) + flags\n 0x00, 0x00, 0x00, 0x00 // entry_count\n ]);\n\n constants.STSC = constants.STCO = constants.STTS;\n\n constants.STSZ = new Uint8Array([\n 0x00, 0x00, 0x00, 0x00, // version(0) + flags\n 0x00, 0x00, 0x00, 0x00, // sample_size\n 0x00, 0x00, 0x00, 0x00 // sample_count\n ]);\n\n constants.HDLR_VIDEO = new Uint8Array([\n 0x00, 0x00, 0x00, 0x00, // version(0) + flags\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n 0x76, 0x69, 0x64, 0x65, // handler_type: 'vide'\n 0x00, 0x00, 0x00, 0x00, // reserved: 3 * 4 bytes\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x56, 0x69, 0x64, 0x65,\n 0x6F, 0x48, 0x61, 0x6E,\n 0x64, 0x6C, 0x65, 0x72, 0x00 // name: VideoHandler\n ]);\n\n constants.HDLR_AUDIO = new Uint8Array([\n 0x00, 0x00, 0x00, 0x00, // version(0) + flags\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n 0x73, 0x6F, 0x75, 0x6E, // handler_type: 'soun'\n 0x00, 0x00, 0x00, 0x00, // reserved: 3 * 4 bytes\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x53, 0x6F, 0x75, 0x6E,\n 0x64, 0x48, 0x61, 0x6E,\n 0x64, 0x6C, 0x65, 0x72, 0x00 // name: SoundHandler\n ]);\n\n constants.DREF = new Uint8Array([\n 0x00, 0x00, 0x00, 0x00, // version(0) + flags\n 0x00, 0x00, 0x00, 0x01, // entry_count\n 0x00, 0x00, 0x00, 0x0C, // entry_size\n 0x75, 0x72, 0x6C, 0x20, // type 'url '\n 0x00, 0x00, 0x00, 0x01 // version(0) + flags\n ]);\n\n // Sound media header\n constants.SMHD = new Uint8Array([\n 0x00, 0x00, 0x00, 0x00, // version(0) + flags\n 0x00, 0x00, 0x00, 0x00 // balance(2) + reserved(2)\n ]);\n\n // video media header\n constants.VMHD = new Uint8Array([\n 0x00, 0x00, 0x00, 0x01, // version(0) + flags\n 0x00, 0x00, // graphicsmode: 2 bytes\n 0x00, 0x00, 0x00, 0x00, // opcolor: 3 * 2 bytes\n 0x00, 0x00\n ]);\n }\n\n // Generate a box\n static box(type) {\n let size = 8;\n let result = null;\n let datas = Array.prototype.slice.call(arguments, 1);\n let arrayCount = datas.length;\n\n for (let i = 0; i < arrayCount; i++) {\n size += datas[i].byteLength;\n }\n\n result = new Uint8Array(size);\n result[0] = (size >>> 24) & 0xFF; // size\n result[1] = (size >>> 16) & 0xFF;\n result[2] = (size >>> 8) & 0xFF;\n result[3] = (size) & 0xFF;\n\n result.set(type, 4); // type\n\n let offset = 8;\n for (let i = 0; i < arrayCount; i++) { // data body\n result.set(datas[i], offset);\n offset += datas[i].byteLength;\n }\n\n return result;\n }\n\n // emit ftyp & moov\n static generateInitSegment(meta) {\n let ftyp = MP4.box(MP4.types.ftyp, MP4.constants.FTYP);\n let moov = MP4.moov(meta);\n\n let result = new Uint8Array(ftyp.byteLength + moov.byteLength);\n result.set(ftyp, 0);\n result.set(moov, ftyp.byteLength);\n return result;\n }\n\n // Movie metadata box\n static moov(meta) {\n let mvhd = MP4.mvhd(meta.timescale, meta.duration);\n let trak = MP4.trak(meta);\n let mvex = MP4.mvex(meta);\n return MP4.box(MP4.types.moov, mvhd, trak, mvex);\n }\n\n // Movie header box\n static mvhd(timescale, duration) {\n return MP4.box(MP4.types.mvhd, new Uint8Array([\n 0x00, 0x00, 0x00, 0x00, // version(0) + flags\n 0x00, 0x00, 0x00, 0x00, // creation_time\n 0x00, 0x00, 0x00, 0x00, // modification_time\n (timescale >>> 24) & 0xFF, // timescale: 4 bytes\n (timescale >>> 16) & 0xFF,\n (timescale >>> 8) & 0xFF,\n (timescale) & 0xFF,\n (duration >>> 24) & 0xFF, // duration: 4 bytes\n (duration >>> 16) & 0xFF,\n (duration >>> 8) & 0xFF,\n (duration) & 0xFF,\n 0x00, 0x01, 0x00, 0x00, // Preferred rate: 1.0\n 0x01, 0x00, 0x00, 0x00, // PreferredVolume(1.0, 2bytes) + reserved(2bytes)\n 0x00, 0x00, 0x00, 0x00, // reserved: 4 + 4 bytes\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x01, 0x00, 0x00, // ----begin composition matrix----\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x01, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x40, 0x00, 0x00, 0x00, // ----end composition matrix----\n 0x00, 0x00, 0x00, 0x00, // ----begin pre_defined 6 * 4 bytes----\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, // ----end pre_defined 6 * 4 bytes----\n 0xFF, 0xFF, 0xFF, 0xFF // next_track_ID\n ]));\n }\n\n // Track box\n static trak(meta) {\n return MP4.box(MP4.types.trak, MP4.tkhd(meta), MP4.mdia(meta));\n }\n\n // Track header box\n static tkhd(meta) {\n let trackId = meta.id, duration = meta.duration;\n let width = meta.presentWidth, height = meta.presentHeight;\n\n return MP4.box(MP4.types.tkhd, new Uint8Array([\n 0x00, 0x00, 0x00, 0x07, // version(0) + flags\n 0x00, 0x00, 0x00, 0x00, // creation_time\n 0x00, 0x00, 0x00, 0x00, // modification_time\n (trackId >>> 24) & 0xFF, // track_ID: 4 bytes\n (trackId >>> 16) & 0xFF,\n (trackId >>> 8) & 0xFF,\n (trackId) & 0xFF,\n 0x00, 0x00, 0x00, 0x00, // reserved: 4 bytes\n (duration >>> 24) & 0xFF, // duration: 4 bytes\n (duration >>> 16) & 0xFF,\n (duration >>> 8) & 0xFF,\n (duration) & 0xFF,\n 0x00, 0x00, 0x00, 0x00, // reserved: 2 * 4 bytes\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, // layer(2bytes) + alternate_group(2bytes)\n 0x00, 0x00, 0x00, 0x00, // volume(2bytes) + reserved(2bytes)\n 0x00, 0x01, 0x00, 0x00, // ----begin composition matrix----\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x01, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x40, 0x00, 0x00, 0x00, // ----end composition matrix----\n (width >>> 8) & 0xFF, // width and height\n (width) & 0xFF,\n 0x00, 0x00,\n (height >>> 8) & 0xFF,\n (height) & 0xFF,\n 0x00, 0x00\n ]));\n }\n\n // Media Box\n static mdia(meta) {\n return MP4.box(MP4.types.mdia, MP4.mdhd(meta), MP4.hdlr(meta), MP4.minf(meta));\n }\n\n // Media header box\n static mdhd(meta) {\n let timescale = meta.timescale;\n let duration = meta.duration;\n return MP4.box(MP4.types.mdhd, new Uint8Array([\n 0x00, 0x00, 0x00, 0x00, // version(0) + flags\n 0x00, 0x00, 0x00, 0x00, // creation_time\n 0x00, 0x00, 0x00, 0x00, // modification_time\n (timescale >>> 24) & 0xFF, // timescale: 4 bytes\n (timescale >>> 16) & 0xFF,\n (timescale >>> 8) & 0xFF,\n (timescale) & 0xFF,\n (duration >>> 24) & 0xFF, // duration: 4 bytes\n (duration >>> 16) & 0xFF,\n (duration >>> 8) & 0xFF,\n (duration) & 0xFF,\n 0x55, 0xC4, // language: und (undetermined)\n 0x00, 0x00 // pre_defined = 0\n ]));\n }\n\n // Media handler reference box\n static hdlr(meta) {\n let data = null;\n if (meta.type === 'audio') {\n data = MP4.constants.HDLR_AUDIO;\n } else {\n data = MP4.constants.HDLR_VIDEO;\n }\n return MP4.box(MP4.types.hdlr, data);\n }\n\n // Media infomation box\n static minf(meta) {\n let xmhd = null;\n if (meta.type === 'audio') {\n xmhd = MP4.box(MP4.types.smhd, MP4.constants.SMHD);\n } else {\n xmhd = MP4.box(MP4.types.vmhd, MP4.constants.VMHD);\n }\n return MP4.box(MP4.types.minf, xmhd, MP4.dinf(), MP4.stbl(meta));\n }\n\n // Data infomation box\n static dinf() {\n let result = MP4.box(MP4.types.dinf,\n MP4.box(MP4.types.dref, MP4.constants.DREF)\n );\n return result;\n }\n\n // Sample table box\n static stbl(meta) {\n let result = MP4.box(MP4.types.stbl, // type: stbl\n MP4.stsd(meta), // Sample Description Table\n MP4.box(MP4.types.stts, MP4.constants.STTS), // Time-To-Sample\n MP4.box(MP4.types.stsc, MP4.constants.STSC), // Sample-To-Chunk\n MP4.box(MP4.types.stsz, MP4.constants.STSZ), // Sample size\n MP4.box(MP4.types.stco, MP4.constants.STCO) // Chunk offset\n ); \n return result; \n }\n\n // Sample description box\n static stsd(meta) {\n if (meta.type === 'audio') {\n if (meta.codec === 'mp3') {\n return MP4.box(MP4.types.stsd, MP4.constants.STSD_PREFIX, MP4.mp3(meta));\n }\n // else: aac -> mp4a\n return MP4.box(MP4.types.stsd, MP4.constants.STSD_PREFIX, MP4.mp4a(meta));\n } else {\n return MP4.box(MP4.types.stsd, MP4.constants.STSD_PREFIX, MP4.avc1(meta));\n }\n }\n\n static mp3(meta) {\n let channelCount = meta.channelCount;\n let sampleRate = meta.audioSampleRate;\n\n let data = new Uint8Array([\n 0x00, 0x00, 0x00, 0x00, // reserved(4)\n 0x00, 0x00, 0x00, 0x01, // reserved(2) + data_reference_index(2)\n 0x00, 0x00, 0x00, 0x00, // reserved: 2 * 4 bytes\n 0x00, 0x00, 0x00, 0x00,\n 0x00, channelCount, // channelCount(2)\n 0x00, 0x10, // sampleSize(2)\n 0x00, 0x00, 0x00, 0x00, // reserved(4)\n (sampleRate >>> 8) & 0xFF, // Audio sample rate\n (sampleRate) & 0xFF,\n 0x00, 0x00\n ]);\n\n return MP4.box(MP4.types['.mp3'], data);\n }\n\n static mp4a(meta) {\n let channelCount = meta.channelCount;\n let sampleRate = meta.audioSampleRate;\n\n let data = new Uint8Array([\n 0x00, 0x00, 0x00, 0x00, // reserved(4)\n 0x00, 0x00, 0x00, 0x01, // reserved(2) + data_reference_index(2)\n 0x00, 0x00, 0x00, 0x00, // reserved: 2 * 4 bytes\n 0x00, 0x00, 0x00, 0x00,\n 0x00, channelCount, // channelCount(2)\n 0x00, 0x10, // sampleSize(2)\n 0x00, 0x00, 0x00, 0x00, // reserved(4)\n (sampleRate >>> 8) & 0xFF, // Audio sample rate\n (sampleRate) & 0xFF,\n 0x00, 0x00\n ]);\n\n return MP4.box(MP4.types.mp4a, data, MP4.esds(meta));\n }\n\n static esds(meta) {\n let config = meta.config || [];\n let configSize = config.length;\n let data = new Uint8Array([\n 0x00, 0x00, 0x00, 0x00, // version 0 + flags\n\n 0x03, // descriptor_type\n 0x17 + configSize, // length3\n 0x00, 0x01, // es_id\n 0x00, // stream_priority\n\n 0x04, // descriptor_type\n 0x0F + configSize, // length\n 0x40, // codec: mpeg4_audio\n 0x15, // stream_type: Audio\n 0x00, 0x00, 0x00, // buffer_size\n 0x00, 0x00, 0x00, 0x00, // maxBitrate\n 0x00, 0x00, 0x00, 0x00, // avgBitrate\n\n 0x05 // descriptor_type\n ].concat([\n configSize\n ]).concat(\n config\n ).concat([\n 0x06, 0x01, 0x02 // GASpecificConfig\n ]));\n return MP4.box(MP4.types.esds, data);\n }\n\n static avc1(meta) {\n let avcc = meta.avcc;\n let width = meta.codecWidth, height = meta.codecHeight;\n\n let data = new Uint8Array([\n 0x00, 0x00, 0x00, 0x00, // reserved(4)\n 0x00, 0x00, 0x00, 0x01, // reserved(2) + data_reference_index(2)\n 0x00, 0x00, 0x00, 0x00, // pre_defined(2) + reserved(2)\n 0x00, 0x00, 0x00, 0x00, // pre_defined: 3 * 4 bytes\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n (width >>> 8) & 0xFF, // width: 2 bytes\n (width) & 0xFF,\n (height >>> 8) & 0xFF, // height: 2 bytes\n (height) & 0xFF,\n 0x00, 0x48, 0x00, 0x00, // horizresolution: 4 bytes\n 0x00, 0x48, 0x00, 0x00, // vertresolution: 4 bytes\n 0x00, 0x00, 0x00, 0x00, // reserved: 4 bytes\n 0x00, 0x01, // frame_count\n 0x0A, // strlen\n 0x78, 0x71, 0x71, 0x2F, // compressorname: 32 bytes\n 0x66, 0x6C, 0x76, 0x2E,\n 0x6A, 0x73, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00,\n 0x00, 0x18, // depth\n 0xFF, 0xFF // pre_defined = -1\n ]);\n return MP4.box(MP4.types.avc1, data, MP4.box(MP4.types.avcC, avcc));\n }\n\n // Movie Extends box\n static mvex(meta) {\n return MP4.box(MP4.types.mvex, MP4.trex(meta));\n }\n\n // Track Extends box\n static trex(meta) {\n let trackId = meta.id;\n let data = new Uint8Array([\n 0x00, 0x00, 0x00, 0x00, // version(0) + flags\n (trackId >>> 24) & 0xFF, // track_ID\n (trackId >>> 16) & 0xFF,\n (trackId >>> 8) & 0xFF,\n (trackId) & 0xFF,\n 0x00, 0x00, 0x00, 0x01, // default_sample_description_index\n 0x00, 0x00, 0x00, 0x00, // default_sample_duration\n 0x00, 0x00, 0x00, 0x00, // default_sample_size\n 0x00, 0x01, 0x00, 0x01 // default_sample_flags\n ]);\n return MP4.box(MP4.types.trex, data);\n }\n\n // Movie fragment box\n static moof(track, baseMediaDecodeTime) {\n return MP4.box(MP4.types.moof, MP4.mfhd(track.sequenceNumber), MP4.traf(track, baseMediaDecodeTime));\n }\n\n static mfhd(sequenceNumber) {\n let data = new Uint8Array([\n 0x00, 0x00, 0x00, 0x00,\n (sequenceNumber >>> 24) & 0xFF, // sequence_number: int32\n (sequenceNumber >>> 16) & 0xFF,\n (sequenceNumber >>> 8) & 0xFF,\n (sequenceNumber) & 0xFF\n ]);\n return MP4.box(MP4.types.mfhd, data);\n }\n\n // Track fragment box\n static traf(track, baseMediaDecodeTime) {\n let trackId = track.id;\n\n // Track fragment header box\n let tfhd = MP4.box(MP4.types.tfhd, new Uint8Array([\n 0x00, 0x00, 0x00, 0x00, // version(0) & flags\n (trackId >>> 24) & 0xFF, // track_ID\n (trackId >>> 16) & 0xFF,\n (trackId >>> 8) & 0xFF,\n (trackId) & 0xFF\n ]));\n // Track Fragment Decode Time\n let tfdt = MP4.box(MP4.types.tfdt, new Uint8Array([\n 0x00, 0x00, 0x00, 0x00, // version(0) & flags\n (baseMediaDecodeTime >>> 24) & 0xFF, // baseMediaDecodeTime: int32\n (baseMediaDecodeTime >>> 16) & 0xFF,\n (baseMediaDecodeTime >>> 8) & 0xFF,\n (baseMediaDecodeTime) & 0xFF\n ]));\n let sdtp = MP4.sdtp(track);\n let trun = MP4.trun(track, sdtp.byteLength + 16 + 16 + 8 + 16 + 8 + 8);\n\n return MP4.box(MP4.types.traf, tfhd, tfdt, trun, sdtp);\n }\n\n // Sample Dependency Type box\n static sdtp(track) {\n let samples = track.samples || [];\n let sampleCount = samples.length;\n let data = new Uint8Array(4 + sampleCount);\n // 0~4 bytes: version(0) & flags\n for (let i = 0; i < sampleCount; i++) {\n let flags = samples[i].flags;\n data[i + 4] = (flags.isLeading << 6) // is_leading: 2 (bit)\n | (flags.dependsOn << 4) // sample_depends_on\n | (flags.isDependedOn << 2) // sample_is_depended_on\n | (flags.hasRedundancy); // sample_has_redundancy\n }\n return MP4.box(MP4.types.sdtp, data);\n }\n\n // Track fragment run box\n static trun(track, offset) {\n let samples = track.samples || [];\n let sampleCount = samples.length;\n let dataSize = 12 + 16 * sampleCount;\n let data = new Uint8Array(dataSize);\n offset += 8 + dataSize;\n\n data.set([\n 0x00, 0x00, 0x0F, 0x01, // version(0) & flags\n (sampleCount >>> 24) & 0xFF, // sample_count\n (sampleCount >>> 16) & 0xFF,\n (sampleCount >>> 8) & 0xFF,\n (sampleCount) & 0xFF,\n (offset >>> 24) & 0xFF, // data_offset\n (offset >>> 16) & 0xFF,\n (offset >>> 8) & 0xFF,\n (offset) & 0xFF\n ], 0);\n\n for (let i = 0; i < sampleCount; i++) {\n let duration = samples[i].duration;\n let size = samples[i].size;\n let flags = samples[i].flags;\n let cts = samples[i].cts;\n data.set([\n (duration >>> 24) & 0xFF, // sample_duration\n (duration >>> 16) & 0xFF,\n (duration >>> 8) & 0xFF,\n (duration) & 0xFF,\n (size >>> 24) & 0xFF, // sample_size\n (size >>> 16) & 0xFF,\n (size >>> 8) & 0xFF,\n (size) & 0xFF,\n (flags.isLeading << 2) | flags.dependsOn, // sample_flags\n (flags.isDependedOn << 6) | (flags.hasRedundancy << 4) | flags.isNonSync,\n 0x00, 0x00, // sample_degradation_priority\n (cts >>> 24) & 0xFF, // sample_composition_time_offset\n (cts >>> 16) & 0xFF,\n (cts >>> 8) & 0xFF,\n (cts) & 0xFF\n ], 12 + 16 * i);\n }\n return MP4.box(MP4.types.trun, data);\n }\n\n static mdat(data) {\n return MP4.box(MP4.types.mdat, data);\n }\n\n}\n\nMP4.init();\n\nexport default MP4;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Log from '../utils/logger.js';\nimport MP4 from './mp4-generator.js';\nimport AAC from './aac-silent.js';\nimport Browser from '../utils/browser.js';\nimport { SampleInfo, MediaSegmentInfo, MediaSegmentInfoList } from '../core/media-segment-info.js';\nimport { IllegalStateException } from '../utils/exception.js';\n\n\n// Fragmented mp4 remuxer\nclass MP4Remuxer {\n\n constructor(config) {\n this.TAG = 'MP4Remuxer';\n\n this._config = config;\n this._isLive = (config.isLive === true) ? true : false;\n\n this._dtsBase = -1;\n this._dtsBaseInited = false;\n this._audioDtsBase = Infinity;\n this._videoDtsBase = Infinity;\n this._audioNextDts = undefined;\n this._videoNextDts = undefined;\n this._audioStashedLastSample = null;\n this._videoStashedLastSample = null;\n\n this._audioMeta = null;\n this._videoMeta = null;\n\n this._audioSegmentInfoList = new MediaSegmentInfoList('audio');\n this._videoSegmentInfoList = new MediaSegmentInfoList('video');\n\n this._onInitSegment = null;\n this._onMediaSegment = null;\n\n // Workaround for chrome < 50: Always force first sample as a Random Access Point in media segment\n // see https://bugs.chromium.org/p/chromium/issues/detail?id=229412\n this._forceFirstIDR = (Browser.chrome &&\n (Browser.version.major < 50 ||\n (Browser.version.major === 50 && Browser.version.build < 2661))) ? true : false;\n\n // Workaround for IE11/Edge: Fill silent aac frame after keyframe-seeking\n // Make audio beginDts equals with video beginDts, in order to fix seek freeze\n this._fillSilentAfterSeek = (Browser.msedge || Browser.msie);\n\n // While only FireFox supports 'audio/mp4, codecs=\"mp3\"', use 'audio/mpeg' for chrome, safari, ...\n this._mp3UseMpegAudio = !Browser.firefox;\n\n this._fillAudioTimestampGap = this._config.fixAudioTimestampGap;\n }\n\n destroy() {\n this._dtsBase = -1;\n this._dtsBaseInited = false;\n this._audioMeta = null;\n this._videoMeta = null;\n this._audioSegmentInfoList.clear();\n this._audioSegmentInfoList = null;\n this._videoSegmentInfoList.clear();\n this._videoSegmentInfoList = null;\n this._onInitSegment = null;\n this._onMediaSegment = null;\n }\n\n bindDataSource(producer) {\n producer.onDataAvailable = this.remux.bind(this);\n producer.onTrackMetadata = this._onTrackMetadataReceived.bind(this);\n return this;\n }\n\n /* prototype: function onInitSegment(type: string, initSegment: ArrayBuffer): void\n InitSegment: {\n type: string,\n data: ArrayBuffer,\n codec: string,\n container: string\n }\n */\n get onInitSegment() {\n return this._onInitSegment;\n }\n\n set onInitSegment(callback) {\n this._onInitSegment = callback;\n }\n\n /* prototype: function onMediaSegment(type: string, mediaSegment: MediaSegment): void\n MediaSegment: {\n type: string,\n data: ArrayBuffer,\n sampleCount: int32\n info: MediaSegmentInfo\n }\n */\n get onMediaSegment() {\n return this._onMediaSegment;\n }\n\n set onMediaSegment(callback) {\n this._onMediaSegment = callback;\n }\n\n insertDiscontinuity() {\n this._audioNextDts = this._videoNextDts = undefined;\n }\n\n seek(originalDts) {\n this._audioStashedLastSample = null;\n this._videoStashedLastSample = null;\n this._videoSegmentInfoList.clear();\n this._audioSegmentInfoList.clear();\n }\n\n remux(audioTrack, videoTrack) {\n if (!this._onMediaSegment) {\n throw new IllegalStateException('MP4Remuxer: onMediaSegment callback must be specificed!');\n }\n if (!this._dtsBaseInited) {\n this._calculateDtsBase(audioTrack, videoTrack);\n }\n this._remuxVideo(videoTrack);\n this._remuxAudio(audioTrack);\n }\n\n _onTrackMetadataReceived(type, metadata) {\n let metabox = null;\n\n let container = 'mp4';\n let codec = metadata.codec;\n\n if (type === 'audio') {\n this._audioMeta = metadata;\n if (metadata.codec === 'mp3' && this._mp3UseMpegAudio) {\n // 'audio/mpeg' for MP3 audio track\n container = 'mpeg';\n codec = '';\n metabox = new Uint8Array();\n } else {\n // 'audio/mp4, codecs=\"codec\"'\n metabox = MP4.generateInitSegment(metadata);\n }\n } else if (type === 'video') {\n this._videoMeta = metadata;\n metabox = MP4.generateInitSegment(metadata);\n } else {\n return;\n }\n\n // dispatch metabox (Initialization Segment)\n if (!this._onInitSegment) {\n throw new IllegalStateException('MP4Remuxer: onInitSegment callback must be specified!');\n }\n this._onInitSegment(type, {\n type: type,\n data: metabox.buffer,\n codec: codec,\n container: `${type}/${container}`,\n mediaDuration: metadata.duration // in timescale 1000 (milliseconds)\n });\n }\n\n _calculateDtsBase(audioTrack, videoTrack) {\n if (this._dtsBaseInited) {\n return;\n }\n\n if (audioTrack.samples && audioTrack.samples.length) {\n this._audioDtsBase = audioTrack.samples[0].dts;\n }\n if (videoTrack.samples && videoTrack.samples.length) {\n this._videoDtsBase = videoTrack.samples[0].dts;\n }\n\n this._dtsBase = Math.min(this._audioDtsBase, this._videoDtsBase);\n this._dtsBaseInited = true;\n }\n\n flushStashedSamples() {\n let videoSample = this._videoStashedLastSample;\n let audioSample = this._audioStashedLastSample;\n\n let videoTrack = {\n type: 'video',\n id: 1,\n sequenceNumber: 0,\n samples: [],\n length: 0\n };\n\n if (videoSample != null) {\n videoTrack.samples.push(videoSample);\n videoTrack.length = videoSample.length;\n }\n\n let audioTrack = {\n type: 'audio',\n id: 2,\n sequenceNumber: 0,\n samples: [],\n length: 0\n };\n\n if (audioSample != null) {\n audioTrack.samples.push(audioSample);\n audioTrack.length = audioSample.length;\n }\n\n this._videoStashedLastSample = null;\n this._audioStashedLastSample = null;\n\n this._remuxVideo(videoTrack, true);\n this._remuxAudio(audioTrack, true);\n }\n\n _remuxAudio(audioTrack, force) {\n if (this._audioMeta == null) {\n return;\n }\n\n let track = audioTrack;\n let samples = track.samples;\n let dtsCorrection = undefined;\n let firstDts = -1, lastDts = -1, lastPts = -1;\n let refSampleDuration = this._audioMeta.refSampleDuration;\n\n let mpegRawTrack = this._audioMeta.codec === 'mp3' && this._mp3UseMpegAudio;\n let firstSegmentAfterSeek = this._dtsBaseInited && this._audioNextDts === undefined;\n\n let insertPrefixSilentFrame = false;\n\n if (!samples || samples.length === 0) {\n return;\n }\n if (samples.length === 1 && !force) {\n // If [sample count in current batch] === 1 && (force != true)\n // Ignore and keep in demuxer's queue\n return;\n } // else if (force === true) do remux\n\n let offset = 0;\n let mdatbox = null;\n let mdatBytes = 0;\n\n // calculate initial mdat size\n if (mpegRawTrack) {\n // for raw mpeg buffer\n offset = 0;\n mdatBytes = track.length;\n } else {\n // for fmp4 mdat box\n offset = 8; // size + type\n mdatBytes = 8 + track.length;\n }\n\n\n let lastSample = null;\n\n // Pop the lastSample and waiting for stash\n if (samples.length > 1) {\n lastSample = samples.pop();\n mdatBytes -= lastSample.length;\n }\n\n // Insert [stashed lastSample in the previous batch] to the front\n if (this._audioStashedLastSample != null) {\n let sample = this._audioStashedLastSample;\n this._audioStashedLastSample = null;\n samples.unshift(sample);\n mdatBytes += sample.length;\n }\n\n // Stash the lastSample of current batch, waiting for next batch\n if (lastSample != null) {\n this._audioStashedLastSample = lastSample;\n }\n\n\n let firstSampleOriginalDts = samples[0].dts - this._dtsBase;\n\n // calculate dtsCorrection\n if (this._audioNextDts) {\n dtsCorrection = firstSampleOriginalDts - this._audioNextDts;\n } else { // this._audioNextDts == undefined\n if (this._audioSegmentInfoList.isEmpty()) {\n dtsCorrection = 0;\n if (this._fillSilentAfterSeek && !this._videoSegmentInfoList.isEmpty()) {\n if (this._audioMeta.originalCodec !== 'mp3') {\n insertPrefixSilentFrame = true;\n }\n }\n } else {\n let lastSample = this._audioSegmentInfoList.getLastSampleBefore(firstSampleOriginalDts);\n if (lastSample != null) {\n let distance = (firstSampleOriginalDts - (lastSample.originalDts + lastSample.duration));\n if (distance <= 3) {\n distance = 0;\n }\n let expectedDts = lastSample.dts + lastSample.duration + distance;\n dtsCorrection = firstSampleOriginalDts - expectedDts;\n } else { // lastSample == null, cannot found\n dtsCorrection = 0;\n }\n }\n }\n\n if (insertPrefixSilentFrame) {\n // align audio segment beginDts to match with current video segment's beginDts\n let firstSampleDts = firstSampleOriginalDts - dtsCorrection;\n let videoSegment = this._videoSegmentInfoList.getLastSegmentBefore(firstSampleOriginalDts);\n if (videoSegment != null && videoSegment.beginDts < firstSampleDts) {\n let silentUnit = AAC.getSilentFrame(this._audioMeta.originalCodec, this._audioMeta.channelCount);\n if (silentUnit) {\n let dts = videoSegment.beginDts;\n let silentFrameDuration = firstSampleDts - videoSegment.beginDts;\n Log.v(this.TAG, `InsertPrefixSilentAudio: dts: ${dts}, duration: ${silentFrameDuration}`);\n samples.unshift({ unit: silentUnit, dts: dts, pts: dts });\n mdatBytes += silentUnit.byteLength;\n } // silentUnit == null: Cannot generate, skip\n } else {\n insertPrefixSilentFrame = false;\n }\n }\n\n let mp4Samples = [];\n\n // Correct dts for each sample, and calculate sample duration. Then output to mp4Samples\n for (let i = 0; i < samples.length; i++) {\n let sample = samples[i];\n let unit = sample.unit;\n let originalDts = sample.dts - this._dtsBase;\n let dts = originalDts;\n let needFillSilentFrames = false;\n let silentFrames = null;\n let sampleDuration = 0;\n\n if (originalDts < -0.001) {\n continue; //pass the first sample with the invalid dts\n }\n\n if (this._audioMeta.codec !== 'mp3') {\n // for AAC codec, we need to keep dts increase based on refSampleDuration\n let curRefDts = originalDts;\n const maxAudioFramesDrift = 3;\n if (this._audioNextDts) {\n curRefDts = this._audioNextDts;\n }\n\n dtsCorrection = originalDts - curRefDts;\n if (dtsCorrection <= -maxAudioFramesDrift * refSampleDuration) {\n // If we're overlapping by more than maxAudioFramesDrift number of frame, drop this sample\n Log.w(this.TAG, `Dropping 1 audio frame (originalDts: ${originalDts} ms ,curRefDts: ${curRefDts} ms) due to dtsCorrection: ${dtsCorrection} ms overlap.`);\n continue;\n }\n else if (dtsCorrection >= maxAudioFramesDrift * refSampleDuration && this._fillAudioTimestampGap && !Browser.safari) {\n // Silent frame generation, if large timestamp gap detected && config.fixAudioTimestampGap\n needFillSilentFrames = true;\n // We need to insert silent frames to fill timestamp gap\n let frameCount = Math.floor(dtsCorrection / refSampleDuration);\n Log.w(this.TAG, 'Large audio timestamp gap detected, may cause AV sync to drift. ' +\n 'Silent frames will be generated to avoid unsync.\\n' +\n `originalDts: ${originalDts} ms, curRefDts: ${curRefDts} ms, ` +\n `dtsCorrection: ${Math.round(dtsCorrection)} ms, generate: ${frameCount} frames`);\n\n\n dts = Math.floor(curRefDts);\n sampleDuration = Math.floor(curRefDts + refSampleDuration) - dts;\n\n let silentUnit = AAC.getSilentFrame(this._audioMeta.originalCodec, this._audioMeta.channelCount);\n if (silentUnit == null) {\n Log.w(this.TAG, 'Unable to generate silent frame for ' +\n `${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`);\n // Repeat last frame\n silentUnit = unit;\n }\n silentFrames = [];\n\n for (let j = 0; j < frameCount; j++) {\n curRefDts = curRefDts + refSampleDuration;\n let intDts = Math.floor(curRefDts); // change to integer\n let intDuration = Math.floor(curRefDts + refSampleDuration) - intDts;\n let frame = {\n dts: intDts,\n pts: intDts,\n cts: 0,\n unit: silentUnit,\n size: silentUnit.byteLength,\n duration: intDuration, // wait for next sample\n originalDts: originalDts,\n flags: {\n isLeading: 0,\n dependsOn: 1,\n isDependedOn: 0,\n hasRedundancy: 0\n }\n };\n silentFrames.push(frame);\n mdatBytes += frame.size;;\n\n }\n\n this._audioNextDts = curRefDts + refSampleDuration;\n\n } else {\n\n dts = Math.floor(curRefDts);\n sampleDuration = Math.floor(curRefDts + refSampleDuration) - dts;\n this._audioNextDts = curRefDts + refSampleDuration;\n\n }\n } else {\n // keep the original dts calculate algorithm for mp3\n dts = originalDts - dtsCorrection;\n\n\n if (i !== samples.length - 1) {\n let nextDts = samples[i + 1].dts - this._dtsBase - dtsCorrection;\n sampleDuration = nextDts - dts;\n } else { // the last sample\n if (lastSample != null) { // use stashed sample's dts to calculate sample duration\n let nextDts = lastSample.dts - this._dtsBase - dtsCorrection;\n sampleDuration = nextDts - dts;\n } else if (mp4Samples.length >= 1) { // use second last sample duration\n sampleDuration = mp4Samples[mp4Samples.length - 1].duration;\n } else { // the only one sample, use reference sample duration\n sampleDuration = Math.floor(refSampleDuration);\n }\n }\n this._audioNextDts = dts + sampleDuration;\n }\n\n if (firstDts === -1) {\n firstDts = dts;\n }\n mp4Samples.push({\n dts: dts,\n pts: dts,\n cts: 0,\n unit: sample.unit,\n size: sample.unit.byteLength,\n duration: sampleDuration,\n originalDts: originalDts,\n flags: {\n isLeading: 0,\n dependsOn: 1,\n isDependedOn: 0,\n hasRedundancy: 0\n }\n });\n\n if (needFillSilentFrames) {\n // Silent frames should be inserted after wrong-duration frame\n mp4Samples.push.apply(mp4Samples, silentFrames);\n }\n }\n\n if (mp4Samples.length === 0) {\n //no samples need to remux\n track.samples = [];\n track.length = 0;\n return;\n }\n\n // allocate mdatbox\n if (mpegRawTrack) {\n // allocate for raw mpeg buffer\n mdatbox = new Uint8Array(mdatBytes);\n } else {\n // allocate for fmp4 mdat box\n mdatbox = new Uint8Array(mdatBytes);\n // size field\n mdatbox[0] = (mdatBytes >>> 24) & 0xFF;\n mdatbox[1] = (mdatBytes >>> 16) & 0xFF;\n mdatbox[2] = (mdatBytes >>> 8) & 0xFF;\n mdatbox[3] = (mdatBytes) & 0xFF;\n // type field (fourCC)\n mdatbox.set(MP4.types.mdat, 4);\n }\n\n // Write samples into mdatbox\n for (let i = 0; i < mp4Samples.length; i++) {\n let unit = mp4Samples[i].unit;\n mdatbox.set(unit, offset);\n offset += unit.byteLength;\n }\n\n let latest = mp4Samples[mp4Samples.length - 1];\n lastDts = latest.dts + latest.duration;\n //this._audioNextDts = lastDts;\n\n // fill media segment info & add to info list\n let info = new MediaSegmentInfo();\n info.beginDts = firstDts;\n info.endDts = lastDts;\n info.beginPts = firstDts;\n info.endPts = lastDts;\n info.originalBeginDts = mp4Samples[0].originalDts;\n info.originalEndDts = latest.originalDts + latest.duration;\n info.firstSample = new SampleInfo(mp4Samples[0].dts,\n mp4Samples[0].pts,\n mp4Samples[0].duration,\n mp4Samples[0].originalDts,\n false);\n info.lastSample = new SampleInfo(latest.dts,\n latest.pts,\n latest.duration,\n latest.originalDts,\n false);\n if (!this._isLive) {\n this._audioSegmentInfoList.append(info);\n }\n\n track.samples = mp4Samples;\n track.sequenceNumber++;\n\n let moofbox = null;\n\n if (mpegRawTrack) {\n // Generate empty buffer, because useless for raw mpeg\n moofbox = new Uint8Array();\n } else {\n // Generate moof for fmp4 segment\n moofbox = MP4.moof(track, firstDts);\n }\n\n track.samples = [];\n track.length = 0;\n\n let segment = {\n type: 'audio',\n data: this._mergeBoxes(moofbox, mdatbox).buffer,\n sampleCount: mp4Samples.length,\n info: info\n };\n\n if (mpegRawTrack && firstSegmentAfterSeek) {\n // For MPEG audio stream in MSE, if seeking occurred, before appending new buffer\n // We need explicitly set timestampOffset to the desired point in timeline for mpeg SourceBuffer.\n segment.timestampOffset = firstDts;\n }\n\n this._onMediaSegment('audio', segment);\n }\n\n _remuxVideo(videoTrack, force) {\n if (this._videoMeta == null) {\n return;\n }\n\n let track = videoTrack;\n let samples = track.samples;\n let dtsCorrection = undefined;\n let firstDts = -1, lastDts = -1;\n let firstPts = -1, lastPts = -1;\n\n if (!samples || samples.length === 0) {\n return;\n }\n if (samples.length === 1 && !force) {\n // If [sample count in current batch] === 1 && (force != true)\n // Ignore and keep in demuxer's queue\n return;\n } // else if (force === true) do remux\n\n let offset = 8;\n let mdatbox = null;\n let mdatBytes = 8 + videoTrack.length;\n\n\n let lastSample = null;\n\n // Pop the lastSample and waiting for stash\n if (samples.length > 1) {\n lastSample = samples.pop();\n mdatBytes -= lastSample.length;\n }\n\n // Insert [stashed lastSample in the previous batch] to the front\n if (this._videoStashedLastSample != null) {\n let sample = this._videoStashedLastSample;\n this._videoStashedLastSample = null;\n samples.unshift(sample);\n mdatBytes += sample.length;\n }\n\n // Stash the lastSample of current batch, waiting for next batch\n if (lastSample != null) {\n this._videoStashedLastSample = lastSample;\n }\n\n\n let firstSampleOriginalDts = samples[0].dts - this._dtsBase;\n\n // calculate dtsCorrection\n if (this._videoNextDts) {\n dtsCorrection = firstSampleOriginalDts - this._videoNextDts;\n } else { // this._videoNextDts == undefined\n if (this._videoSegmentInfoList.isEmpty()) {\n dtsCorrection = 0;\n } else {\n let lastSample = this._videoSegmentInfoList.getLastSampleBefore(firstSampleOriginalDts);\n if (lastSample != null) {\n let distance = (firstSampleOriginalDts - (lastSample.originalDts + lastSample.duration));\n if (distance <= 3) {\n distance = 0;\n }\n let expectedDts = lastSample.dts + lastSample.duration + distance;\n dtsCorrection = firstSampleOriginalDts - expectedDts;\n } else { // lastSample == null, cannot found\n dtsCorrection = 0;\n }\n }\n }\n\n let info = new MediaSegmentInfo();\n let mp4Samples = [];\n\n // Correct dts for each sample, and calculate sample duration. Then output to mp4Samples\n for (let i = 0; i < samples.length; i++) {\n let sample = samples[i];\n let originalDts = sample.dts - this._dtsBase;\n let isKeyframe = sample.isKeyframe;\n let dts = originalDts - dtsCorrection;\n let cts = sample.cts;\n let pts = dts + cts;\n\n if (firstDts === -1) {\n firstDts = dts;\n firstPts = pts;\n }\n\n let sampleDuration = 0;\n\n if (i !== samples.length - 1) {\n let nextDts = samples[i + 1].dts - this._dtsBase - dtsCorrection;\n sampleDuration = nextDts - dts;\n } else { // the last sample\n if (lastSample != null) { // use stashed sample's dts to calculate sample duration\n let nextDts = lastSample.dts - this._dtsBase - dtsCorrection;\n sampleDuration = nextDts - dts;\n } else if (mp4Samples.length >= 1) { // use second last sample duration\n sampleDuration = mp4Samples[mp4Samples.length - 1].duration;\n } else { // the only one sample, use reference sample duration\n sampleDuration = Math.floor(this._videoMeta.refSampleDuration);\n }\n }\n\n if (isKeyframe) {\n let syncPoint = new SampleInfo(dts, pts, sampleDuration, sample.dts, true);\n syncPoint.fileposition = sample.fileposition;\n info.appendSyncPoint(syncPoint);\n }\n\n mp4Samples.push({\n dts: dts,\n pts: pts,\n cts: cts,\n units: sample.units,\n size: sample.length,\n isKeyframe: isKeyframe,\n duration: sampleDuration,\n originalDts: originalDts,\n flags: {\n isLeading: 0,\n dependsOn: isKeyframe ? 2 : 1,\n isDependedOn: isKeyframe ? 1 : 0,\n hasRedundancy: 0,\n isNonSync: isKeyframe ? 0 : 1\n }\n });\n }\n\n // allocate mdatbox\n mdatbox = new Uint8Array(mdatBytes);\n mdatbox[0] = (mdatBytes >>> 24) & 0xFF;\n mdatbox[1] = (mdatBytes >>> 16) & 0xFF;\n mdatbox[2] = (mdatBytes >>> 8) & 0xFF;\n mdatbox[3] = (mdatBytes) & 0xFF;\n mdatbox.set(MP4.types.mdat, 4);\n\n // Write samples into mdatbox\n for (let i = 0; i < mp4Samples.length; i++) {\n let units = mp4Samples[i].units;\n while (units.length) {\n let unit = units.shift();\n let data = unit.data;\n mdatbox.set(data, offset);\n offset += data.byteLength;\n }\n }\n\n let latest = mp4Samples[mp4Samples.length - 1];\n lastDts = latest.dts + latest.duration;\n lastPts = latest.pts + latest.duration;\n this._videoNextDts = lastDts;\n\n // fill media segment info & add to info list\n info.beginDts = firstDts;\n info.endDts = lastDts;\n info.beginPts = firstPts;\n info.endPts = lastPts;\n info.originalBeginDts = mp4Samples[0].originalDts;\n info.originalEndDts = latest.originalDts + latest.duration;\n info.firstSample = new SampleInfo(mp4Samples[0].dts,\n mp4Samples[0].pts,\n mp4Samples[0].duration,\n mp4Samples[0].originalDts,\n mp4Samples[0].isKeyframe);\n info.lastSample = new SampleInfo(latest.dts,\n latest.pts,\n latest.duration,\n latest.originalDts,\n latest.isKeyframe);\n if (!this._isLive) {\n this._videoSegmentInfoList.append(info);\n }\n\n track.samples = mp4Samples;\n track.sequenceNumber++;\n\n // workaround for chrome < 50: force first sample as a random access point\n // see https://bugs.chromium.org/p/chromium/issues/detail?id=229412\n if (this._forceFirstIDR) {\n let flags = mp4Samples[0].flags;\n flags.dependsOn = 2;\n flags.isNonSync = 0;\n }\n\n let moofbox = MP4.moof(track, firstDts);\n track.samples = [];\n track.length = 0;\n\n this._onMediaSegment('video', {\n type: 'video',\n data: this._mergeBoxes(moofbox, mdatbox).buffer,\n sampleCount: mp4Samples.length,\n info: info\n });\n }\n\n _mergeBoxes(moof, mdat) {\n let result = new Uint8Array(moof.byteLength + mdat.byteLength);\n result.set(moof, 0);\n result.set(mdat, moof.byteLength);\n return result;\n }\n\n}\n\nexport default MP4Remuxer;\n","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet Browser = {};\n\nfunction detect() {\n // modified from jquery-browser-plugin\n\n let ua = self.navigator.userAgent.toLowerCase();\n\n let match = /(edge)\\/([\\w.]+)/.exec(ua) ||\n /(opr)[\\/]([\\w.]+)/.exec(ua) ||\n /(chrome)[ \\/]([\\w.]+)/.exec(ua) ||\n /(iemobile)[\\/]([\\w.]+)/.exec(ua) ||\n /(version)(applewebkit)[ \\/]([\\w.]+).*(safari)[ \\/]([\\w.]+)/.exec(ua) ||\n /(webkit)[ \\/]([\\w.]+).*(version)[ \\/]([\\w.]+).*(safari)[ \\/]([\\w.]+)/.exec(ua) ||\n /(webkit)[ \\/]([\\w.]+)/.exec(ua) ||\n /(opera)(?:.*version|)[ \\/]([\\w.]+)/.exec(ua) ||\n /(msie) ([\\w.]+)/.exec(ua) ||\n ua.indexOf('trident') >= 0 && /(rv)(?::| )([\\w.]+)/.exec(ua) ||\n ua.indexOf('compatible') < 0 && /(firefox)[ \\/]([\\w.]+)/.exec(ua) ||\n [];\n\n let platform_match = /(ipad)/.exec(ua) ||\n /(ipod)/.exec(ua) ||\n /(windows phone)/.exec(ua) ||\n /(iphone)/.exec(ua) ||\n /(kindle)/.exec(ua) ||\n /(android)/.exec(ua) ||\n /(windows)/.exec(ua) ||\n /(mac)/.exec(ua) ||\n /(linux)/.exec(ua) ||\n /(cros)/.exec(ua) ||\n [];\n\n let matched = {\n browser: match[5] || match[3] || match[1] || '',\n version: match[2] || match[4] || '0',\n majorVersion: match[4] || match[2] || '0',\n platform: platform_match[0] || ''\n };\n\n let browser = {};\n if (matched.browser) {\n browser[matched.browser] = true;\n\n let versionArray = matched.majorVersion.split('.');\n browser.version = {\n major: parseInt(matched.majorVersion, 10),\n string: matched.version\n };\n if (versionArray.length > 1) {\n browser.version.minor = parseInt(versionArray[1], 10);\n }\n if (versionArray.length > 2) {\n browser.version.build = parseInt(versionArray[2], 10);\n }\n }\n\n if (matched.platform) {\n browser[matched.platform] = true;\n }\n\n if (browser.chrome || browser.opr || browser.safari) {\n browser.webkit = true;\n }\n\n // MSIE. IE11 has 'rv' identifer\n if (browser.rv || browser.iemobile) {\n if (browser.rv) {\n delete browser.rv;\n }\n let msie = 'msie';\n matched.browser = msie;\n browser[msie] = true;\n }\n\n // Microsoft Edge\n if (browser.edge) {\n delete browser.edge;\n let msedge = 'msedge';\n matched.browser = msedge;\n browser[msedge] = true;\n }\n\n // Opera 15+\n if (browser.opr) {\n let opera = 'opera';\n matched.browser = opera;\n browser[opera] = true;\n }\n\n // Stock android browsers are marked as Safari\n if (browser.safari && browser.android) {\n let android = 'android';\n matched.browser = android;\n browser[android] = true;\n }\n\n browser.name = matched.browser;\n browser.platform = matched.platform;\n\n for (let key in Browser) {\n if (Browser.hasOwnProperty(key)) {\n delete Browser[key];\n }\n }\n Object.assign(Browser, browser);\n}\n\ndetect();\n\nexport default Browser;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport class RuntimeException {\n\n constructor(message) {\n this._message = message;\n }\n\n get name() {\n return 'RuntimeException';\n }\n\n get message() {\n return this._message;\n }\n\n toString() {\n return this.name + ': ' + this.message;\n }\n\n}\n\nexport class IllegalStateException extends RuntimeException {\n\n constructor(message) {\n super(message);\n }\n\n get name() {\n return 'IllegalStateException';\n }\n\n}\n\nexport class InvalidArgumentException extends RuntimeException {\n\n constructor(message) {\n super(message);\n }\n\n get name() {\n return 'InvalidArgumentException';\n }\n\n}\n\nexport class NotImplementedException extends RuntimeException {\n\n constructor(message) {\n super(message);\n }\n\n get name() {\n return 'NotImplementedException';\n }\n\n}\n","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport EventEmitter from 'events';\n\nclass Log {\n\n static e(tag, msg) {\n if (!tag || Log.FORCE_GLOBAL_TAG)\n tag = Log.GLOBAL_TAG;\n\n let str = `[${tag}] > ${msg}`;\n\n if (Log.ENABLE_CALLBACK) {\n Log.emitter.emit('log', 'error', str);\n }\n\n if (!Log.ENABLE_ERROR) {\n return;\n }\n\n if (console.error) {\n console.error(str);\n } else if (console.warn) {\n console.warn(str);\n } else {\n console.log(str);\n }\n }\n\n static i(tag, msg) {\n if (!tag || Log.FORCE_GLOBAL_TAG)\n tag = Log.GLOBAL_TAG;\n\n let str = `[${tag}] > ${msg}`;\n\n if (Log.ENABLE_CALLBACK) {\n Log.emitter.emit('log', 'info', str);\n }\n\n if (!Log.ENABLE_INFO) {\n return;\n }\n\n if (console.info) {\n console.info(str);\n } else {\n console.log(str);\n }\n }\n\n static w(tag, msg) {\n if (!tag || Log.FORCE_GLOBAL_TAG)\n tag = Log.GLOBAL_TAG;\n\n let str = `[${tag}] > ${msg}`;\n\n if (Log.ENABLE_CALLBACK) {\n Log.emitter.emit('log', 'warn', str);\n }\n\n if (!Log.ENABLE_WARN) {\n return;\n }\n\n if (console.warn) {\n console.warn(str);\n } else {\n console.log(str);\n }\n }\n\n static d(tag, msg) {\n if (!tag || Log.FORCE_GLOBAL_TAG)\n tag = Log.GLOBAL_TAG;\n\n let str = `[${tag}] > ${msg}`;\n\n if (Log.ENABLE_CALLBACK) {\n Log.emitter.emit('log', 'debug', str);\n }\n\n if (!Log.ENABLE_DEBUG) {\n return;\n }\n\n if (console.debug) {\n console.debug(str);\n } else {\n console.log(str);\n }\n }\n\n static v(tag, msg) {\n if (!tag || Log.FORCE_GLOBAL_TAG)\n tag = Log.GLOBAL_TAG;\n\n let str = `[${tag}] > ${msg}`;\n\n if (Log.ENABLE_CALLBACK) {\n Log.emitter.emit('log', 'verbose', str);\n }\n\n if (!Log.ENABLE_VERBOSE) {\n return;\n }\n\n console.log(str);\n }\n\n}\n\nLog.GLOBAL_TAG = 'flv.js';\nLog.FORCE_GLOBAL_TAG = false;\nLog.ENABLE_ERROR = true;\nLog.ENABLE_INFO = true;\nLog.ENABLE_WARN = true;\nLog.ENABLE_DEBUG = true;\nLog.ENABLE_VERBOSE = true;\n\nLog.ENABLE_CALLBACK = false;\n\nLog.emitter = new EventEmitter();\n\nexport default Log;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport EventEmitter from 'events';\nimport Log from './logger.js';\n\nclass LoggingControl {\n\n static get forceGlobalTag() {\n return Log.FORCE_GLOBAL_TAG;\n }\n\n static set forceGlobalTag(enable) {\n Log.FORCE_GLOBAL_TAG = enable;\n LoggingControl._notifyChange();\n }\n\n static get globalTag() {\n return Log.GLOBAL_TAG;\n }\n\n static set globalTag(tag) {\n Log.GLOBAL_TAG = tag;\n LoggingControl._notifyChange();\n }\n\n static get enableAll() {\n return Log.ENABLE_VERBOSE\n && Log.ENABLE_DEBUG\n && Log.ENABLE_INFO\n && Log.ENABLE_WARN\n && Log.ENABLE_ERROR;\n }\n\n static set enableAll(enable) {\n Log.ENABLE_VERBOSE = enable;\n Log.ENABLE_DEBUG = enable;\n Log.ENABLE_INFO = enable;\n Log.ENABLE_WARN = enable;\n Log.ENABLE_ERROR = enable;\n LoggingControl._notifyChange();\n }\n\n static get enableDebug() {\n return Log.ENABLE_DEBUG;\n }\n\n static set enableDebug(enable) {\n Log.ENABLE_DEBUG = enable;\n LoggingControl._notifyChange();\n }\n\n static get enableVerbose() {\n return Log.ENABLE_VERBOSE;\n }\n\n static set enableVerbose(enable) {\n Log.ENABLE_VERBOSE = enable;\n LoggingControl._notifyChange();\n }\n\n static get enableInfo() {\n return Log.ENABLE_INFO;\n }\n\n static set enableInfo(enable) {\n Log.ENABLE_INFO = enable;\n LoggingControl._notifyChange();\n }\n\n static get enableWarn() {\n return Log.ENABLE_WARN;\n }\n\n static set enableWarn(enable) {\n Log.ENABLE_WARN = enable;\n LoggingControl._notifyChange();\n }\n\n static get enableError() {\n return Log.ENABLE_ERROR;\n }\n\n static set enableError(enable) {\n Log.ENABLE_ERROR = enable;\n LoggingControl._notifyChange();\n }\n\n static getConfig() {\n return {\n globalTag: Log.GLOBAL_TAG,\n forceGlobalTag: Log.FORCE_GLOBAL_TAG,\n enableVerbose: Log.ENABLE_VERBOSE,\n enableDebug: Log.ENABLE_DEBUG,\n enableInfo: Log.ENABLE_INFO,\n enableWarn: Log.ENABLE_WARN,\n enableError: Log.ENABLE_ERROR,\n enableCallback: Log.ENABLE_CALLBACK\n };\n }\n\n static applyConfig(config) {\n Log.GLOBAL_TAG = config.globalTag;\n Log.FORCE_GLOBAL_TAG = config.forceGlobalTag;\n Log.ENABLE_VERBOSE = config.enableVerbose;\n Log.ENABLE_DEBUG = config.enableDebug;\n Log.ENABLE_INFO = config.enableInfo;\n Log.ENABLE_WARN = config.enableWarn;\n Log.ENABLE_ERROR = config.enableError;\n Log.ENABLE_CALLBACK = config.enableCallback;\n }\n\n static _notifyChange() {\n let emitter = LoggingControl.emitter;\n\n if (emitter.listenerCount('change') > 0) {\n let config = LoggingControl.getConfig();\n emitter.emit('change', config);\n }\n }\n\n static registerListener(listener) {\n LoggingControl.emitter.addListener('change', listener);\n }\n\n static removeListener(listener) {\n LoggingControl.emitter.removeListener('change', listener);\n }\n\n static addLogListener(listener) {\n Log.emitter.addListener('log', listener);\n if (Log.emitter.listenerCount('log') > 0) {\n Log.ENABLE_CALLBACK = true;\n LoggingControl._notifyChange();\n }\n }\n\n static removeLogListener(listener) {\n Log.emitter.removeListener('log', listener);\n if (Log.emitter.listenerCount('log') === 0) {\n Log.ENABLE_CALLBACK = false;\n LoggingControl._notifyChange();\n }\n }\n\n}\n\nLoggingControl.emitter = new EventEmitter();\n\nexport default LoggingControl;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nclass Polyfill {\n\n static install() {\n // ES6 Object.setPrototypeOf\n Object.setPrototypeOf = Object.setPrototypeOf || function (obj, proto) {\n obj.__proto__ = proto;\n return obj;\n };\n\n // ES6 Object.assign\n Object.assign = Object.assign || function (target) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n let output = Object(target);\n for (let i = 1; i < arguments.length; i++) {\n let source = arguments[i];\n if (source !== undefined && source !== null) {\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n output[key] = source[key];\n }\n }\n }\n }\n return output;\n };\n\n // ES6 Promise (missing support in IE11)\n if (typeof self.Promise !== 'function') {\n require('es6-promise').polyfill();\n }\n }\n\n}\n\nPolyfill.install();\n\nexport default Polyfill;","/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * This file is derived from C++ project libWinTF8 (https://github.com/m13253/libWinTF8)\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction checkContinuation(uint8array, start, checkLength) {\n let array = uint8array;\n if (start + checkLength < array.length) {\n while (checkLength--) {\n if ((array[++start] & 0xC0) !== 0x80)\n return false;\n }\n return true;\n } else {\n return false;\n }\n}\n\nfunction decodeUTF8(uint8array) {\n let out = [];\n let input = uint8array;\n let i = 0;\n let length = uint8array.length;\n\n while (i < length) {\n if (input[i] < 0x80) {\n out.push(String.fromCharCode(input[i]));\n ++i;\n continue;\n } else if (input[i] < 0xC0) {\n // fallthrough\n } else if (input[i] < 0xE0) {\n if (checkContinuation(input, i, 1)) {\n let ucs4 = (input[i] & 0x1F) << 6 | (input[i + 1] & 0x3F);\n if (ucs4 >= 0x80) {\n out.push(String.fromCharCode(ucs4 & 0xFFFF));\n i += 2;\n continue;\n }\n }\n } else if (input[i] < 0xF0) {\n if (checkContinuation(input, i, 2)) {\n let ucs4 = (input[i] & 0xF) << 12 | (input[i + 1] & 0x3F) << 6 | input[i + 2] & 0x3F;\n if (ucs4 >= 0x800 && (ucs4 & 0xF800) !== 0xD800) {\n out.push(String.fromCharCode(ucs4 & 0xFFFF));\n i += 3;\n continue;\n }\n }\n } else if (input[i] < 0xF8) {\n if (checkContinuation(input, i, 3)) {\n let ucs4 = (input[i] & 0x7) << 18 | (input[i + 1] & 0x3F) << 12\n | (input[i + 2] & 0x3F) << 6 | (input[i + 3] & 0x3F);\n if (ucs4 > 0x10000 && ucs4 < 0x110000) {\n ucs4 -= 0x10000;\n out.push(String.fromCharCode((ucs4 >>> 10) | 0xD800));\n out.push(String.fromCharCode((ucs4 & 0x3FF) | 0xDC00));\n i += 4;\n continue;\n }\n }\n }\n out.push(String.fromCharCode(0xFFFD));\n ++i;\n }\n\n return out.join('');\n}\n\nexport default decodeUTF8;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// module factories are used so entry inlining is disabled\n// startup\n// Load entry module and return exports\nvar __webpack_exports__ = __webpack_require__(\"./src/index.js\");\n"],"sourceRoot":""}
|