1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 18:29:39 +02:00
This commit is contained in:
DanieL 2023-02-13 14:41:08 -03:00
parent 64c36d9f4e
commit 0d0338876d
1197 changed files with 121461 additions and 179724 deletions

View file

@ -1,4 +1,4 @@
/*! @name mpd-parser @version 0.21.1 @license Apache-2.0 */
/*! @name mpd-parser @version 0.22.1 @license Apache-2.0 */
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
@ -15,7 +15,7 @@ var resolveUrl__default = /*#__PURE__*/_interopDefaultLegacy(resolveUrl);
var window__default = /*#__PURE__*/_interopDefaultLegacy(window);
var decodeB64ToUint8Array__default = /*#__PURE__*/_interopDefaultLegacy(decodeB64ToUint8Array);
var version = "0.21.1";
var version = "0.22.1";
var isObject = function isObject(obj) {
return !!obj && typeof obj === 'object';
@ -1088,6 +1088,10 @@ var formatVideoPlaylist = function formatVideoPlaylist(_ref3) {
segments: segments
};
if (attributes.frameRate) {
playlist.attributes['FRAME-RATE'] = attributes.frameRate;
}
if (attributes.contentProtection) {
playlist.contentProtection = attributes.contentProtection;
}
@ -1738,6 +1742,19 @@ var getContent = function getContent(element) {
return element.textContent.trim();
};
/**
* Converts the provided string that may contain a division operation to a number.
*
* @param {string} value - the provided string value
*
* @return {number} the parsed string value
*/
var parseDivisionValue = function parseDivisionValue(value) {
return parseFloat(value.split('/').reduce(function (prev, current) {
return prev / current;
}));
};
var parseDuration = function parseDuration(str) {
var SECONDS_IN_YEAR = 365 * 24 * 60 * 60;
var SECONDS_IN_MONTH = 30 * 24 * 60 * 60;
@ -1904,6 +1921,18 @@ var parsers = {
return parseInt(value, 10);
},
/**
* Specifies the frame rate of the representation
*
* @param {string} value
* value of attribute as a string
* @return {number}
* The parsed frame rate
*/
frameRate: function frameRate(value) {
return parseDivisionValue(value);
},
/**
* Specifies the number of the first Media Segment in this Representation in the Period
*