1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 17:59:55 +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,4 +1,4 @@
/*! @name @videojs/http-streaming @version 3.13.2 @license Apache-2.0 */
/*! @name @videojs/http-streaming @version 3.13.3 @license Apache-2.0 */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('video.js'), require('@xmldom/xmldom')) :
typeof define === 'function' && define.amd ? define(['exports', 'video.js', '@xmldom/xmldom'], factory) :
@ -23349,6 +23349,12 @@
return false;
};
/**
* Fixes certain bad timeline scenarios by resetting the loader.
*
* @param {SegmentLoader} segmentLoader
*/
const fixBadTimelineChange = segmentLoader => {
if (!segmentLoader) {
return;
@ -23358,6 +23364,58 @@
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) {
@ -23617,6 +23675,8 @@
this.sourceUpdater_.on('ready', () => {
if (this.hasEnoughInfoToAppend_()) {
this.processCallQueue_();
} else {
checkAndFixTimelines(this);
}
});
this.sourceUpdater_.on('codecschange', metadata => {
@ -23632,6 +23692,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,
@ -23647,10 +23709,14 @@
if (this.hasEnoughInfoToLoad_()) {
this.processLoadQueue_();
} else {
checkAndFixTimelines(this);
}
if (this.hasEnoughInfoToAppend_()) {
this.processCallQueue_();
} else {
checkAndFixTimelines(this);
}
});
}
@ -24863,6 +24929,8 @@ Fetch At Buffer: ${this.fetchAtBuffer_}
if (this.hasEnoughInfoToAppend_()) {
this.processCallQueue_();
} else {
checkAndFixTimelines(this);
}
}
@ -24881,6 +24949,8 @@ Fetch At Buffer: ${this.fetchAtBuffer_}
if (this.hasEnoughInfoToAppend_()) {
this.processCallQueue_();
} else {
checkAndFixTimelines(this);
}
}
@ -25046,10 +25116,6 @@ Fetch At Buffer: ${this.fetchAtBuffer_}
loaderType: this.loaderType_,
audioDisabled: this.audioDisabled_
})) {
if (shouldFixBadTimelineChanges(this.timelineChangeController_)) {
fixBadTimelineChange(this);
}
return false;
}
@ -25111,10 +25177,6 @@ Fetch At Buffer: ${this.fetchAtBuffer_}
loaderType: this.loaderType_,
audioDisabled: this.audioDisabled_
})) {
if (shouldFixBadTimelineChanges(this.timelineChangeController_)) {
fixBadTimelineChange(this);
}
return false;
}
@ -25131,6 +25193,7 @@ Fetch At Buffer: ${this.fetchAtBuffer_}
if (this.callQueue_.length || !this.hasEnoughInfoToAppend_()) {
checkAndFixTimelines(this);
this.callQueue_.push(this.handleData_.bind(this, simpleSegment, result));
return;
}
@ -25527,6 +25590,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.
@ -31845,7 +31909,28 @@ ${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) {
@ -34284,7 +34369,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
initPlugin(this, options);
};
var version$4 = "3.13.2";
var version$4 = "3.13.3";
var version$3 = "7.0.3";