mirror of
https://github.com/videojs/video.js.git
synced 2024-11-28 08:58:46 +02:00
chore(types): fix issues in exported types (#8333)
This commit is contained in:
parent
473176f268
commit
bad086dad6
@ -1076,9 +1076,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);
|
||||
@ -1094,9 +1093,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);
|
||||
@ -1142,7 +1140,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) {
|
||||
|
@ -168,7 +168,7 @@ class EventTarget {
|
||||
/**
|
||||
* All event listeners should follow the following format.
|
||||
*
|
||||
* @callback EventTarget~EventListener
|
||||
* @callback EventListener
|
||||
* @this {EventTarget}
|
||||
*
|
||||
* @param {Event} event
|
||||
@ -185,7 +185,7 @@ class EventTarget {
|
||||
* will have extra functionality. See that function for more information.
|
||||
*
|
||||
* @property EventTarget.prototype.allowedEvents_
|
||||
* @private
|
||||
* @protected
|
||||
*/
|
||||
EventTarget.prototype.allowedEvents_ = {};
|
||||
|
||||
|
@ -81,7 +81,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]
|
||||
@ -238,7 +238,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 = {}) {
|
||||
@ -257,7 +257,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.
|
||||
@ -482,7 +482,7 @@ export default Plugin;
|
||||
* Signals that a plugin is about to be set up on a player.
|
||||
*
|
||||
* @event Player#beforepluginsetup
|
||||
* @type {Plugin~PluginEventHash}
|
||||
* @type {PluginEventHash}
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -490,14 +490,14 @@ export default Plugin;
|
||||
* 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}
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -505,11 +505,11 @@ export default Plugin;
|
||||
* 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
|
||||
|
@ -22,7 +22,7 @@ import * as Guid from '../utils/guid.js';
|
||||
* * `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
|
||||
@ -480,7 +480,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.
|
||||
*/
|
||||
@ -1280,7 +1280,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
|
||||
@ -1308,7 +1308,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
|
||||
@ -1371,7 +1371,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) {
|
||||
|
@ -36,7 +36,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 = []) {
|
||||
|
@ -105,6 +105,9 @@ class HTMLTrackElement extends EventTarget {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @protected
|
||||
*/
|
||||
HTMLTrackElement.prototype.allowedEvents_ = {
|
||||
load: 'load'
|
||||
};
|
||||
|
@ -441,6 +441,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'
|
||||
|
@ -177,7 +177,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',
|
||||
|
@ -2,6 +2,9 @@
|
||||
* @file video.js
|
||||
* @module videojs
|
||||
*/
|
||||
/**
|
||||
* @typedef { string } version
|
||||
*/
|
||||
import {version} from '../../package.json';
|
||||
import window from 'global/window';
|
||||
import {
|
||||
|
Loading…
Reference in New Issue
Block a user