1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 17:59:55 +02:00
This commit is contained in:
Daniel Neto 2023-11-10 09:36:43 -03:00
parent 0e3fa24329
commit 4e95a0e94c
369 changed files with 16946 additions and 89882 deletions

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

@ -1,6 +1,6 @@
/**
* @license
* Video.js 8.6.0 <http://videojs.com/>
* Video.js 8.6.1 <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.0";
var version = "8.6.1";
/**
* An Object that contains lifecycle hooks as keys which point to an array
@ -2008,7 +2008,7 @@ function _cleanUpEvents(elem, type) {
* @param {Element|Object} elem
* Element or object to bind listeners to
*
* @param {string} type
* @param {string[]} types
* Type of event to bind to.
*
* @param {Function} callback
@ -2731,7 +2731,7 @@ class EventTarget {
/**
* All event listeners should follow the following format.
*
* @callback EventTarget~EventListener
* @callback EventListener
* @this {EventTarget}
*
* @param {Event} event
@ -2748,7 +2748,7 @@ class EventTarget {
* will have extra functionality. See that function for more information.
*
* @property EventTarget.prototype.allowedEvents_
* @private
* @protected
*/
EventTarget.prototype.allowedEvents_ = {};
@ -3984,7 +3984,6 @@ class Component {
/**
* Add a child `Component` inside the current `Component`.
*
*
* @param {string|Component} child
* The name or instance of a child to add.
*
@ -3995,6 +3994,7 @@ class Component {
* @param {number} [index=this.children_.length]
* The index to attempt to add a child into.
*
*
* @return {Component}
* The `Component` that gets added as a child. When using a string the
* `Component` will get created by this process.
@ -4449,9 +4449,8 @@ class Component {
* @param {boolean} [skipListeners]
* Skip the componentresize event trigger
*
* @return {number|string}
* The width when getting, zero if there is no width. Can be a string
* postpixed with '%' or 'px'.
* @return {number|undefined}
* The width when getting, zero if there is no width
*/
width(num, skipListeners) {
return this.dimension('width', num, skipListeners);
@ -4467,9 +4466,8 @@ class Component {
* @param {boolean} [skipListeners]
* Skip the componentresize event trigger
*
* @return {number|string}
* The width when getting, zero if there is no width. Can be a string
* postpixed with '%' or 'px'.
* @return {number|undefined}
* The height when getting, zero if there is no height
*/
height(num, skipListeners) {
return this.dimension('height', num, skipListeners);
@ -4515,7 +4513,7 @@ class Component {
* @param {boolean} [skipListeners]
* Skip componentresize event trigger
*
* @return {number}
* @return {number|undefined}
* The dimension when getting or 0 if unset
*/
dimension(widthOrHeight, num, skipListeners) {
@ -4690,7 +4688,7 @@ class Component {
* delegates to `handleKeyDown`. This means anyone calling `handleKeyPress`
* will not see their method calls stop working.
*
* @param {Event} event
* @param {KeyboardEvent} event
* The event that caused this function to be called.
*/
handleKeyPress(event) {
@ -4702,7 +4700,7 @@ class Component {
* support toggling the controls through a tap on the video. They get enabled
* because every sub-component would have extra overhead otherwise.
*
* @private
* @protected
* @fires Component#tap
* @listens Component#touchstart
* @listens Component#touchmove
@ -6327,7 +6325,7 @@ class TrackList extends EventTarget {
* Events that can be called with on + eventName. See {@link EventHandler}.
*
* @property {Object} TrackList#allowedEvents_
* @private
* @protected
*/
TrackList.prototype.allowedEvents_ = {
change: 'change',
@ -6377,7 +6375,7 @@ class AudioTrackList extends TrackList {
/**
* Create an instance of this class.
*
* @param {AudioTrack[]} [tracks=[]]
* @param { import('./audio-track').default[] } [tracks=[]]
* A list of `AudioTrack` to instantiate the list with.
*/
constructor(tracks = []) {
@ -7480,7 +7478,9 @@ class TextTrack extends Track {
*/
addCue(originalCue) {
let cue = originalCue;
if (cue.constructor && cue.constructor.name !== 'VTTCue') {
// Testing if the cue is a VTTCue in a way that survives minification
if (!('getCueAsHTML' in cue)) {
cue = new window__default["default"].vttjs.VTTCue(originalCue.startTime, originalCue.endTime, originalCue.text);
for (const prop in originalCue) {
if (!(prop in cue)) {
@ -7523,6 +7523,7 @@ class TextTrack extends Track {
/**
* cuechange - One or more cues in the track have become active or stopped being active.
* @protected
*/
TextTrack.prototype.allowedEvents_ = {
cuechange: 'cuechange'
@ -7781,6 +7782,10 @@ class HTMLTrackElement extends EventTarget {
});
}
}
/**
* @protected
*/
HTMLTrackElement.prototype.allowedEvents_ = {
load: 'load'
};
@ -7874,7 +7879,7 @@ ALL.names = [].concat(REMOTE.names).concat(NORMAL.names);
* * `var SourceObject = {src: 'http://ex.com/video.mp4', type: 'video/mp4'};`
* `var SourceString = 'http://example.com/some-video.mp4';`
*
* @typedef {Object|string} Tech~SourceObject
* @typedef {Object|string} SourceObject
*
* @property {string} src
* The url to the source
@ -8310,7 +8315,7 @@ class Tech extends Component {
* > NOTE: This implementation is incomplete. It does not track the played `TimeRange`.
* It only checks whether the source has played at all or not.
*
* @return {TimeRange}
* @return { import('../utils/time').TimeRange }
* - A single time range if this video has played
* - An empty set of ranges if not.
*/
@ -9074,7 +9079,7 @@ Tech.withSourceHandlers = function (_Tech) {
*
* TODO: Answer question: should 'probably' be prioritized over 'maybe'
*
* @param {Tech~SourceObject} source
* @param {SourceObject} source
* The source object
*
* @param {Object} options
@ -9099,7 +9104,7 @@ Tech.withSourceHandlers = function (_Tech) {
/**
* Check if the tech can support the given source.
*
* @param {Tech~SourceObject} srcObj
* @param {SourceObject} srcObj
* The source object
*
* @param {Object} options
@ -9154,7 +9159,7 @@ Tech.withSourceHandlers = function (_Tech) {
* and source handlers.
* Should never be called unless a source handler was found.
*
* @param {Tech~SourceObject} source
* @param {SourceObject} source
* A source object with src and type keys
*/
_Tech.prototype.setSource = function (source) {
@ -9933,7 +9938,7 @@ class ClickableComponent extends Component {
*
* By default, if the key is Space or Enter, it will trigger a `click` event.
*
* @param {Event} event
* @param {KeyboardEvent} event
* The `keydown` event that caused this function to be called.
*
* @listens keydown
@ -10689,7 +10694,7 @@ class Button extends ClickableComponent {
* This gets called when a `Button` has focus and `keydown` is triggered via a key
* press.
*
* @param {Event} event
* @param {KeyboardEvent} event
* The event that caused this function to get called.
*
* @listens keydown
@ -10743,7 +10748,7 @@ class BigPlayButton extends Button {
* This gets called when a `BigPlayButton` "clicked". See {@link ClickableComponent}
* for more detailed information on what a click can be.
*
* @param {KeyboardEvent} event
* @param {KeyboardEvent|MouseEvent|TouchEvent} event
* The `keydown`, `tap`, or `click` event that caused this function to be
* called.
*
@ -10754,7 +10759,7 @@ class BigPlayButton extends Button {
const playPromise = this.player_.play();
// exit early if clicked via the mouse
if (this.mouseused_ && event.clientX && event.clientY) {
if (this.mouseused_ && 'clientX' in event && 'clientY' in event) {
silencePromise(playPromise);
if (this.player_.tech(true)) {
this.player_.tech(true).focus();
@ -10774,10 +10779,29 @@ class BigPlayButton extends Button {
this.setTimeout(playFocus, 1);
}
}
/**
* Event handler that is called when a `BigPlayButton` receives a
* `keydown` event.
*
* @param {KeyboardEvent} event
* The `keydown` event that caused this function to be called.
*
* @listens keydown
*/
handleKeyDown(event) {
this.mouseused_ = false;
super.handleKeyDown(event);
}
/**
* Handle `mousedown` events on the `BigPlayButton`.
*
* @param {MouseEvent} event
* `mousedown` or `touchstart` event that triggered this function
*
* @listens mousedown
*/
handleMouseDown(event) {
this.mouseused_ = true;
}
@ -10863,7 +10887,7 @@ class CloseButton extends Button {
*
* By default, if the key is Esc, it will trigger a `click` event.
*
* @param {Event} event
* @param {KeyboardEvent} event
* The `keydown` event that caused this function to be called.
*
* @listens keydown
@ -14490,7 +14514,7 @@ class Menu extends Component {
/**
* Handle a `keydown` event on this menu. This listener is added in the constructor.
*
* @param {Event} event
* @param {KeyboardEvent} event
* A `keydown` event that happened on the menu.
*
* @listens keydown
@ -15087,7 +15111,7 @@ class MenuItem extends ClickableComponent {
* Ignore keys which are used by the menu, but pass any other ones up. See
* {@link ClickableComponent#handleKeyDown} for instances where this is called.
*
* @param {Event} event
* @param {KeyboardEvent} event
* The `keydown` event that caused this function to be called.
*
* @listens keydown
@ -20146,8 +20170,8 @@ const DEFAULT_BREAKPOINTS = {
*
* After an instance has been created it can be accessed globally in three ways:
* 1. By calling `videojs.getPlayer('example_video_1');`
* 2. By calling `videojs('example_video_1');` (not recomended)
* 2. By using it directly via `videojs.players.example_video_1;`
* 2. By calling `videojs('example_video_1');` (not recommended)
* 2. By using it directly via `videojs.players.example_video_1;`
*
* @extends Component
* @global
@ -21886,7 +21910,9 @@ class Player extends Component {
*/
handleTechError_() {
const error = this.tech_.error();
this.error(error);
if (error) {
this.error(error);
}
}
/**
@ -22842,7 +22868,7 @@ class Player extends Component {
* This allows player-wide hotkeys (either as defined below, or optionally
* by an external function).
*
* @param {Event} event
* @param {KeyboardEvent} event
* The `keydown` event that caused this function to be called.
*
* @listens keydown
@ -25046,7 +25072,7 @@ const markPluginAsActive = (player, name) => {
* @param {Player} player
* A Video.js player instance.
*
* @param {Plugin~PluginEventHash} hash
* @param {PluginEventHash} hash
* A plugin event hash.
*
* @param {boolean} [before]
@ -25199,7 +25225,7 @@ class Plugin {
* @param {Object} [hash={}]
* An object to be used as event an event hash.
*
* @return {Plugin~PluginEventHash}
* @return {PluginEventHash}
* An event hash object with provided properties mixed-in.
*/
getEventHash(hash = {}) {
@ -25218,7 +25244,7 @@ class Plugin {
*
* @param {Object} [hash={}]
* Additional data hash to merge with a
* {@link Plugin~PluginEventHash|PluginEventHash}.
* {@link PluginEventHash|PluginEventHash}.
*
* @return {boolean}
* Whether or not default was prevented.
@ -25434,7 +25460,7 @@ Player.prototype.hasPlugin = function (name) {
* Signals that a plugin is about to be set up on a player.
*
* @event Player#beforepluginsetup
* @type {Plugin~PluginEventHash}
* @type {PluginEventHash}
*/
/**
@ -25442,14 +25468,14 @@ Player.prototype.hasPlugin = function (name) {
* is the name of the plugin.
*
* @event Player#beforepluginsetup:$name
* @type {Plugin~PluginEventHash}
* @type {PluginEventHash}
*/
/**
* Signals that a plugin has just been set up on a player.
*
* @event Player#pluginsetup
* @type {Plugin~PluginEventHash}
* @type {PluginEventHash}
*/
/**
@ -25457,11 +25483,11 @@ Player.prototype.hasPlugin = function (name) {
* is the name of the plugin.
*
* @event Player#pluginsetup:$name
* @type {Plugin~PluginEventHash}
* @type {PluginEventHash}
*/
/**
* @typedef {Object} Plugin~PluginEventHash
* @typedef {Object} PluginEventHash
*
* @property {string} instance
* For basic plugins, the return value of the plugin function. For
@ -25788,10 +25814,10 @@ videojs.getComponent = Component.getComponent;
* @param {string} name
* The class name of the component
*
* @param {Component} comp
* @param {typeof Component} comp
* The component class
*
* @return {Component}
* @return {typeof Component}
* The newly registered component
*/
videojs.registerComponent = (name, comp) => {
@ -25874,9 +25900,11 @@ videojs.deregisterPlugin = Plugin.deregisterPlugin;
*
* @param {string} name
* The plugin name
*
* @param {Plugin|Function} plugin
*
* @param {typeof Plugin|Function} plugin
* The plugin sub-class or function
*
* @return {typeof Plugin|Function}
*/
videojs.plugin = (name, plugin) => {
log.warn('videojs.plugin() is deprecated; use videojs.registerPlugin() instead');