mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Update dependabot
This commit is contained in:
parent
56a24d4781
commit
024b79d882
142 changed files with 15927 additions and 1513 deletions
107
node_modules/@videojs/http-streaming/dist/videojs-http-streaming.cjs.js
generated
vendored
107
node_modules/@videojs/http-streaming/dist/videojs-http-streaming.cjs.js
generated
vendored
|
@ -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 */
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
@ -17282,6 +17282,12 @@ const shouldFixBadTimelineChanges = timelineChangeController => {
|
|||
|
||||
return false;
|
||||
};
|
||||
/**
|
||||
* Fixes certain bad timeline scenarios by resetting the loader.
|
||||
*
|
||||
* @param {SegmentLoader} segmentLoader
|
||||
*/
|
||||
|
||||
const fixBadTimelineChange = segmentLoader => {
|
||||
if (!segmentLoader) {
|
||||
return;
|
||||
|
@ -17291,6 +17297,58 @@ const fixBadTimelineChange = segmentLoader => {
|
|||
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) {
|
||||
|
@ -17550,6 +17608,8 @@ class SegmentLoader extends videojs__default["default"].EventTarget {
|
|||
this.sourceUpdater_.on('ready', () => {
|
||||
if (this.hasEnoughInfoToAppend_()) {
|
||||
this.processCallQueue_();
|
||||
} else {
|
||||
checkAndFixTimelines(this);
|
||||
}
|
||||
});
|
||||
this.sourceUpdater_.on('codecschange', metadata => {
|
||||
|
@ -17565,6 +17625,8 @@ class SegmentLoader extends videojs__default["default"].EventTarget {
|
|||
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,
|
||||
|
@ -17580,10 +17642,14 @@ class SegmentLoader extends videojs__default["default"].EventTarget {
|
|||
|
||||
if (this.hasEnoughInfoToLoad_()) {
|
||||
this.processLoadQueue_();
|
||||
} else {
|
||||
checkAndFixTimelines(this);
|
||||
}
|
||||
|
||||
if (this.hasEnoughInfoToAppend_()) {
|
||||
this.processCallQueue_();
|
||||
} else {
|
||||
checkAndFixTimelines(this);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -18796,6 +18862,8 @@ Fetch At Buffer: ${this.fetchAtBuffer_}
|
|||
|
||||
if (this.hasEnoughInfoToAppend_()) {
|
||||
this.processCallQueue_();
|
||||
} else {
|
||||
checkAndFixTimelines(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18814,6 +18882,8 @@ Fetch At Buffer: ${this.fetchAtBuffer_}
|
|||
|
||||
if (this.hasEnoughInfoToAppend_()) {
|
||||
this.processCallQueue_();
|
||||
} else {
|
||||
checkAndFixTimelines(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18979,10 +19049,6 @@ Fetch At Buffer: ${this.fetchAtBuffer_}
|
|||
loaderType: this.loaderType_,
|
||||
audioDisabled: this.audioDisabled_
|
||||
})) {
|
||||
if (shouldFixBadTimelineChanges(this.timelineChangeController_)) {
|
||||
fixBadTimelineChange(this);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -19044,10 +19110,6 @@ Fetch At Buffer: ${this.fetchAtBuffer_}
|
|||
loaderType: this.loaderType_,
|
||||
audioDisabled: this.audioDisabled_
|
||||
})) {
|
||||
if (shouldFixBadTimelineChanges(this.timelineChangeController_)) {
|
||||
fixBadTimelineChange(this);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -19064,6 +19126,7 @@ Fetch At Buffer: ${this.fetchAtBuffer_}
|
|||
|
||||
|
||||
if (this.callQueue_.length || !this.hasEnoughInfoToAppend_()) {
|
||||
checkAndFixTimelines(this);
|
||||
this.callQueue_.push(this.handleData_.bind(this, simpleSegment, result));
|
||||
return;
|
||||
}
|
||||
|
@ -19460,6 +19523,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.
|
||||
|
@ -25778,7 +25842,28 @@ class PlaylistController extends videojs__default["default"].EventTarget {
|
|||
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) {
|
||||
|
@ -28217,7 +28302,7 @@ 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";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue