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

Add Calendar

This commit is contained in:
Daniel Neto 2024-05-03 12:16:27 -03:00
parent be8ebd1227
commit 47a4532d0b
1165 changed files with 156626 additions and 11163 deletions

View file

@ -1,3 +1,22 @@
<a name="3.12.2"></a>
## [3.12.2](https://github.com/videojs/http-streaming/compare/v3.12.1...v3.12.2) (2024-04-22)
### Bug Fixes
* use paren media sequence sync for audio and vtt, since they are opt-in features and can be enabled after main init ([#1505](https://github.com/videojs/http-streaming/issues/1505)) ([bdfe0e0](https://github.com/videojs/http-streaming/commit/bdfe0e0))
<a name="3.12.1"></a>
## [3.12.1](https://github.com/videojs/http-streaming/compare/v3.12.0...v3.12.1) (2024-04-16)
### Bug Fixes
* enableFunction not passing playlist to fastQualityChange ([#1502](https://github.com/videojs/http-streaming/issues/1502)) ([e50ecb1](https://github.com/videojs/http-streaming/commit/e50ecb1))
* llHLS does not need forcedTimestampOffset ([#1501](https://github.com/videojs/http-streaming/issues/1501)) ([f5d1209](https://github.com/videojs/http-streaming/commit/f5d1209))
### Documentation
* removing duplicated step ([#1476](https://github.com/videojs/http-streaming/issues/1476)) ([e4acc57](https://github.com/videojs/http-streaming/commit/e4acc57))
<a name="3.12.0"></a>
# [3.12.0](https://github.com/videojs/http-streaming/compare/v3.11.3...v3.12.0) (2024-03-12)

View file

@ -1,4 +1,4 @@
/*! @name @videojs/http-streaming @version 3.12.0 @license Apache-2.0 */
/*! @name @videojs/http-streaming @version 3.12.2 @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) :
@ -23785,9 +23785,12 @@ bufferedEnd: ${lastBufferedEnd(this.buffered_())}
this.partIndex = null;
this.syncPoint_ = null;
this.isPendingTimestampOffset_ = false; // this is mainly to sync timing-info when switching between renditions with and without timestamp-rollover,
// so we don't want it for DASH
// so we don't want it for DASH or fragmented mp4 segments.
if (this.sourceType_ === 'hls') {
const isFmp4 = this.currentMediaInfo_ && this.currentMediaInfo_.isFmp4;
const isHlsTs = this.sourceType_ === 'hls' && !isFmp4;
if (isHlsTs) {
this.shouldForceTimestampOffsetAfterResync_ = true;
}
@ -27415,7 +27418,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
constructor() {
/**
* @type {Map<number, SyncInfoData>}
* @private
* @protected
*/
this.storage_ = new Map();
this.diagnostics_ = '';
@ -27495,6 +27498,10 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
return null;
}
getSyncInfoForMediaSequence(mediaSequence) {
return this.storage_.get(mediaSequence);
}
updateStorage_(segments, startingMediaSequence, startingTime) {
const newStorage = new Map();
let newDiagnostics = '\n';
@ -27560,6 +27567,27 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
return mediaSequence !== undefined && mediaSequence !== null && Array.isArray(segments) && segments.length;
}
}
class DependantMediaSequenceSync extends MediaSequenceSync {
constructor(parent) {
super();
this.parent_ = parent;
}
calculateBaseTime_(mediaSequence, fallback) {
if (!this.storage_.size) {
const info = this.parent_.getSyncInfoForMediaSequence(mediaSequence);
if (info) {
return info.segmentSyncInfo.start;
}
return 0;
}
return super.calculateBaseTime_(mediaSequence, fallback);
}
}
/**
@ -27779,10 +27807,13 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
// Moreover if we disable this map for MPEG-DASH - quality switch will be broken.
// MPEG-DASH should have its own separate sync strategy
const main = new MediaSequenceSync();
const audio = new DependantMediaSequenceSync(main);
const vtt = new DependantMediaSequenceSync(main);
this.mediaSequenceStorage_ = {
main: new MediaSequenceSync(),
audio: new MediaSequenceSync(),
vtt: new MediaSequenceSync()
main,
audio,
vtt
};
this.logger_ = logger('SyncController');
}
@ -32758,7 +32789,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
if (enable !== currentlyEnabled && !incompatible) {
// Ensure the outside world knows about our changes
changePlaylistFn();
changePlaylistFn(playlist);
if (enable) {
loader.trigger('renditionenabled');
@ -33563,7 +33594,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
initPlugin(this, options);
};
var version$4 = "3.12.0";
var version$4 = "3.12.2";
var version$3 = "7.0.3";

View file

@ -1,4 +1,4 @@
/*! @name @videojs/http-streaming @version 3.12.0 @license Apache-2.0 */
/*! @name @videojs/http-streaming @version 3.12.2 @license Apache-2.0 */
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
@ -17718,9 +17718,12 @@ bufferedEnd: ${lastBufferedEnd(this.buffered_())}
this.partIndex = null;
this.syncPoint_ = null;
this.isPendingTimestampOffset_ = false; // this is mainly to sync timing-info when switching between renditions with and without timestamp-rollover,
// so we don't want it for DASH
// so we don't want it for DASH or fragmented mp4 segments.
if (this.sourceType_ === 'hls') {
const isFmp4 = this.currentMediaInfo_ && this.currentMediaInfo_.isFmp4;
const isHlsTs = this.sourceType_ === 'hls' && !isFmp4;
if (isHlsTs) {
this.shouldForceTimestampOffsetAfterResync_ = true;
}
@ -21348,7 +21351,7 @@ class MediaSequenceSync {
constructor() {
/**
* @type {Map<number, SyncInfoData>}
* @private
* @protected
*/
this.storage_ = new Map();
this.diagnostics_ = '';
@ -21428,6 +21431,10 @@ class MediaSequenceSync {
return null;
}
getSyncInfoForMediaSequence(mediaSequence) {
return this.storage_.get(mediaSequence);
}
updateStorage_(segments, startingMediaSequence, startingTime) {
const newStorage = new Map();
let newDiagnostics = '\n';
@ -21493,6 +21500,27 @@ class MediaSequenceSync {
return mediaSequence !== undefined && mediaSequence !== null && Array.isArray(segments) && segments.length;
}
}
class DependantMediaSequenceSync extends MediaSequenceSync {
constructor(parent) {
super();
this.parent_ = parent;
}
calculateBaseTime_(mediaSequence, fallback) {
if (!this.storage_.size) {
const info = this.parent_.getSyncInfoForMediaSequence(mediaSequence);
if (info) {
return info.segmentSyncInfo.start;
}
return 0;
}
return super.calculateBaseTime_(mediaSequence, fallback);
}
}
/**
@ -21712,10 +21740,13 @@ class SyncController extends videojs__default["default"].EventTarget {
// Moreover if we disable this map for MPEG-DASH - quality switch will be broken.
// MPEG-DASH should have its own separate sync strategy
const main = new MediaSequenceSync();
const audio = new DependantMediaSequenceSync(main);
const vtt = new DependantMediaSequenceSync(main);
this.mediaSequenceStorage_ = {
main: new MediaSequenceSync(),
audio: new MediaSequenceSync(),
vtt: new MediaSequenceSync()
main,
audio,
vtt
};
this.logger_ = logger('SyncController');
}
@ -26691,7 +26722,7 @@ const enableFunction = (loader, playlistID, changePlaylistFn) => enable => {
if (enable !== currentlyEnabled && !incompatible) {
// Ensure the outside world knows about our changes
changePlaylistFn();
changePlaylistFn(playlist);
if (enable) {
loader.trigger('renditionenabled');
@ -27496,7 +27527,7 @@ const reloadSourceOnError = function (options) {
initPlugin(this, options);
};
var version$4 = "3.12.0";
var version$4 = "3.12.2";
var version$3 = "7.0.3";

View file

@ -1,4 +1,4 @@
/*! @name @videojs/http-streaming @version 3.12.0 @license Apache-2.0 */
/*! @name @videojs/http-streaming @version 3.12.2 @license Apache-2.0 */
import document from 'global/document';
import window$1 from 'global/window';
import _extends from '@babel/runtime/helpers/extends';
@ -17706,9 +17706,12 @@ bufferedEnd: ${lastBufferedEnd(this.buffered_())}
this.partIndex = null;
this.syncPoint_ = null;
this.isPendingTimestampOffset_ = false; // this is mainly to sync timing-info when switching between renditions with and without timestamp-rollover,
// so we don't want it for DASH
// so we don't want it for DASH or fragmented mp4 segments.
if (this.sourceType_ === 'hls') {
const isFmp4 = this.currentMediaInfo_ && this.currentMediaInfo_.isFmp4;
const isHlsTs = this.sourceType_ === 'hls' && !isFmp4;
if (isHlsTs) {
this.shouldForceTimestampOffsetAfterResync_ = true;
}
@ -21336,7 +21339,7 @@ class MediaSequenceSync {
constructor() {
/**
* @type {Map<number, SyncInfoData>}
* @private
* @protected
*/
this.storage_ = new Map();
this.diagnostics_ = '';
@ -21416,6 +21419,10 @@ class MediaSequenceSync {
return null;
}
getSyncInfoForMediaSequence(mediaSequence) {
return this.storage_.get(mediaSequence);
}
updateStorage_(segments, startingMediaSequence, startingTime) {
const newStorage = new Map();
let newDiagnostics = '\n';
@ -21481,6 +21488,27 @@ class MediaSequenceSync {
return mediaSequence !== undefined && mediaSequence !== null && Array.isArray(segments) && segments.length;
}
}
class DependantMediaSequenceSync extends MediaSequenceSync {
constructor(parent) {
super();
this.parent_ = parent;
}
calculateBaseTime_(mediaSequence, fallback) {
if (!this.storage_.size) {
const info = this.parent_.getSyncInfoForMediaSequence(mediaSequence);
if (info) {
return info.segmentSyncInfo.start;
}
return 0;
}
return super.calculateBaseTime_(mediaSequence, fallback);
}
}
/**
@ -21700,10 +21728,13 @@ class SyncController extends videojs.EventTarget {
// Moreover if we disable this map for MPEG-DASH - quality switch will be broken.
// MPEG-DASH should have its own separate sync strategy
const main = new MediaSequenceSync();
const audio = new DependantMediaSequenceSync(main);
const vtt = new DependantMediaSequenceSync(main);
this.mediaSequenceStorage_ = {
main: new MediaSequenceSync(),
audio: new MediaSequenceSync(),
vtt: new MediaSequenceSync()
main,
audio,
vtt
};
this.logger_ = logger('SyncController');
}
@ -26679,7 +26710,7 @@ const enableFunction = (loader, playlistID, changePlaylistFn) => enable => {
if (enable !== currentlyEnabled && !incompatible) {
// Ensure the outside world knows about our changes
changePlaylistFn();
changePlaylistFn(playlist);
if (enable) {
loader.trigger('renditionenabled');
@ -27484,7 +27515,7 @@ const reloadSourceOnError = function (options) {
initPlugin(this, options);
};
var version$4 = "3.12.0";
var version$4 = "3.12.2";
var version$3 = "7.0.3";

View file

@ -1,4 +1,4 @@
/*! @name @videojs/http-streaming @version 3.12.0 @license Apache-2.0 */
/*! @name @videojs/http-streaming @version 3.12.2 @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) :
@ -23735,9 +23735,12 @@ bufferedEnd: ${lastBufferedEnd(this.buffered_())}
this.partIndex = null;
this.syncPoint_ = null;
this.isPendingTimestampOffset_ = false; // this is mainly to sync timing-info when switching between renditions with and without timestamp-rollover,
// so we don't want it for DASH
// so we don't want it for DASH or fragmented mp4 segments.
if (this.sourceType_ === 'hls') {
const isFmp4 = this.currentMediaInfo_ && this.currentMediaInfo_.isFmp4;
const isHlsTs = this.sourceType_ === 'hls' && !isFmp4;
if (isHlsTs) {
this.shouldForceTimestampOffsetAfterResync_ = true;
}
@ -27365,7 +27368,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
constructor() {
/**
* @type {Map<number, SyncInfoData>}
* @private
* @protected
*/
this.storage_ = new Map();
this.diagnostics_ = '';
@ -27445,6 +27448,10 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
return null;
}
getSyncInfoForMediaSequence(mediaSequence) {
return this.storage_.get(mediaSequence);
}
updateStorage_(segments, startingMediaSequence, startingTime) {
const newStorage = new Map();
let newDiagnostics = '\n';
@ -27510,6 +27517,27 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
return mediaSequence !== undefined && mediaSequence !== null && Array.isArray(segments) && segments.length;
}
}
class DependantMediaSequenceSync extends MediaSequenceSync {
constructor(parent) {
super();
this.parent_ = parent;
}
calculateBaseTime_(mediaSequence, fallback) {
if (!this.storage_.size) {
const info = this.parent_.getSyncInfoForMediaSequence(mediaSequence);
if (info) {
return info.segmentSyncInfo.start;
}
return 0;
}
return super.calculateBaseTime_(mediaSequence, fallback);
}
}
/**
@ -27729,10 +27757,13 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
// Moreover if we disable this map for MPEG-DASH - quality switch will be broken.
// MPEG-DASH should have its own separate sync strategy
const main = new MediaSequenceSync();
const audio = new DependantMediaSequenceSync(main);
const vtt = new DependantMediaSequenceSync(main);
this.mediaSequenceStorage_ = {
main: new MediaSequenceSync(),
audio: new MediaSequenceSync(),
vtt: new MediaSequenceSync()
main,
audio,
vtt
};
this.logger_ = logger('SyncController');
}
@ -32708,7 +32739,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
if (enable !== currentlyEnabled && !incompatible) {
// Ensure the outside world knows about our changes
changePlaylistFn();
changePlaylistFn(playlist);
if (enable) {
loader.trigger('renditionenabled');
@ -33513,7 +33544,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
initPlugin(this, options);
};
var version$4 = "3.12.0";
var version$4 = "3.12.2";
var version$3 = "7.0.3";

File diff suppressed because one or more lines are too long

View file

@ -91,6 +91,5 @@ Corresponding AudioTrackList when media-group-1 is used (before any tracks have
1. `HLS` sends the `label` for the new `AudioTrack` to `PlaylistController`s `useAudio` function
1. `PlaylistController` turns off the current audio `PlaylistLoader` if it is on
1. `PlaylistController` maps the `label` to the `PlaylistLoader` containing the audio
1. `PlaylistController` maps the `label` to the `PlaylistLoader` containing the audio
1. `PlaylistController` turns on that `PlaylistLoader` and the Corresponding `SegmentLoader` (main or audio only)
1. `MediaSource`/`mux.js` determine how to mux

View file

@ -1,6 +1,6 @@
{
"name": "@videojs/http-streaming",
"version": "3.12.0",
"version": "3.12.2",
"description": "Play back HLS and DASH with Video.js, even where it's not natively supported",
"main": "dist/videojs-http-streaming.cjs.js",
"module": "dist/videojs-http-streaming.es.js",

View file

@ -21,7 +21,7 @@
rep.playlist.disabled = rep.id !== id;
});
window.pc.fastQualityChange_();
window.pc.fastQualityChange_(selectedOption);
});
var isManifestObjectType = function(url) {
return (/application\/vnd\.videojs\.vhs\+json/).test(url);

View file

@ -30,7 +30,7 @@ const enableFunction = (loader, playlistID, changePlaylistFn) => (enable) => {
if (enable !== currentlyEnabled && !incompatible) {
// Ensure the outside world knows about our changes
changePlaylistFn();
changePlaylistFn(playlist);
if (enable) {
loader.trigger('renditionenabled');
} else {

View file

@ -1238,8 +1238,11 @@ bufferedEnd: ${lastBufferedEnd(this.buffered_())}
this.syncPoint_ = null;
this.isPendingTimestampOffset_ = false;
// this is mainly to sync timing-info when switching between renditions with and without timestamp-rollover,
// so we don't want it for DASH
if (this.sourceType_ === 'hls') {
// so we don't want it for DASH or fragmented mp4 segments.
const isFmp4 = this.currentMediaInfo_ && this.currentMediaInfo_.isFmp4;
const isHlsTs = this.sourceType_ === 'hls' && !isFmp4;
if (isHlsTs) {
this.shouldForceTimestampOffsetAfterResync_ = true;
}
this.callQueue_ = [];

View file

@ -5,7 +5,7 @@
import {sumDurations, getPartsAndSegments} from './playlist';
import videojs from 'video.js';
import logger from './util/logger';
import MediaSequenceSync from './util/media-sequence-sync';
import {MediaSequenceSync, DependantMediaSequenceSync} from './util/media-sequence-sync';
// The maximum gap allowed between two media sequence tags when trying to
// synchronize expired playlist segments.
@ -233,11 +233,11 @@ export default class SyncController extends videojs.EventTarget {
// For some reason this map helps with syncing between quality switch for MPEG-DASH as well.
// Moreover if we disable this map for MPEG-DASH - quality switch will be broken.
// MPEG-DASH should have its own separate sync strategy
this.mediaSequenceStorage_ = {
main: new MediaSequenceSync(),
audio: new MediaSequenceSync(),
vtt: new MediaSequenceSync()
};
const main = new MediaSequenceSync();
const audio = new DependantMediaSequenceSync(main);
const vtt = new DependantMediaSequenceSync(main);
this.mediaSequenceStorage_ = {main, audio, vtt};
this.logger_ = logger('SyncController');
}

View file

@ -79,11 +79,11 @@ class SyncInfoData {
}
}
export default class MediaSequenceSync {
export class MediaSequenceSync {
constructor() {
/**
* @type {Map<number, SyncInfoData>}
* @private
* @protected
*/
this.storage_ = new Map();
this.diagnostics_ = '';
@ -160,6 +160,10 @@ export default class MediaSequenceSync {
return null;
}
getSyncInfoForMediaSequence(mediaSequence) {
return this.storage_.get(mediaSequence);
}
updateStorage_(segments, startingMediaSequence, startingTime) {
const newStorage = new Map();
let newDiagnostics = '\n';
@ -244,3 +248,25 @@ export default class MediaSequenceSync {
return mediaSequence !== undefined && mediaSequence !== null && Array.isArray(segments) && segments.length;
}
}
export class DependantMediaSequenceSync extends MediaSequenceSync {
constructor(parent) {
super();
this.parent_ = parent;
}
calculateBaseTime_(mediaSequence, fallback) {
if (!this.storage_.size) {
const info = this.parent_.getSyncInfoForMediaSequence(mediaSequence);
if (info) {
return info.segmentSyncInfo.start;
}
return 0;
}
return super.calculateBaseTime_(mediaSequence, fallback);
}
}