diff --git a/app/index.html b/app/index.html
index 151fda54cf20bcfc2454f26235c091622aa860fc..8d015ed4f58a3e39ef06935bd6d0347081c0d19b 100644
--- a/app/index.html
+++ b/app/index.html
@@ -1034,10 +1034,10 @@
Аврора, ул. Авроры 6/1, Уфа
- BMW Транстехсервис, пр. Салавата Юлаева 95, Уфа
+ BMW Транстехсервис, пр. Салавата Юлаева 95, Уфа
- Fit Service, Казахская улица, 60, Ростов-на-Дону
+ Fit Service, Казахская улица, 60, Ростов-на-Дону
Авантаж Стайл, ул. Вильнюсская, 5, Москва
- Механик-СПб,ул. Тёплый Стан, 15, стр. 1, Москва
+ Механик-СПб, ул. Благодатная, 63, Санкт-Петербург
- Техноцентр Гараж, ул. Благодатная, 63, Санкт-Петербург
+ Техноцентр Гараж, ул. Тёплый Стан, 15, стр. 1, Москва
- Астор, Витебский проспект, 17
+ Астор, Витебский проспект, 17, корп. 10, Санкт-Петербург
- Zet-avto,ул. ул. Салова, 70, корп. 2, Санкт-Петербург
+ Zet-avto, ул. Салова, 70, корп. 2, Санкт-Петербург
@@ -1285,10 +1285,10 @@
- BMW Транстехсервис, пр. Салавата Юлаева 95, Уфа
+ BMW Транстехсервис, пр. Салавата Юлаева 95, Уфа
- Fit Service, Казахская улица, 60, Ростов-на-Дону
+ Fit Service, Казахская улица, 60, Ростов-на-Дону
Авантаж Стайл, ул. Вильнюсская, 5, Москва
- Механик-СПб,ул. Тёплый Стан, 15, стр. 1, Москва
+ Механик-СПб, ул. Благодатная, 63, Санкт-Петербург
- Техноцентр Гараж, ул. Благодатная, 63, Санкт-Петербург
+ Техноцентр Гараж, ул. Тёплый Стан, 15, стр. 1, Москва
- Астор, Витебский проспект, 17
+ Астор, Витебский проспект, 17, корп. 10, Санкт-Петербург
- Zet-avto,ул. ул. Салова, 70, корп. 2, Санкт-Петербург
+ Zet-avto, ул. Салова, 70, корп. 2, Санкт-Петербург
diff --git a/app/js/main.js b/app/js/main.js
index 3aa2fcbeddac6b8fa73fc17db21271def880120e..72a91f2b551861ce8bc80f0da7209adf9ca04e3f 100644
--- a/app/js/main.js
+++ b/app/js/main.js
@@ -20,10541 +20,8144 @@ const t=t=>"object"==typeof t&&null!==t&&t.constructor===Object&&"[object Object
/***/ }),
-/***/ "./node_modules/@videojs/vhs-utils/es/byte-helpers.js":
-/*!************************************************************!*\
- !*** ./node_modules/@videojs/vhs-utils/es/byte-helpers.js ***!
- \************************************************************/
+/***/ "./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js":
+/*!*************************************************************************!*\
+ !*** ./node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js ***!
+ \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */ ENDIANNESS: () => (/* binding */ ENDIANNESS),
-/* harmony export */ IS_BIG_ENDIAN: () => (/* binding */ IS_BIG_ENDIAN),
-/* harmony export */ IS_LITTLE_ENDIAN: () => (/* binding */ IS_LITTLE_ENDIAN),
-/* harmony export */ bytesMatch: () => (/* binding */ bytesMatch),
-/* harmony export */ bytesToNumber: () => (/* binding */ bytesToNumber),
-/* harmony export */ bytesToString: () => (/* binding */ bytesToString),
-/* harmony export */ concatTypedArrays: () => (/* binding */ concatTypedArrays),
-/* harmony export */ countBits: () => (/* binding */ countBits),
-/* harmony export */ countBytes: () => (/* binding */ countBytes),
-/* harmony export */ isArrayBufferView: () => (/* binding */ isArrayBufferView),
-/* harmony export */ isTypedArray: () => (/* binding */ isTypedArray),
-/* harmony export */ numberToBytes: () => (/* binding */ numberToBytes),
-/* harmony export */ padStart: () => (/* binding */ padStart),
-/* harmony export */ reverseBytes: () => (/* binding */ reverseBytes),
-/* harmony export */ sliceBytes: () => (/* binding */ sliceBytes),
-/* harmony export */ stringToBytes: () => (/* binding */ stringToBytes),
-/* harmony export */ toBinaryString: () => (/* binding */ toBinaryString),
-/* harmony export */ toHexString: () => (/* binding */ toHexString),
-/* harmony export */ toUint8: () => (/* binding */ toUint8)
+/* harmony export */ "default": () => (/* binding */ decodeB64ToUint8Array)
/* harmony export */ });
/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! global/window */ "./node_modules/global/window.js");
/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_0__);
- // const log2 = Math.log2 ? Math.log2 : (x) => (Math.log(x) / Math.log(2));
-
-var repeat = function repeat(str, len) {
- var acc = '';
-
- while (len--) {
- acc += str;
- }
- return acc;
-}; // count the number of bits it would take to represent a number
-// we used to do this with log2 but BigInt does not support builtin math
-// Math.ceil(log2(x));
+var atob = function atob(s) {
+ return (global_window__WEBPACK_IMPORTED_MODULE_0___default().atob) ? global_window__WEBPACK_IMPORTED_MODULE_0___default().atob(s) : Buffer.from(s, 'base64').toString('binary');
+};
-var countBits = function countBits(x) {
- return x.toString(2).length;
-}; // count the number of whole bytes it would take to represent a number
+function decodeB64ToUint8Array(b64Text) {
+ var decodedString = atob(b64Text);
+ var array = new Uint8Array(decodedString.length);
-var countBytes = function countBytes(x) {
- return Math.ceil(countBits(x) / 8);
-};
-var padStart = function padStart(b, len, str) {
- if (str === void 0) {
- str = ' ';
+ for (var i = 0; i < decodedString.length; i++) {
+ array[i] = decodedString.charCodeAt(i);
}
- return (repeat(str, len) + b.toString()).slice(-len);
-};
-var isArrayBufferView = function isArrayBufferView(obj) {
- if (ArrayBuffer.isView === 'function') {
- return ArrayBuffer.isView(obj);
- }
+ return array;
+}
- return obj && obj.buffer instanceof ArrayBuffer;
-};
-var isTypedArray = function isTypedArray(obj) {
- return isArrayBufferView(obj);
-};
-var toUint8 = function toUint8(bytes) {
- if (bytes instanceof Uint8Array) {
- return bytes;
- }
+/***/ }),
- if (!Array.isArray(bytes) && !isTypedArray(bytes) && !(bytes instanceof ArrayBuffer)) {
- // any non-number or NaN leads to empty uint8array
- // eslint-disable-next-line
- if (typeof bytes !== 'number' || typeof bytes === 'number' && bytes !== bytes) {
- bytes = 0;
- } else {
- bytes = [bytes];
- }
- }
+/***/ "./node_modules/@videojs/vhs-utils/es/media-groups.js":
+/*!************************************************************!*\
+ !*** ./node_modules/@videojs/vhs-utils/es/media-groups.js ***!
+ \************************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- return new Uint8Array(bytes && bytes.buffer || bytes, bytes && bytes.byteOffset || 0, bytes && bytes.byteLength || 0);
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ forEachMediaGroup: () => (/* binding */ forEachMediaGroup)
+/* harmony export */ });
+/**
+ * Loops through all supported media groups in master and calls the provided
+ * callback for each group
+ *
+ * @param {Object} master
+ * The parsed master manifest object
+ * @param {string[]} groups
+ * The media groups to call the callback for
+ * @param {Function} callback
+ * Callback to call for each media group
+ */
+var forEachMediaGroup = function forEachMediaGroup(master, groups, callback) {
+ groups.forEach(function (mediaType) {
+ for (var groupKey in master.mediaGroups[mediaType]) {
+ for (var labelKey in master.mediaGroups[mediaType][groupKey]) {
+ var mediaProperties = master.mediaGroups[mediaType][groupKey][labelKey];
+ callback(mediaProperties, mediaType, groupKey, labelKey);
+ }
+ }
+ });
};
-var toHexString = function toHexString(bytes) {
- bytes = toUint8(bytes);
- var str = '';
- for (var i = 0; i < bytes.length; i++) {
- str += padStart(bytes[i].toString(16), 2, '0');
- }
+/***/ }),
- return str;
-};
-var toBinaryString = function toBinaryString(bytes) {
- bytes = toUint8(bytes);
- var str = '';
+/***/ "./node_modules/@videojs/vhs-utils/es/resolve-url.js":
+/*!***********************************************************!*\
+ !*** ./node_modules/@videojs/vhs-utils/es/resolve-url.js ***!
+ \***********************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- for (var i = 0; i < bytes.length; i++) {
- str += padStart(bytes[i].toString(2), 8, '0');
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
+/* harmony export */ });
+/* harmony import */ var url_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! url-toolkit */ "./node_modules/url-toolkit/src/url-toolkit.js");
+/* harmony import */ var url_toolkit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(url_toolkit__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! global/window */ "./node_modules/global/window.js");
+/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_1__);
- return str;
-};
-var BigInt = (global_window__WEBPACK_IMPORTED_MODULE_0___default().BigInt) || Number;
-var BYTE_TABLE = [BigInt('0x1'), BigInt('0x100'), BigInt('0x10000'), BigInt('0x1000000'), BigInt('0x100000000'), BigInt('0x10000000000'), BigInt('0x1000000000000'), BigInt('0x100000000000000'), BigInt('0x10000000000000000')];
-var ENDIANNESS = function () {
- var a = new Uint16Array([0xFFCC]);
- var b = new Uint8Array(a.buffer, a.byteOffset, a.byteLength);
- if (b[0] === 0xFF) {
- return 'big';
- }
+var DEFAULT_LOCATION = 'http://example.com';
- if (b[0] === 0xCC) {
- return 'little';
- }
+var resolveUrl = function resolveUrl(baseUrl, relativeUrl) {
+ // return early if we don't need to resolve
+ if (/^[a-z]+:/i.test(relativeUrl)) {
+ return relativeUrl;
+ } // if baseUrl is a data URI, ignore it and resolve everything relative to window.location
- return 'unknown';
-}();
-var IS_BIG_ENDIAN = ENDIANNESS === 'big';
-var IS_LITTLE_ENDIAN = ENDIANNESS === 'little';
-var bytesToNumber = function bytesToNumber(bytes, _temp) {
- var _ref = _temp === void 0 ? {} : _temp,
- _ref$signed = _ref.signed,
- signed = _ref$signed === void 0 ? false : _ref$signed,
- _ref$le = _ref.le,
- le = _ref$le === void 0 ? false : _ref$le;
- bytes = toUint8(bytes);
- var fn = le ? 'reduce' : 'reduceRight';
- var obj = bytes[fn] ? bytes[fn] : Array.prototype[fn];
- var number = obj.call(bytes, function (total, byte, i) {
- var exponent = le ? i : Math.abs(i + 1 - bytes.length);
- return total + BigInt(byte) * BYTE_TABLE[exponent];
- }, BigInt(0));
+ if (/^data:/.test(baseUrl)) {
+ baseUrl = (global_window__WEBPACK_IMPORTED_MODULE_1___default().location) && (global_window__WEBPACK_IMPORTED_MODULE_1___default().location).href || '';
+ } // IE11 supports URL but not the URL constructor
+ // feature detect the behavior we want
- if (signed) {
- var max = BYTE_TABLE[bytes.length] / BigInt(2) - BigInt(1);
- number = BigInt(number);
- if (number > max) {
- number -= max;
- number -= max;
- number -= BigInt(2);
- }
- }
+ var nativeURL = typeof (global_window__WEBPACK_IMPORTED_MODULE_1___default().URL) === 'function';
+ var protocolLess = /^\/\//.test(baseUrl); // remove location if window.location isn't available (i.e. we're in node)
+ // and if baseUrl isn't an absolute url
- return Number(number);
-};
-var numberToBytes = function numberToBytes(number, _temp2) {
- var _ref2 = _temp2 === void 0 ? {} : _temp2,
- _ref2$le = _ref2.le,
- le = _ref2$le === void 0 ? false : _ref2$le;
+ var removeLocation = !(global_window__WEBPACK_IMPORTED_MODULE_1___default().location) && !/\/\//i.test(baseUrl); // if the base URL is relative then combine with the current location
- // eslint-disable-next-line
- if (typeof number !== 'bigint' && typeof number !== 'number' || typeof number === 'number' && number !== number) {
- number = 0;
+ if (nativeURL) {
+ baseUrl = new (global_window__WEBPACK_IMPORTED_MODULE_1___default().URL)(baseUrl, (global_window__WEBPACK_IMPORTED_MODULE_1___default().location) || DEFAULT_LOCATION);
+ } else if (!/\/\//i.test(baseUrl)) {
+ baseUrl = url_toolkit__WEBPACK_IMPORTED_MODULE_0___default().buildAbsoluteURL((global_window__WEBPACK_IMPORTED_MODULE_1___default().location) && (global_window__WEBPACK_IMPORTED_MODULE_1___default().location).href || '', baseUrl);
}
- number = BigInt(number);
- var byteCount = countBytes(number);
- var bytes = new Uint8Array(new ArrayBuffer(byteCount));
-
- for (var i = 0; i < byteCount; i++) {
- var byteIndex = le ? i : Math.abs(i + 1 - bytes.length);
- bytes[byteIndex] = Number(number / BYTE_TABLE[i] & BigInt(0xFF));
+ if (nativeURL) {
+ var newUrl = new URL(relativeUrl, baseUrl); // if we're a protocol-less url, remove the protocol
+ // and if we're location-less, remove the location
+ // otherwise, return the url unmodified
- if (number < 0) {
- bytes[byteIndex] = Math.abs(~bytes[byteIndex]);
- bytes[byteIndex] -= i === 0 ? 1 : 2;
+ if (removeLocation) {
+ return newUrl.href.slice(DEFAULT_LOCATION.length);
+ } else if (protocolLess) {
+ return newUrl.href.slice(newUrl.protocol.length);
}
+
+ return newUrl.href;
}
- return bytes;
+ return url_toolkit__WEBPACK_IMPORTED_MODULE_0___default().buildAbsoluteURL(baseUrl, relativeUrl);
};
-var bytesToString = function bytesToString(bytes) {
- if (!bytes) {
- return '';
- } // TODO: should toUint8 handle cases where we only have 8 bytes
- // but report more since this is a Uint16+ Array?
+/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (resolveUrl);
- bytes = Array.prototype.slice.call(bytes);
- var string = String.fromCharCode.apply(null, toUint8(bytes));
+/***/ }),
- try {
- return decodeURIComponent(escape(string));
- } catch (e) {// if decodeURIComponent/escape fails, we are dealing with partial
- // or full non string data. Just return the potentially garbled string.
- }
+/***/ "./node_modules/@videojs/vhs-utils/es/stream.js":
+/*!******************************************************!*\
+ !*** ./node_modules/@videojs/vhs-utils/es/stream.js ***!
+ \******************************************************/
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- return string;
-};
-var stringToBytes = function stringToBytes(string, stringIsBytes) {
- if (typeof string !== 'string' && string && typeof string.toString === 'function') {
- string = string.toString();
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ "default": () => (/* binding */ Stream)
+/* harmony export */ });
+/**
+ * @file stream.js
+ */
+
+/**
+ * A lightweight readable stream implemention that handles event dispatching.
+ *
+ * @class Stream
+ */
+var Stream = /*#__PURE__*/function () {
+ function Stream() {
+ this.listeners = {};
}
+ /**
+ * Add a listener for a specified event type.
+ *
+ * @param {string} type the event name
+ * @param {Function} listener the callback to be invoked when an event of
+ * the specified type occurs
+ */
- if (typeof string !== 'string') {
- return new Uint8Array();
- } // If the string already is bytes, we don't have to do this
- // otherwise we do this so that we split multi length characters
- // into individual bytes
+ var _proto = Stream.prototype;
- if (!stringIsBytes) {
- string = unescape(encodeURIComponent(string));
+ _proto.on = function on(type, listener) {
+ if (!this.listeners[type]) {
+ this.listeners[type] = [];
+ }
+
+ this.listeners[type].push(listener);
}
+ /**
+ * Remove a listener for a specified event type.
+ *
+ * @param {string} type the event name
+ * @param {Function} listener a function previously registered for this
+ * type of event through `on`
+ * @return {boolean} if we could turn it off or not
+ */
+ ;
- var view = new Uint8Array(string.length);
+ _proto.off = function off(type, listener) {
+ if (!this.listeners[type]) {
+ return false;
+ }
- for (var i = 0; i < string.length; i++) {
- view[i] = string.charCodeAt(i);
- }
+ var index = this.listeners[type].indexOf(listener); // TODO: which is better?
+ // In Video.js we slice listener functions
+ // on trigger so that it does not mess up the order
+ // while we loop through.
+ //
+ // Here we slice on off so that the loop in trigger
+ // can continue using it's old reference to loop without
+ // messing up the order.
- return view;
-};
-var concatTypedArrays = function concatTypedArrays() {
- for (var _len = arguments.length, buffers = new Array(_len), _key = 0; _key < _len; _key++) {
- buffers[_key] = arguments[_key];
+ this.listeners[type] = this.listeners[type].slice(0);
+ this.listeners[type].splice(index, 1);
+ return index > -1;
}
+ /**
+ * Trigger an event of the specified type on this stream. Any additional
+ * arguments to this function are passed as parameters to event listeners.
+ *
+ * @param {string} type the event name
+ */
+ ;
- buffers = buffers.filter(function (b) {
- return b && (b.byteLength || b.length) && typeof b !== 'string';
- });
+ _proto.trigger = function trigger(type) {
+ var callbacks = this.listeners[type];
- if (buffers.length <= 1) {
- // for 0 length we will return empty uint8
- // for 1 length we return the first uint8
- return toUint8(buffers[0]);
- }
+ if (!callbacks) {
+ return;
+ } // Slicing the arguments on every invocation of this method
+ // can add a significant amount of overhead. Avoid the
+ // intermediate object creation for the common case of a
+ // single callback argument
- var totalLen = buffers.reduce(function (total, buf, i) {
- return total + (buf.byteLength || buf.length);
- }, 0);
- var tempBuffer = new Uint8Array(totalLen);
- var offset = 0;
- buffers.forEach(function (buf) {
- buf = toUint8(buf);
- tempBuffer.set(buf, offset);
- offset += buf.byteLength;
- });
- return tempBuffer;
-};
-/**
- * Check if the bytes "b" are contained within bytes "a".
- *
- * @param {Uint8Array|Array} a
- * Bytes to check in
- *
- * @param {Uint8Array|Array} b
- * Bytes to check for
- *
- * @param {Object} options
- * options
- *
- * @param {Array|Uint8Array} [offset=0]
- * offset to use when looking at bytes in a
- *
- * @param {Array|Uint8Array} [mask=[]]
- * mask to use on bytes before comparison.
- *
- * @return {boolean}
- * If all bytes in b are inside of a, taking into account
- * bit masks.
- */
-var bytesMatch = function bytesMatch(a, b, _temp3) {
- var _ref3 = _temp3 === void 0 ? {} : _temp3,
- _ref3$offset = _ref3.offset,
- offset = _ref3$offset === void 0 ? 0 : _ref3$offset,
- _ref3$mask = _ref3.mask,
- mask = _ref3$mask === void 0 ? [] : _ref3$mask;
+ if (arguments.length === 2) {
+ var length = callbacks.length;
- a = toUint8(a);
- b = toUint8(b); // ie 11 does not support uint8 every
+ for (var i = 0; i < length; ++i) {
+ callbacks[i].call(this, arguments[1]);
+ }
+ } else {
+ var args = Array.prototype.slice.call(arguments, 1);
+ var _length = callbacks.length;
- var fn = b.every ? b.every : Array.prototype.every;
- return b.length && a.length - offset >= b.length && // ie 11 doesn't support every on uin8
- fn.call(b, function (bByte, i) {
- var aByte = mask[i] ? mask[i] & a[offset + i] : a[offset + i];
- return bByte === aByte;
- });
-};
-var sliceBytes = function sliceBytes(src, start, end) {
- if (Uint8Array.prototype.slice) {
- return Uint8Array.prototype.slice.call(src, start, end);
+ for (var _i = 0; _i < _length; ++_i) {
+ callbacks[_i].apply(this, args);
+ }
+ }
}
+ /**
+ * Destroys the stream and cleans up.
+ */
+ ;
- return new Uint8Array(Array.prototype.slice.call(src, start, end));
-};
-var reverseBytes = function reverseBytes(src) {
- if (src.reverse) {
- return src.reverse();
+ _proto.dispose = function dispose() {
+ this.listeners = {};
}
+ /**
+ * Forwards all `data` events on this stream to the destination stream. The
+ * destination stream should provide a method `push` to receive the data
+ * events as they arrive.
+ *
+ * @param {Stream} destination the stream that will receive all `data` events
+ * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options
+ */
+ ;
+
+ _proto.pipe = function pipe(destination) {
+ this.on('data', function (data) {
+ destination.push(data);
+ });
+ };
+
+ return Stream;
+}();
+
- return Array.prototype.reverse.call(src);
-};
/***/ }),
-/***/ "./node_modules/@videojs/vhs-utils/es/codec-helpers.js":
-/*!*************************************************************!*\
- !*** ./node_modules/@videojs/vhs-utils/es/codec-helpers.js ***!
- \*************************************************************/
-/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+/***/ "./node_modules/@videojs/xhr/lib/http-handler.js":
+/*!*******************************************************!*\
+ !*** ./node_modules/@videojs/xhr/lib/http-handler.js ***!
+ \*******************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */ getAv1Codec: () => (/* binding */ getAv1Codec),
-/* harmony export */ getAvcCodec: () => (/* binding */ getAvcCodec),
-/* harmony export */ getHvcCodec: () => (/* binding */ getHvcCodec)
-/* harmony export */ });
-/* harmony import */ var _byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte-helpers.js */ "./node_modules/@videojs/vhs-utils/es/byte-helpers.js");
- // https://aomediacodec.github.io/av1-isobmff/#av1codecconfigurationbox-syntax
-// https://developer.mozilla.org/en-US/docs/Web/Media/Formats/codecs_parameter#AV1
-var getAv1Codec = function getAv1Codec(bytes) {
- var codec = '';
- var profile = bytes[1] >>> 3;
- var level = bytes[1] & 0x1F;
- var tier = bytes[2] >>> 7;
- var highBitDepth = (bytes[2] & 0x40) >> 6;
- var twelveBit = (bytes[2] & 0x20) >> 5;
- var monochrome = (bytes[2] & 0x10) >> 4;
- var chromaSubsamplingX = (bytes[2] & 0x08) >> 3;
- var chromaSubsamplingY = (bytes[2] & 0x04) >> 2;
- var chromaSamplePosition = bytes[2] & 0x03;
- codec += profile + "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(level, 2, '0');
- if (tier === 0) {
- codec += 'M';
- } else if (tier === 1) {
- codec += 'H';
+var window = __webpack_require__(/*! global/window */ "./node_modules/global/window.js");
+
+var httpResponseHandler = function httpResponseHandler(callback, decodeResponseBody) {
+ if (decodeResponseBody === void 0) {
+ decodeResponseBody = false;
}
- var bitDepth;
+ return function (err, response, responseBody) {
+ // if the XHR failed, return that error
+ if (err) {
+ callback(err);
+ return;
+ } // if the HTTP status code is 4xx or 5xx, the request also failed
- if (profile === 2 && highBitDepth) {
- bitDepth = twelveBit ? 12 : 10;
- } else {
- bitDepth = highBitDepth ? 10 : 8;
- }
- codec += "." + (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.padStart)(bitDepth, 2, '0'); // TODO: can we parse color range??
+ if (response.statusCode >= 400 && response.statusCode <= 599) {
+ var cause = responseBody;
- codec += "." + monochrome;
- codec += "." + chromaSubsamplingX + chromaSubsamplingY + chromaSamplePosition;
- return codec;
-};
-var getAvcCodec = function getAvcCodec(bytes) {
- var profileId = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toHexString)(bytes[1]);
- var constraintFlags = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toHexString)(bytes[2] & 0xFC);
- var levelId = (0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toHexString)(bytes[3]);
- return "" + profileId + constraintFlags + levelId;
-};
-var getHvcCodec = function getHvcCodec(bytes) {
- var codec = '';
- var profileSpace = bytes[1] >> 6;
- var profileId = bytes[1] & 0x1F;
- var tierFlag = (bytes[1] & 0x20) >> 5;
- var profileCompat = bytes.subarray(2, 6);
- var constraintIds = bytes.subarray(6, 12);
- var levelId = bytes[12];
+ if (decodeResponseBody) {
+ if (window.TextDecoder) {
+ var charset = getCharset(response.headers && response.headers['content-type']);
- if (profileSpace === 1) {
- codec += 'A';
- } else if (profileSpace === 2) {
- codec += 'B';
- } else if (profileSpace === 3) {
- codec += 'C';
- }
-
- codec += profileId + "."; // ffmpeg does this in big endian
+ try {
+ cause = new TextDecoder(charset).decode(responseBody);
+ } catch (e) {}
+ } else {
+ cause = String.fromCharCode.apply(null, new Uint8Array(responseBody));
+ }
+ }
- var profileCompatVal = parseInt((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toBinaryString)(profileCompat).split('').reverse().join(''), 2); // apple does this in little endian...
+ callback({
+ cause: cause
+ });
+ return;
+ } // otherwise, request succeeded
- if (profileCompatVal > 255) {
- profileCompatVal = parseInt((0,_byte_helpers_js__WEBPACK_IMPORTED_MODULE_0__.toBinaryString)(profileCompat), 2);
- }
- codec += profileCompatVal.toString(16) + ".";
+ callback(null, responseBody);
+ };
+};
- if (tierFlag === 0) {
- codec += 'L';
- } else {
- codec += 'H';
+function getCharset(contentTypeHeader) {
+ if (contentTypeHeader === void 0) {
+ contentTypeHeader = '';
}
- codec += levelId;
- var constraints = '';
-
- for (var i = 0; i < constraintIds.length; i++) {
- var v = constraintIds[i];
-
- if (v) {
- if (constraints) {
- constraints += '.';
- }
+ return contentTypeHeader.toLowerCase().split(';').reduce(function (charset, contentType) {
+ var _contentType$split = contentType.split('='),
+ type = _contentType$split[0],
+ value = _contentType$split[1];
- constraints += v.toString(16);
+ if (type.trim() === 'charset') {
+ return value.trim();
}
- }
- if (constraints) {
- codec += "." + constraints;
- }
+ return charset;
+ }, 'utf-8');
+}
- return codec;
-};
+module.exports = httpResponseHandler;
/***/ }),
-/***/ "./node_modules/@videojs/vhs-utils/es/codecs.js":
-/*!******************************************************!*\
- !*** ./node_modules/@videojs/vhs-utils/es/codecs.js ***!
- \******************************************************/
-/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+/***/ "./node_modules/@videojs/xhr/lib/index.js":
+/*!************************************************!*\
+ !*** ./node_modules/@videojs/xhr/lib/index.js ***!
+ \************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */ DEFAULT_AUDIO_CODEC: () => (/* binding */ DEFAULT_AUDIO_CODEC),
-/* harmony export */ DEFAULT_VIDEO_CODEC: () => (/* binding */ DEFAULT_VIDEO_CODEC),
-/* harmony export */ browserSupportsCodec: () => (/* binding */ browserSupportsCodec),
-/* harmony export */ codecsFromDefault: () => (/* binding */ codecsFromDefault),
-/* harmony export */ getMimeForCodec: () => (/* binding */ getMimeForCodec),
-/* harmony export */ isAudioCodec: () => (/* binding */ isAudioCodec),
-/* harmony export */ isTextCodec: () => (/* binding */ isTextCodec),
-/* harmony export */ isVideoCodec: () => (/* binding */ isVideoCodec),
-/* harmony export */ mapLegacyAvcCodecs: () => (/* binding */ mapLegacyAvcCodecs),
-/* harmony export */ muxerSupportsCodec: () => (/* binding */ muxerSupportsCodec),
-/* harmony export */ parseCodecs: () => (/* binding */ parseCodecs),
-/* harmony export */ translateLegacyCodec: () => (/* binding */ translateLegacyCodec),
-/* harmony export */ translateLegacyCodecs: () => (/* binding */ translateLegacyCodecs)
-/* harmony export */ });
-/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! global/window */ "./node_modules/global/window.js");
-/* harmony import */ var global_window__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(global_window__WEBPACK_IMPORTED_MODULE_0__);
-var regexs = {
- // to determine mime types
- mp4: /^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,
- webm: /^(vp0?[89]|av0?1|opus|vorbis)/,
- ogg: /^(vp0?[89]|theora|flac|opus|vorbis)/,
- // to determine if a codec is audio or video
- video: /^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,
- audio: /^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,
- text: /^(stpp.ttml.im1t)/,
- // mux.js support regex
- muxerVideo: /^(avc0?1)/,
- muxerAudio: /^(mp4a)/,
- // match nothing as muxer does not support text right now.
- // there cannot never be a character before the start of a string
- // so this matches nothing.
- muxerText: /a^/
-};
-var mediaTypes = ['video', 'audio', 'text'];
-var upperMediaTypes = ['Video', 'Audio', 'Text'];
+
+var window = __webpack_require__(/*! global/window */ "./node_modules/global/window.js");
+
+var _extends = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js");
+
+var isFunction = __webpack_require__(/*! is-function */ "./node_modules/is-function/index.js");
+
+createXHR.httpHandler = __webpack_require__(/*! ./http-handler.js */ "./node_modules/@videojs/xhr/lib/http-handler.js");
/**
- * Replace the old apple-style `avc1.