1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-06 03:50:04 +02:00

Update dependabot

This commit is contained in:
Daniel Neto 2024-09-16 23:02:44 -03:00
parent 56a24d4781
commit 024b79d882
142 changed files with 15927 additions and 1513 deletions

View file

@ -1,6 +1,6 @@
/**
* @license
* Video.js 8.17.3 <http://videojs.com/>
* Video.js 8.17.4 <http://videojs.com/>
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
* Available under Apache License Version 2.0
* <https://github.com/videojs/video.js/blob/main/LICENSE>
@ -16,7 +16,7 @@
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.videojs = factory());
})(this, (function () { 'use strict';
var version$5 = "8.17.3";
var version$5 = "8.17.4";
/**
* An Object that contains lifecycle hooks as keys which point to an array
@ -1169,7 +1169,7 @@
/**
* The callback definition for toggleClass.
*
* @callback module:dom~PredicateCallback
* @callback PredicateCallback
* @param {Element} element
* The DOM element of the Component.
*
@ -1178,8 +1178,9 @@
*
* @return {boolean|undefined}
* If `true` is returned, the `classToToggle` will be added to the
* `element`. If `false`, the `classToToggle` will be removed from
* the `element`. If `undefined`, the callback will be ignored.
* `element`, but not removed. If `false`, the `classToToggle` will be removed from
* the `element`, but not added. If `undefined`, the callback will be ignored.
*
*/
/**
@ -1192,7 +1193,7 @@
* @param {string} classToToggle
* The class that should be toggled.
*
* @param {boolean|module:dom~PredicateCallback} [predicate]
* @param {boolean|PredicateCallback} [predicate]
* See the return value for {@link module:dom~PredicateCallback}
*
* @return {Element}
@ -3618,7 +3619,6 @@
* @param {Function} fn
* The function to call with `EventTarget`s
*/
on(type, fn) {}
/**
* Removes an `event listener` for a specific event from an instance of `EventTarget`.
@ -3631,7 +3631,6 @@
* @param {Function} [fn]
* The function to remove. If not specified, all listeners managed by Video.js will be removed.
*/
off(type, fn) {}
/**
* This function will add an `event listener` that gets triggered only once. After the
@ -3644,7 +3643,6 @@
* @param {Function} fn
* The function to be called once for each event name.
*/
one(type, fn) {}
/**
* This function will add an `event listener` that gets triggered only once and is
@ -3658,7 +3656,6 @@
* @param {Function} fn
* The function to be called once for each event name.
*/
any(type, fn) {}
/**
* This function causes an event to happen. This will then cause any `event listeners`
@ -3679,7 +3676,6 @@
* @param {Object} [hash]
* Optionally extra argument to pass through to an event listener
*/
trigger(event, hash) {}
/**
* Dispose of the `Component` and all child components.
@ -4391,10 +4387,10 @@
* - `classToToggle` gets removed when {@link Component#hasClass} would return true.
*
* @param {string} classToToggle
* The class to add or remove based on (@link Component#hasClass}
* The class to add or remove. Passed to DOMTokenList's toggle()
*
* @param {boolean|Dom~predicate} [predicate]
* An {@link Dom~predicate} function or a boolean
* @param {boolean|Dom.PredicateCallback} [predicate]
* A boolean or function that returns a boolean. Passed to DOMTokenList's toggle().
*/
toggleClass(classToToggle, predicate) {
toggleClass(this.el_, classToToggle, predicate);
@ -5101,7 +5097,7 @@
*/
requestNamedAnimationFrame(name, fn) {
if (this.namedRafs_.has(name)) {
return;
this.cancelNamedAnimationFrame(name);
}
this.clearTimersOnDispose_();
fn = bind_(this, fn);
@ -5905,18 +5901,6 @@
*/
MediaError.prototype.MEDIA_ERR_ENCRYPTED = 5;
var tuple = SafeParseTuple;
function SafeParseTuple(obj, reviver) {
var json;
var error = null;
try {
json = JSON.parse(obj, reviver);
} catch (err) {
error = err;
}
return [error, json];
}
/**
* Returns whether an object is `Promise`-like (i.e. has a `then` method).
*
@ -12411,24 +12395,26 @@
this.player_.on('focusin', this.handlePlayerFocus_.bind(this));
this.player_.on('focusout', this.handlePlayerBlur_.bind(this));
this.isListening_ = true;
this.player_.errorDisplay.on('aftermodalfill', () => {
this.updateFocusableComponents();
if (this.focusableComponents.length) {
// The modal has focusable components:
if (this.player_.errorDisplay) {
this.player_.errorDisplay.on('aftermodalfill', () => {
this.updateFocusableComponents();
if (this.focusableComponents.length) {
// The modal has focusable components:
if (this.focusableComponents.length > 1) {
// The modal has close button + some additional buttons.
// Focusing first additional button:
if (this.focusableComponents.length > 1) {
// The modal has close button + some additional buttons.
// Focusing first additional button:
this.focusableComponents[1].focus();
} else {
// The modal has only close button,
// Focusing it:
this.focusableComponents[1].focus();
} else {
// The modal has only close button,
// Focusing it:
this.focusableComponents[0].focus();
this.focusableComponents[0].focus();
}
}
}
});
});
}
}
/**
@ -13732,6 +13718,45 @@
}
this.updateForTrack(descriptionsTrack);
}
if (!window.CSS.supports('inset', '10px')) {
const textTrackDisplay = this.el_;
const vjsTextTrackCues = textTrackDisplay.querySelectorAll('.vjs-text-track-cue');
const controlBarHeight = this.player_.controlBar.el_.getBoundingClientRect().height;
const playerHeight = this.player_.el_.getBoundingClientRect().height;
// Clear inline style before getting actual height of textTrackDisplay
textTrackDisplay.style = '';
// textrack style updates, this styles are required to be inline
tryUpdateStyle(textTrackDisplay, 'position', 'relative');
tryUpdateStyle(textTrackDisplay, 'height', playerHeight - controlBarHeight + 'px');
tryUpdateStyle(textTrackDisplay, 'top', 'unset');
if (IS_SMART_TV) {
tryUpdateStyle(textTrackDisplay, 'bottom', playerHeight + 'px');
} else {
tryUpdateStyle(textTrackDisplay, 'bottom', '0px');
}
// vjsTextTrackCue style updates
if (vjsTextTrackCues.length > 0) {
vjsTextTrackCues.forEach(vjsTextTrackCue => {
// verify if inset styles are inline
if (vjsTextTrackCue.style.inset) {
const insetStyles = vjsTextTrackCue.style.inset.split(' ');
// expected value is always 3
if (insetStyles.length === 3) {
Object.assign(vjsTextTrackCue.style, {
top: insetStyles[0],
right: insetStyles[1],
bottom: insetStyles[2],
left: 'unset'
});
}
}
});
}
}
}
/**
@ -28622,12 +28647,12 @@
// Check if data-setup attr exists.
if (dataSetup !== null) {
// Parse options JSON
// If empty string, make it a parsable json object.
const [err, data] = tuple(dataSetup || '{}');
if (err) {
log$1.error(err);
try {
// If empty string, make it a parsable json object.
Object.assign(tagOptions, JSON.parse(dataSetup || '{}'));
} catch (e) {
log$1.error('data-setup', e);
}
Object.assign(tagOptions, data);
}
Object.assign(baseOptions, tagOptions);
@ -28709,6 +28734,34 @@
*/
this.trigger('playbackrateschange');
}
/**
* Reports whether or not a player has a plugin available.
*
* This does not report whether or not the plugin has ever been initialized
* on this player. For that, [usingPlugin]{@link Player#usingPlugin}.
*
* @method hasPlugin
* @param {string} name
* The name of a plugin.
*
* @return {boolean}
* Whether or not this player has the requested plugin available.
*/
/**
* Reports whether or not a player is using a plugin by name.
*
* For basic plugins, this only reports whether the plugin has _ever_ been
* initialized on this player.
*
* @method Player#usingPlugin
* @param {string} name
* The name of a plugin.
*
* @return {boolean}
* Whether or not this player is using the requested plugin.
*/
}
/**
@ -28885,34 +28938,6 @@
* @type {Event}
*/
/**
* Reports whether or not a player has a plugin available.
*
* This does not report whether or not the plugin has ever been initialized
* on this player. For that, [usingPlugin]{@link Player#usingPlugin}.
*
* @method Player#hasPlugin
* @param {string} name
* The name of a plugin.
*
* @return {boolean}
* Whether or not this player has the requested plugin available.
*/
/**
* Reports whether or not a player is using a plugin by name.
*
* For basic plugins, this only reports whether the plugin has _ever_ been
* initialized on this player.
*
* @method Player#usingPlugin
* @param {string} name
* The name of a plugin.
*
* @return {boolean}
* Whether or not this player is using the requested plugin.
*/
Component$1.registerComponent('Player', Player);
/**
@ -40754,7 +40779,7 @@
};
var clock_1 = clock.ONE_SECOND_IN_TS;
/*! @name @videojs/http-streaming @version 3.13.2 @license Apache-2.0 */
/*! @name @videojs/http-streaming @version 3.13.3 @license Apache-2.0 */
/**
* @file resolve-url.js - Handling how URLs are resolved and manipulated
@ -56366,6 +56391,12 @@
}
return false;
};
/**
* Fixes certain bad timeline scenarios by resetting the loader.
*
* @param {SegmentLoader} segmentLoader
*/
const fixBadTimelineChange = segmentLoader => {
if (!segmentLoader) {
return;
@ -56374,6 +56405,52 @@
segmentLoader.resetEverything();
segmentLoader.load();
};
/**
* Check if the pending audio timeline change is behind the
* pending main timeline change.
*
* @param {SegmentLoader} segmentLoader
* @return {boolean}
*/
const isAudioTimelineBehind = segmentLoader => {
const pendingAudioTimelineChange = segmentLoader.timelineChangeController_.pendingTimelineChange({
type: 'audio'
});
const pendingMainTimelineChange = segmentLoader.timelineChangeController_.pendingTimelineChange({
type: 'main'
});
const hasPendingTimelineChanges = pendingAudioTimelineChange && pendingMainTimelineChange;
return hasPendingTimelineChanges && pendingAudioTimelineChange.to < pendingMainTimelineChange.to;
};
/**
* A method to check if the player is waiting for a timeline change, and fixes
* certain scenarios where the timelines need to be updated.
*
* @param {SegmentLoader} segmentLoader
*/
const checkAndFixTimelines = segmentLoader => {
const segmentInfo = segmentLoader.pendingSegment_;
if (!segmentInfo) {
return;
}
const waitingForTimelineChange = shouldWaitForTimelineChange({
timelineChangeController: segmentLoader.timelineChangeController_,
currentTimeline: segmentLoader.currentTimeline_,
segmentTimeline: segmentInfo.timeline,
loaderType: segmentLoader.loaderType_,
audioDisabled: segmentLoader.audioDisabled_
});
if (waitingForTimelineChange && shouldFixBadTimelineChanges(segmentLoader.timelineChangeController_)) {
// Audio being behind should only happen on DASH sources.
if (segmentLoader.sourceType_ === 'dash' && isAudioTimelineBehind(segmentLoader)) {
segmentLoader.timelineChangeController_.trigger('audioTimelineBehind');
return;
}
fixBadTimelineChange(segmentLoader);
}
};
const mediaDuration = timingInfos => {
let maxDuration = 0;
['video', 'audio'].forEach(function (type) {
@ -56615,6 +56692,8 @@
this.sourceUpdater_.on('ready', () => {
if (this.hasEnoughInfoToAppend_()) {
this.processCallQueue_();
} else {
checkAndFixTimelines(this);
}
});
this.sourceUpdater_.on('codecschange', metadata => {
@ -56630,6 +56709,8 @@
this.timelineChangeController_.on('pendingtimelinechange', () => {
if (this.hasEnoughInfoToAppend_()) {
this.processCallQueue_();
} else {
checkAndFixTimelines(this);
}
});
} // The main loader only listens on pending timeline changes, but the audio loader,
@ -56643,9 +56724,13 @@
}, metadata));
if (this.hasEnoughInfoToLoad_()) {
this.processLoadQueue_();
} else {
checkAndFixTimelines(this);
}
if (this.hasEnoughInfoToAppend_()) {
this.processCallQueue_();
} else {
checkAndFixTimelines(this);
}
});
}
@ -57718,6 +57803,8 @@ Fetch At Buffer: ${this.fetchAtBuffer_}
if (this.hasEnoughInfoToAppend_()) {
this.processCallQueue_();
} else {
checkAndFixTimelines(this);
}
}
handleTimingInfo_(simpleSegment, mediaType, timeType, time) {
@ -57733,6 +57820,8 @@ Fetch At Buffer: ${this.fetchAtBuffer_}
if (this.hasEnoughInfoToAppend_()) {
this.processCallQueue_();
} else {
checkAndFixTimelines(this);
}
}
handleCaptions_(simpleSegment, captionData) {
@ -57883,9 +57972,6 @@ Fetch At Buffer: ${this.fetchAtBuffer_}
loaderType: this.loaderType_,
audioDisabled: this.audioDisabled_
})) {
if (shouldFixBadTimelineChanges(this.timelineChangeController_)) {
fixBadTimelineChange(this);
}
return false;
}
return true;
@ -57936,9 +58022,6 @@ Fetch At Buffer: ${this.fetchAtBuffer_}
loaderType: this.loaderType_,
audioDisabled: this.audioDisabled_
})) {
if (shouldFixBadTimelineChanges(this.timelineChangeController_)) {
fixBadTimelineChange(this);
}
return false;
}
return true;
@ -57951,6 +58034,7 @@ Fetch At Buffer: ${this.fetchAtBuffer_}
// executed after the calls currently queued.
if (this.callQueue_.length || !this.hasEnoughInfoToAppend_()) {
checkAndFixTimelines(this);
this.callQueue_.push(this.handleData_.bind(this, simpleSegment, result));
return;
}
@ -58308,6 +58392,7 @@ Fetch At Buffer: ${this.fetchAtBuffer_}
}
}
if (!this.hasEnoughInfoToLoad_()) {
checkAndFixTimelines(this);
this.loadQueue_.push(() => {
// regenerate the audioAppendStart, timestampOffset, etc as they
// may have changed since this function was added to the queue.
@ -63953,7 +64038,25 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
this.mainSegmentLoader_.on('ended', () => {
this.logger_('main segment loader ended');
this.onEndOfStream();
});
}); // In DASH, there is the possibility of the video segment and the audio segment
// at a current time to be on different timelines. When this occurs, the player
// forwards playback to a point where these two segment types are back on the same
// timeline. This time will be just after the end of the audio segment that is on
// a previous timeline.
if (this.sourceType_ === 'dash') {
this.timelineChangeController_.on('audioTimelineBehind', () => {
const segmentInfo = this.audioSegmentLoader_.pendingSegment_;
if (!segmentInfo || !segmentInfo.segment || !segmentInfo.segment.syncInfo) {
return;
} // Update the current time to just after the faulty audio segment.
// This moves playback to a spot where both audio and video segments
// are on the same timeline.
const newTime = segmentInfo.segment.syncInfo.end + 0.01;
this.tech_.setCurrentTime(newTime);
});
}
this.mainSegmentLoader_.on('earlyabort', event => {
// never try to early abort with the new ABR algorithm
if (this.bufferBasedABR) {
@ -66093,7 +66196,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
const reloadSourceOnError = function (options) {
initPlugin(this, options);
};
var version$4 = "3.13.2";
var version$4 = "3.13.3";
var version$3 = "7.0.3";
var version$2 = "1.3.0";
var version$1 = "7.1.0";