diff --git a/src/js/component.js b/src/js/component.js index 241f977e3a..94be4e3980 100644 --- a/src/js/component.js +++ b/src/js/component.js @@ -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) { diff --git a/src/js/event-target.js b/src/js/event-target.js index c76769c697..68a0e978fa 100644 --- a/src/js/event-target.js +++ b/src/js/event-target.js @@ -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_ = {}; diff --git a/src/js/plugin.js b/src/js/plugin.js index 53df33f573..52ab6e7e7d 100644 --- a/src/js/plugin.js +++ b/src/js/plugin.js @@ -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 diff --git a/src/js/tech/tech.js b/src/js/tech/tech.js index b75ca5217f..71628b56dd 100644 --- a/src/js/tech/tech.js +++ b/src/js/tech/tech.js @@ -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) { diff --git a/src/js/tracks/audio-track-list.js b/src/js/tracks/audio-track-list.js index bddb3023b9..0552323656 100644 --- a/src/js/tracks/audio-track-list.js +++ b/src/js/tracks/audio-track-list.js @@ -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 = []) { diff --git a/src/js/tracks/html-track-element.js b/src/js/tracks/html-track-element.js index e9502ed8bb..677755808c 100644 --- a/src/js/tracks/html-track-element.js +++ b/src/js/tracks/html-track-element.js @@ -105,6 +105,9 @@ class HTMLTrackElement extends EventTarget { } } +/** + * @protected + */ HTMLTrackElement.prototype.allowedEvents_ = { load: 'load' }; diff --git a/src/js/tracks/text-track.js b/src/js/tracks/text-track.js index 5c94a709d7..c108a3b0bb 100644 --- a/src/js/tracks/text-track.js +++ b/src/js/tracks/text-track.js @@ -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' diff --git a/src/js/tracks/track-list.js b/src/js/tracks/track-list.js index a1d2b33506..4327ac2929 100644 --- a/src/js/tracks/track-list.js +++ b/src/js/tracks/track-list.js @@ -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', diff --git a/src/js/video.js b/src/js/video.js index f535309be9..685b428f19 100644 --- a/src/js/video.js +++ b/src/js/video.js @@ -2,6 +2,9 @@ * @file video.js * @module videojs */ +/** + * @typedef { string } version + */ import {version} from '../../package.json'; import window from 'global/window'; import {