1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 10:19:24 +02:00
This commit is contained in:
Daniel Neto 2024-02-08 10:08:03 -03:00
parent c940cd61ac
commit 59a20745e7
2101 changed files with 1312074 additions and 30292 deletions

234
node_modules/video.js/core.js generated vendored
View file

@ -1,6 +1,6 @@
/**
* @license
* Video.js 8.6.1 <http://videojs.com/>
* Video.js 8.10.0 <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>
@ -28,7 +28,7 @@ var safeParseTuple__default = /*#__PURE__*/_interopDefaultLegacy(safeParseTuple)
var XHR__default = /*#__PURE__*/_interopDefaultLegacy(XHR);
var vtt__default = /*#__PURE__*/_interopDefaultLegacy(vtt);
var version = "8.6.1";
var version = "8.10.0";
/**
* An Object that contains lifecycle hooks as keys which point to an array
@ -786,7 +786,7 @@ let IS_IPHONE = false;
*/
const TOUCH_ENABLED = Boolean(isReal() && ('ontouchstart' in window__default["default"] || window__default["default"].navigator.maxTouchPoints || window__default["default"].DocumentTouch && window__default["default"].document instanceof window__default["default"].DocumentTouch));
const UAD = window__default["default"].navigator && window__default["default"].navigator.userAgentData;
if (UAD) {
if (UAD && UAD.platform && UAD.brands) {
// If userAgentData is present, use it instead of userAgent to avoid warnings
// Currently only implemented on Chromium
// userAgentData does not expose Android version, so ANDROID_VERSION remains `null`
@ -3582,8 +3582,8 @@ class Component {
* @param {string|string[]} type
* An event name or an array of event names.
*
* @param {Function} fn
* The function to remove.
* @param {Function} [fn]
* The function to remove. If not specified, all listeners managed by Video.js will be removed.
*/
off(type, fn) {}
@ -5159,7 +5159,7 @@ class Component {
* @param {string} name
* The Name of the component to get.
*
* @return {Component}
* @return {typeof Component}
* The `Component` that got registered under the given name.
*/
static getComponent(name) {
@ -11067,7 +11067,7 @@ class TimeDisplay extends Component {
*/
constructor(player, options) {
super(player, options);
this.on(player, ['timeupdate', 'ended'], e => this.updateContent(e));
this.on(player, ['timeupdate', 'ended', 'seeking'], e => this.update(e));
this.updateTextNode_();
}
@ -11107,6 +11107,19 @@ class TimeDisplay extends Component {
super.dispose();
}
/**
* Updates the displayed time according to the `updateContent` function which is defined in the child class.
*
* @param {Event} [event]
* The `timeupdate`, `ended` or `seeking` (if enableSmoothSeeking is true) event that caused this function to be called.
*/
update(event) {
if (!this.player_.options_.enableSmoothSeeking && event.type === 'seeking') {
return;
}
this.updateContent(event);
}
/**
* Updates the time display text node with a new time
*
@ -12667,6 +12680,9 @@ class SeekBar extends Slider {
// Set new time (tell player to seek to new time)
this.userSeek_(newTime);
if (this.player_.options_.enableSmoothSeeking) {
this.update();
}
}
enable() {
super.enable();
@ -14265,6 +14281,7 @@ class SkipForward extends Button {
this.controlText(this.localize('Skip forward {1} seconds', [this.skipTime]));
}
}
SkipForward.prototype.controlText_ = 'Skip Forward';
Component.registerComponent('SkipForward', SkipForward);
/**
@ -16679,7 +16696,10 @@ class ErrorDisplay extends ModalDialog {
*/
constructor(player, options) {
super(player, options);
this.on(player, 'error', e => this.open(e));
this.on(player, 'error', e => {
this.close();
this.open(e);
});
}
/**
@ -16940,6 +16960,12 @@ class TextTrackSettings extends ModalDialog {
* @param {string} key
* Configuration key to use during creation.
*
* @param {string} [legendId]
* Id of associated <legend>.
*
* @param {string} [type=label]
* Type of labelling element, `label` or `legend`
*
* @return {string}
* An HTML string.
*
@ -16949,7 +16975,8 @@ class TextTrackSettings extends ModalDialog {
const config = selectConfigs[key];
const id = config.id.replace('%s', this.id_);
const selectLabelledbyIds = [legendId, id].join(' ').trim();
return [`<${type} id="${id}" class="${type === 'label' ? 'vjs-label' : ''}">`, this.localize(config.label), `</${type}>`, `<select aria-labelledby="${selectLabelledbyIds}">`].concat(config.options.map(o => {
const guid = `vjs_select_${newGUID()}`;
return [`<${type} id="${id}"${type === 'label' ? ` for="${guid}" class="vjs-label"` : ''}>`, this.localize(config.label), `</${type}>`, `<select aria-labelledby="${selectLabelledbyIds}" id="${guid}">`].concat(config.options.map(o => {
const optionId = id + '-' + o[1].replace(/\W+/g, '');
return [`<option id="${optionId}" value="${o[0]}" `, `aria-labelledby="${selectLabelledbyIds} ${optionId}">`, this.localize(o[1]), '</option>'].join('');
})).concat('</select>').join('');
@ -21125,6 +21152,26 @@ class Player extends Component {
return this.tech_;
}
/**
* An object that contains Video.js version.
*
* @typedef {Object} PlayerVersion
*
* @property {string} 'video.js' - Video.js version
*/
/**
* Returns an object with Video.js version.
*
* @return {PlayerVersion}
* An object with Video.js version.
*/
version() {
return {
'video.js': version
};
}
/**
* Set up click and touch listeners for the playback element
*
@ -22348,6 +22395,90 @@ class Player extends Component {
return buffered;
}
/**
* Get the TimeRanges of the media that are currently available
* for seeking to.
*
* @see [Seekable Spec]{@link https://html.spec.whatwg.org/multipage/media.html#dom-media-seekable}
*
* @return { import('./utils/time').TimeRange }
* A mock {@link TimeRanges} object (following HTML spec)
*/
seekable() {
let seekable = this.techGet_('seekable');
if (!seekable || !seekable.length) {
seekable = createTimeRanges(0, 0);
}
return seekable;
}
/**
* Returns whether the player is in the "seeking" state.
*
* @return {boolean} True if the player is in the seeking state, false if not.
*/
seeking() {
return this.techGet_('seeking');
}
/**
* Returns whether the player is in the "ended" state.
*
* @return {boolean} True if the player is in the ended state, false if not.
*/
ended() {
return this.techGet_('ended');
}
/**
* Returns the current state of network activity for the element, from
* the codes in the list below.
* - NETWORK_EMPTY (numeric value 0)
* The element has not yet been initialised. All attributes are in
* their initial states.
* - NETWORK_IDLE (numeric value 1)
* The element's resource selection algorithm is active and has
* selected a resource, but it is not actually using the network at
* this time.
* - NETWORK_LOADING (numeric value 2)
* The user agent is actively trying to download data.
* - NETWORK_NO_SOURCE (numeric value 3)
* The element's resource selection algorithm is active, but it has
* not yet found a resource to use.
*
* @see https://html.spec.whatwg.org/multipage/embedded-content.html#network-states
* @return {number} the current network activity state
*/
networkState() {
return this.techGet_('networkState');
}
/**
* Returns a value that expresses the current state of the element
* with respect to rendering the current playback position, from the
* codes in the list below.
* - HAVE_NOTHING (numeric value 0)
* No information regarding the media resource is available.
* - HAVE_METADATA (numeric value 1)
* Enough of the resource has been obtained that the duration of the
* resource is available.
* - HAVE_CURRENT_DATA (numeric value 2)
* Data for the immediate current playback position is available.
* - HAVE_FUTURE_DATA (numeric value 3)
* Data for the immediate current playback position is available, as
* well as enough data for the user agent to advance the current
* playback position in the direction of playback.
* - HAVE_ENOUGH_DATA (numeric value 4)
* The user agent estimates that enough data is available for
* playback to proceed uninterrupted.
*
* @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-readystate
* @return {number} the current playback rendering state
*/
readyState() {
return this.techGet_('readyState');
}
/**
* Get the percent (as a decimal) of the video that's been downloaded.
* This method is not a part of the native HTML video API.
@ -23263,11 +23394,20 @@ class Player extends Component {
if (this.tech_) {
this.tech_.clearTracks('text');
}
this.removeClass('vjs-playing');
this.addClass('vjs-paused');
this.resetCache_();
this.poster('');
this.loadTech_(this.options_.techOrder[0], null);
this.techCall_('reset');
this.resetControlBarUI_();
this.error(null);
if (this.titleBar) {
this.titleBar.update({
title: undefined,
description: undefined
});
}
if (isEvented(this)) {
this.trigger('playerreset');
}
@ -24854,80 +24994,10 @@ Player.prototype.options_ = {
breakpoints: {},
responsive: false,
audioOnlyMode: false,
audioPosterMode: false
audioPosterMode: false,
// Default smooth seeking to false
enableSmoothSeeking: false
};
[
/**
* Returns whether or not the player is in the "ended" state.
*
* @return {Boolean} True if the player is in the ended state, false if not.
* @method Player#ended
*/
'ended',
/**
* Returns whether or not the player is in the "seeking" state.
*
* @return {Boolean} True if the player is in the seeking state, false if not.
* @method Player#seeking
*/
'seeking',
/**
* Returns the TimeRanges of the media that are currently available
* for seeking to.
*
* @return {TimeRanges} the seekable intervals of the media timeline
* @method Player#seekable
*/
'seekable',
/**
* Returns the current state of network activity for the element, from
* the codes in the list below.
* - NETWORK_EMPTY (numeric value 0)
* The element has not yet been initialised. All attributes are in
* their initial states.
* - NETWORK_IDLE (numeric value 1)
* The element's resource selection algorithm is active and has
* selected a resource, but it is not actually using the network at
* this time.
* - NETWORK_LOADING (numeric value 2)
* The user agent is actively trying to download data.
* - NETWORK_NO_SOURCE (numeric value 3)
* The element's resource selection algorithm is active, but it has
* not yet found a resource to use.
*
* @see https://html.spec.whatwg.org/multipage/embedded-content.html#network-states
* @return {number} the current network activity state
* @method Player#networkState
*/
'networkState',
/**
* Returns a value that expresses the current state of the element
* with respect to rendering the current playback position, from the
* codes in the list below.
* - HAVE_NOTHING (numeric value 0)
* No information regarding the media resource is available.
* - HAVE_METADATA (numeric value 1)
* Enough of the resource has been obtained that the duration of the
* resource is available.
* - HAVE_CURRENT_DATA (numeric value 2)
* Data for the immediate current playback position is available.
* - HAVE_FUTURE_DATA (numeric value 3)
* Data for the immediate current playback position is available, as
* well as enough data for the user agent to advance the current
* playback position in the direction of playback.
* - HAVE_ENOUGH_DATA (numeric value 4)
* The user agent estimates that enough data is available for
* playback to proceed uninterrupted.
*
* @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-readystate
* @return {number} the current playback rendering state
* @method Player#readyState
*/
'readyState'].forEach(function (fn) {
Player.prototype[fn] = function () {
return this.techGet_(fn);
};
});
TECH_EVENTS_RETRIGGER.forEach(function (event) {
Player.prototype[`handleTech${toTitleCase(event)}_`] = function () {
return this.trigger(event);