From 61bd74de8d722d878f3e8bc552ba2fa98aea1615 Mon Sep 17 00:00:00 2001 From: mister-ben Date: Wed, 5 Apr 2023 16:10:13 +0200 Subject: [PATCH] fix(types): Add jsdoc plugin to handle ts-style imports (#8225) --- .jsdoc.json | 3 +- package-lock.json | 277 +----------------- package.json | 1 + src/js/big-play-button.js | 6 +- src/js/clickable-component.js | 6 +- src/js/close-button.js | 6 +- src/js/component.js | 13 +- .../audio-track-menu-item.js | 6 +- src/js/control-bar/fullscreen-toggle.js | 6 +- src/js/control-bar/live-display.js | 6 +- src/js/control-bar/mute-toggle.js | 6 +- .../control-bar/picture-in-picture-toggle.js | 6 +- src/js/control-bar/play-toggle.js | 6 +- .../playback-rate-menu-button.js | 6 +- .../playback-rate-menu-item.js | 6 +- .../progress-control/load-progress-bar.js | 6 +- .../progress-control/mouse-time-display.js | 6 +- .../progress-control/play-progress-bar.js | 6 +- .../progress-control/progress-control.js | 6 +- .../control-bar/progress-control/seek-bar.js | 17 +- .../progress-control/time-tooltip.js | 6 +- src/js/control-bar/seek-to-live.js | 6 +- .../caption-settings-menu-item.js | 6 +- .../text-track-controls/captions-button.js | 6 +- .../text-track-controls/chapters-button.js | 12 +- .../chapters-track-menu-item.js | 6 +- .../descriptions-button.js | 6 +- .../off-text-track-menu-item.js | 6 +- .../text-track-controls/subs-caps-button.js | 6 +- .../text-track-controls/subtitles-button.js | 6 +- .../text-track-controls/text-track-button.js | 6 +- .../text-track-menu-item.js | 6 +- .../time-controls/duration-display.js | 6 +- .../time-controls/remaining-time-display.js | 6 +- .../control-bar/time-controls/time-display.js | 6 +- src/js/control-bar/track-button.js | 6 +- .../volume-control/check-mute-support.js | 9 +- .../volume-control/check-volume-support.js | 9 +- .../mouse-volume-level-display.js | 6 +- .../control-bar/volume-control/volume-bar.js | 7 +- .../volume-control/volume-control.js | 6 +- .../volume-control/volume-level-tooltip.js | 6 +- src/js/control-bar/volume-panel.js | 6 +- src/js/error-display.js | 6 +- src/js/live-tracker.js | 6 +- src/js/menu/menu-button.js | 6 +- src/js/menu/menu-item.js | 6 +- src/js/menu/menu.js | 6 +- src/js/modal-dialog.js | 15 +- src/js/player.js | 11 +- src/js/poster-image.js | 6 +- src/js/slider/slider.js | 17 +- src/js/tech/loader.js | 6 +- src/js/tech/middleware.js | 19 +- src/js/tech/setup-sourceset.js | 6 +- src/js/tech/tech.js | 6 +- src/js/tracks/audio-track-list.js | 8 +- src/js/tracks/html-track-element.js | 6 +- src/js/tracks/text-track-display.js | 7 +- src/js/tracks/text-track-list-converter.js | 6 +- src/js/tracks/text-track-list.js | 6 +- src/js/tracks/text-track-settings.js | 6 +- src/js/tracks/text-track.js | 6 +- src/js/tracks/track-list.js | 12 +- src/js/tracks/video-track-list.js | 8 +- src/js/utils/buffer.js | 6 +- src/js/utils/create-logger.js | 8 +- src/js/utils/filter-source.js | 4 - src/js/utils/mimetypes.js | 6 +- 69 files changed, 112 insertions(+), 645 deletions(-) diff --git a/.jsdoc.json b/.jsdoc.json index 74d942a65b..80cedde5d2 100644 --- a/.jsdoc.json +++ b/.jsdoc.json @@ -21,7 +21,7 @@ "class": "link-vjs" }, { - "title": "v8.0.2 source", + "title": "v8.2.1 source", "link": "https://github.com/videojs/video.js", "class": "link-gh" }, @@ -59,6 +59,7 @@ } }, "plugins": [ + "node_modules/jsdoc-tsimport-plugin/index.js", "plugins/markdown", "build/jsdoc-typeof-plugin" ], diff --git a/package-lock.json b/package-lock.json index 6b58e086d8..f7ab874de5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1672,21 +1672,6 @@ "vfile-message": "*" } }, - "@videojs/http-streaming": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@videojs/http-streaming/-/http-streaming-3.0.0.tgz", - "integrity": "sha512-AdKmY/W2dyeJP0uALgMRmhLa4pbHMvE4OMlg6yQvufnqsz6jDFo1DYnZRv2ENDYrmVdnPH58Ehgu59053+OIhQ==", - "requires": { - "@babel/runtime": "^7.12.5", - "@videojs/vhs-utils": "4.0.0", - "aes-decrypter": "4.0.1", - "global": "^4.4.0", - "m3u8-parser": "^6.0.0", - "mpd-parser": "^1.0.1", - "mux.js": "6.2.0", - "video.js": "^7 || ^8" - } - }, "@videojs/vhs-utils": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-4.0.0.tgz", @@ -8012,6 +7997,12 @@ } } }, + "jsdoc-tsimport-plugin": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/jsdoc-tsimport-plugin/-/jsdoc-tsimport-plugin-1.0.5.tgz", + "integrity": "sha512-6mvyF+tXdanf3zxEumTF9Uf/sXGlANP+XohSuiJiOVVWPGxi+3f2a2sy5Ew3W+0PMYUkcGYNxfYd5mMZsIHQpg==", + "dev": true + }, "jsdoc-type-pratt-parser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-1.2.0.tgz", @@ -8557,12 +8548,6 @@ "graceful-fs": "^4.1.11" } }, - "kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", - "dev": true - }, "labeled-stream-splicer": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz", @@ -9467,7 +9452,7 @@ "mdurl": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", "dev": true }, "media-typer": { @@ -9677,161 +9662,6 @@ "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", "dev": true }, - "min-document": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", - "integrity": "sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==", - "requires": { - "dom-walk": "^0.1.0" - } - }, - "micromark-util-decode-numeric-character-reference": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.0.0.tgz", - "integrity": "sha512-OzO9AI5VUtrTD7KSdagf4MWgHMtET17Ua1fIpXTpuhclCqD8egFWo85GxSGvxgkGS74bEahvtM0WP0HjvV0e4w==", - "dev": true, - "requires": { - "micromark-util-symbol": "^1.0.0" - } - }, - "micromark-util-decode-string": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-1.0.2.tgz", - "integrity": "sha512-DLT5Ho02qr6QWVNYbRZ3RYOSSWWFuH3tJexd3dgN1odEuPNxCngTCXJum7+ViRAd9BbdxCvMToPOD/IvVhzG6Q==", - "dev": true, - "requires": { - "decode-named-character-reference": "^1.0.0", - "micromark-util-character": "^1.0.0", - "micromark-util-decode-numeric-character-reference": "^1.0.0", - "micromark-util-symbol": "^1.0.0" - } - }, - "micromark-util-encode": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-1.0.1.tgz", - "integrity": "sha512-U2s5YdnAYexjKDel31SVMPbfi+eF8y1U4pfiRW/Y8EFVCy/vgxk/2wWTxzcqE71LHtCuCzlBDRU2a5CQ5j+mQA==", - "dev": true - }, - "micromark-util-html-tag-name": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.1.0.tgz", - "integrity": "sha512-BKlClMmYROy9UiV03SwNmckkjn8QHVaWkqoAqzivabvdGcwNGMMMH/5szAnywmsTBUzDsU57/mFi0sp4BQO6dA==", - "dev": true - }, - "micromark-util-normalize-identifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.0.0.tgz", - "integrity": "sha512-yg+zrL14bBTFrQ7n35CmByWUTFsgst5JhA4gJYoty4Dqzj4Z4Fr/DHekSS5aLfH9bdlfnSvKAWsAgJhIbogyBg==", - "dev": true, - "requires": { - "micromark-util-symbol": "^1.0.0" - } - }, - "micromark-util-resolve-all": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-1.0.0.tgz", - "integrity": "sha512-CB/AGk98u50k42kvgaMM94wzBqozSzDDaonKU7P7jwQIuH2RU0TeBqGYJz2WY1UdihhjweivStrJ2JdkdEmcfw==", - "dev": true, - "requires": { - "micromark-util-types": "^1.0.0" - } - }, - "micromark-util-sanitize-uri": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.1.0.tgz", - "integrity": "sha512-RoxtuSCX6sUNtxhbmsEFQfWzs8VN7cTctmBPvYivo98xb/kDEoTCtJQX5wyzIYEmk/lvNFTat4hL8oW0KndFpg==", - "dev": true, - "requires": { - "micromark-util-character": "^1.0.0", - "micromark-util-encode": "^1.0.0", - "micromark-util-symbol": "^1.0.0" - } - }, - "micromark-util-subtokenize": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-1.0.2.tgz", - "integrity": "sha512-d90uqCnXp/cy4G881Ub4psE57Sf8YD0pim9QdjCRNjfas2M1u6Lbt+XZK9gnHL2XFhnozZiEdCa9CNfXSfQ6xA==", - "dev": true, - "requires": { - "micromark-util-chunked": "^1.0.0", - "micromark-util-symbol": "^1.0.0", - "micromark-util-types": "^1.0.0", - "uvu": "^0.5.0" - } - }, - "micromark-util-symbol": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-1.0.1.tgz", - "integrity": "sha512-oKDEMK2u5qqAptasDAwWDXq0tG9AssVwAx3E9bBF3t/shRIGsWIRG+cGafs2p/SnDSOecnt6hZPCE2o6lHfFmQ==", - "dev": true - }, - "micromark-util-types": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-1.0.2.tgz", - "integrity": "sha512-DCfg/T8fcrhrRKTPjRrw/5LLvdGV7BHySf/1LOZx7TzWZdYRjogNtyNq885z3nNallwr3QUKARjqvHqX1/7t+w==", - "dev": true - }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } - }, - "mime": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", - "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", - "dev": true - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "requires": { - "mime-db": "1.52.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "dev": true - }, "min-document": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", @@ -15299,99 +15129,6 @@ "integrity": "sha512-lXhElVO0Rq3frgPvFBwahmed3X03vjPF8OcjKMy8+F1xU/3Q3QU3tKEDp743SFtb74PdF0UWpxPvtOP0GCLheA==", "dev": true }, - "video.js": { - "version": "7.21.1", - "resolved": "https://registry.npmjs.org/video.js/-/video.js-7.21.1.tgz", - "integrity": "sha512-AvHfr14ePDHCfW5Lx35BvXk7oIonxF6VGhSxocmTyqotkQpxwYdmt4tnQSV7MYzNrYHb0GI8tJMt20NDkCQrxg==", - "requires": { - "@babel/runtime": "^7.12.5", - "@videojs/http-streaming": "2.15.1", - "@videojs/vhs-utils": "^3.0.4", - "@videojs/xhr": "2.6.0", - "aes-decrypter": "3.1.3", - "global": "^4.4.0", - "keycode": "^2.2.0", - "m3u8-parser": "4.8.0", - "mpd-parser": "0.22.1", - "mux.js": "6.0.1", - "safe-json-parse": "4.0.0", - "videojs-font": "3.2.0", - "videojs-vtt.js": "^0.15.4" - }, - "dependencies": { - "@videojs/http-streaming": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/@videojs/http-streaming/-/http-streaming-2.15.1.tgz", - "integrity": "sha512-/uuN3bVkEeJAdrhu5Hyb19JoUo3CMys7yf2C1vUjeL1wQaZ4Oe8JrZzRrnWZ0rjvPgKfNLPXQomsRtgrMoRMJQ==", - "requires": { - "@babel/runtime": "^7.12.5", - "@videojs/vhs-utils": "3.0.5", - "aes-decrypter": "3.1.3", - "global": "^4.4.0", - "m3u8-parser": "4.8.0", - "mpd-parser": "^0.22.1", - "mux.js": "6.0.1", - "video.js": "^6 || ^7" - } - }, - "@videojs/vhs-utils": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-3.0.5.tgz", - "integrity": "sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw==", - "requires": { - "@babel/runtime": "^7.12.5", - "global": "^4.4.0", - "url-toolkit": "^2.2.1" - } - }, - "aes-decrypter": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/aes-decrypter/-/aes-decrypter-3.1.3.tgz", - "integrity": "sha512-VkG9g4BbhMBy+N5/XodDeV6F02chEk9IpgRTq/0bS80y4dzy79VH2Gtms02VXomf3HmyRe3yyJYkJ990ns+d6A==", - "requires": { - "@babel/runtime": "^7.12.5", - "@videojs/vhs-utils": "^3.0.5", - "global": "^4.4.0", - "pkcs7": "^1.0.4" - } - }, - "m3u8-parser": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/m3u8-parser/-/m3u8-parser-4.8.0.tgz", - "integrity": "sha512-UqA2a/Pw3liR6Df3gwxrqghCP17OpPlQj6RBPLYygf/ZSQ4MoSgvdvhvt35qV+3NaaA0FSZx93Ix+2brT1U7cA==", - "requires": { - "@babel/runtime": "^7.12.5", - "@videojs/vhs-utils": "^3.0.5", - "global": "^4.4.0" - } - }, - "mpd-parser": { - "version": "0.22.1", - "resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-0.22.1.tgz", - "integrity": "sha512-fwBebvpyPUU8bOzvhX0VQZgSohncbgYwUyJJoTSNpmy7ccD2ryiCvM7oRkn/xQH5cv73/xU7rJSNCLjdGFor0Q==", - "requires": { - "@babel/runtime": "^7.12.5", - "@videojs/vhs-utils": "^3.0.5", - "@xmldom/xmldom": "^0.8.3", - "global": "^4.4.0" - } - }, - "mux.js": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/mux.js/-/mux.js-6.0.1.tgz", - "integrity": "sha512-22CHb59rH8pWGcPGW5Og7JngJ9s+z4XuSlYvnxhLuc58cA1WqGDQPzuG8I+sPm1/p0CdgpzVTaKW408k5DNn8w==", - "requires": { - "@babel/runtime": "^7.11.2", - "global": "^4.4.0" - } - }, - "videojs-font": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/videojs-font/-/videojs-font-3.2.0.tgz", - "integrity": "sha512-g8vHMKK2/JGorSfqAZQUmYYNnXmfec4MLhwtEFS+mMs2IDY398GLysy6BH6K+aS1KMNu/xWZ8Sue/X/mdQPliA==" - } - } - }, "videojs-contrib-quality-levels": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/videojs-contrib-quality-levels/-/videojs-contrib-quality-levels-3.0.0.tgz", diff --git a/package.json b/package.json index a34afb8469..9c27bfb511 100644 --- a/package.json +++ b/package.json @@ -125,6 +125,7 @@ "husky": "^1.3.1", "is-ci": "^3.0.0", "jsdoc": "^3.6.11", + "jsdoc-tsimport-plugin": "^1.0.5", "karma": "^6.4.0", "lint-staged": "^10.5.4", "markdown-table": "^1.1.3", diff --git a/src/js/big-play-button.js b/src/js/big-play-button.js index 8e5ba9dafc..5ed9ef8981 100644 --- a/src/js/big-play-button.js +++ b/src/js/big-play-button.js @@ -5,10 +5,6 @@ import Button from './button.js'; import Component from './component.js'; import {isPromise, silencePromise} from './utils/promise'; -/** - * @typedef {import('../event-target').Event} Event - */ - /** * The initial play button that shows before the video has played. The hiding of the * `BigPlayButton` get done via CSS and `Player` states. @@ -38,7 +34,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 {Event} event + * @param {KeyboardEvent} event * The `keydown`, `tap`, or `click` event that caused this function to be * called. * diff --git a/src/js/clickable-component.js b/src/js/clickable-component.js index 031fb89c1a..6b0160288c 100644 --- a/src/js/clickable-component.js +++ b/src/js/clickable-component.js @@ -6,10 +6,6 @@ import * as Dom from './utils/dom.js'; import log from './utils/log.js'; import keycode from 'keycode'; -/** - * @typedef { import('./player').default } Player - */ - /** * Component which is clickable or keyboard actionable, but is not a * native HTML button. @@ -21,7 +17,7 @@ class ClickableComponent extends Component { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('./player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/close-button.js b/src/js/close-button.js index 22179dc66e..8cfada325d 100644 --- a/src/js/close-button.js +++ b/src/js/close-button.js @@ -5,10 +5,6 @@ import Button from './button'; import Component from './component'; import keycode from 'keycode'; -/** - * @typedef { import('./player').default } Player - */ - /** * The `CloseButton` is a `{@link Button}` that fires a `close` event when * it gets clicked. @@ -20,7 +16,7 @@ class CloseButton extends Button { /** * Creates an instance of the this class. * - * @param {Player} player + * @param { import('./player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/component.js b/src/js/component.js index 9d94c19ca3..d7b691d10c 100644 --- a/src/js/component.js +++ b/src/js/component.js @@ -13,11 +13,6 @@ import {toTitleCase, toLowerCase} from './utils/str.js'; import {merge} from './utils/obj.js'; import keycode from 'keycode'; -/** - * @typedef { import('./player').default } Player - * @typedef { import('./event-target').Event} Event -*/ - /** * Base class for all UI Components. * Components are UI objects which represent both a javascript object and an element @@ -39,7 +34,7 @@ class Component { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('./player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] @@ -293,7 +288,7 @@ class Component { /** * Return the {@link Player} that the `Component` has attached to. * - * @return {Player} + * @return { import('./player').default } * The player that this `Component` has attached to. */ player() { @@ -1253,7 +1248,7 @@ class Component { * When this Component receives a `keydown` event which it does not process, * it passes the event to the Player for handling. * - * @param {Event} event + * @param {KeyboardEvent} event * The `keydown` event that caused this function to be called. */ handleKeyDown(event) { @@ -1367,7 +1362,7 @@ class Component { * Triggered when a `Component` is tapped. * * @event Component#tap - * @type {Event} + * @type {MouseEvent} */ this.trigger('tap'); // It may be good to copy the touchend event object and change the diff --git a/src/js/control-bar/audio-track-controls/audio-track-menu-item.js b/src/js/control-bar/audio-track-controls/audio-track-menu-item.js index 4180435e62..14b550fba8 100644 --- a/src/js/control-bar/audio-track-controls/audio-track-menu-item.js +++ b/src/js/control-bar/audio-track-controls/audio-track-menu-item.js @@ -5,10 +5,6 @@ import MenuItem from '../../menu/menu-item.js'; import Component from '../../component.js'; import * as Dom from '../../utils/dom.js'; -/** - * @typedef { import('../../player').default } Player - */ - /** * An {@link AudioTrack} {@link MenuItem} * @@ -19,7 +15,7 @@ class AudioTrackMenuItem extends MenuItem { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/fullscreen-toggle.js b/src/js/control-bar/fullscreen-toggle.js index ff4808af75..f25fd10b24 100644 --- a/src/js/control-bar/fullscreen-toggle.js +++ b/src/js/control-bar/fullscreen-toggle.js @@ -5,10 +5,6 @@ import Button from '../button.js'; import Component from '../component.js'; import document from 'global/document'; -/** - * @typedef { import('./player').default } Player - */ - /** * Toggle fullscreen video * @@ -19,7 +15,7 @@ class FullscreenToggle extends Button { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('./player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/live-display.js b/src/js/control-bar/live-display.js index 34d377326b..2bec75f95d 100644 --- a/src/js/control-bar/live-display.js +++ b/src/js/control-bar/live-display.js @@ -5,10 +5,6 @@ import Component from '../component'; import * as Dom from '../utils/dom.js'; import document from 'global/document'; -/** - * @typedef { import('./player').default } Player - */ - // TODO - Future make it click to snap to live /** @@ -21,7 +17,7 @@ class LiveDisplay extends Component { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('./player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/mute-toggle.js b/src/js/control-bar/mute-toggle.js index 562351ea23..1ab300c44f 100644 --- a/src/js/control-bar/mute-toggle.js +++ b/src/js/control-bar/mute-toggle.js @@ -7,10 +7,6 @@ import * as Dom from '../utils/dom.js'; import checkMuteSupport from './volume-control/check-mute-support'; import * as browser from '../utils/browser.js'; -/** - * @typedef { import('./player').default } Player - */ - /** * A button component for muting the audio. * @@ -21,7 +17,7 @@ class MuteToggle extends Button { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('./player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/picture-in-picture-toggle.js b/src/js/control-bar/picture-in-picture-toggle.js index edc92faa09..a239740194 100644 --- a/src/js/control-bar/picture-in-picture-toggle.js +++ b/src/js/control-bar/picture-in-picture-toggle.js @@ -6,10 +6,6 @@ import Component from '../component.js'; import document from 'global/document'; import window from 'global/window'; -/** - * @typedef { import('./player').default } Player - */ - /** * Toggle Picture-in-Picture mode * @@ -20,7 +16,7 @@ class PictureInPictureToggle extends Button { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('./player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/play-toggle.js b/src/js/control-bar/play-toggle.js index d60a15d2c4..fe2e02dcd4 100644 --- a/src/js/control-bar/play-toggle.js +++ b/src/js/control-bar/play-toggle.js @@ -5,10 +5,6 @@ import Button from '../button.js'; import Component from '../component.js'; import {silencePromise} from '../utils/promise'; -/** - * @typedef { import('./player').default } Player - */ - /** * Button to toggle between play and pause. * @@ -19,7 +15,7 @@ class PlayToggle extends Button { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('./player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options={}] diff --git a/src/js/control-bar/playback-rate-menu/playback-rate-menu-button.js b/src/js/control-bar/playback-rate-menu/playback-rate-menu-button.js index 5c7a4fe0d9..484aca62cb 100644 --- a/src/js/control-bar/playback-rate-menu/playback-rate-menu-button.js +++ b/src/js/control-bar/playback-rate-menu/playback-rate-menu-button.js @@ -6,10 +6,6 @@ import PlaybackRateMenuItem from './playback-rate-menu-item.js'; import Component from '../../component.js'; import * as Dom from '../../utils/dom.js'; -/** - * @typedef { import('../../player').default } Player - */ - /** * The component for controlling the playback rate. * @@ -20,7 +16,7 @@ class PlaybackRateMenuButton extends MenuButton { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/playback-rate-menu/playback-rate-menu-item.js b/src/js/control-bar/playback-rate-menu/playback-rate-menu-item.js index 4fee03a00f..6caf28a1f0 100644 --- a/src/js/control-bar/playback-rate-menu/playback-rate-menu-item.js +++ b/src/js/control-bar/playback-rate-menu/playback-rate-menu-item.js @@ -4,10 +4,6 @@ import MenuItem from '../../menu/menu-item.js'; import Component from '../../component.js'; -/** - * @typedef { import('../../player').default } Player - */ - /** * The specific menu item type for selecting a playback rate. * @@ -18,7 +14,7 @@ class PlaybackRateMenuItem extends MenuItem { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/progress-control/load-progress-bar.js b/src/js/control-bar/progress-control/load-progress-bar.js index 50ae1fdfdd..ed3f4c750c 100644 --- a/src/js/control-bar/progress-control/load-progress-bar.js +++ b/src/js/control-bar/progress-control/load-progress-bar.js @@ -6,10 +6,6 @@ import * as Dom from '../../utils/dom.js'; import {clamp} from '../../utils/num'; import document from 'global/document'; -/** - * @typedef { import('../../player').default } Player - */ - // get the percent width of a time compared to the total end const percentify = (time, end) => clamp((time / end) * 100, 0, 100).toFixed(2) + '%'; @@ -23,7 +19,7 @@ class LoadProgressBar extends Component { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/progress-control/mouse-time-display.js b/src/js/control-bar/progress-control/mouse-time-display.js index 93a3526522..6d0b5cc98c 100644 --- a/src/js/control-bar/progress-control/mouse-time-display.js +++ b/src/js/control-bar/progress-control/mouse-time-display.js @@ -6,10 +6,6 @@ import * as Fn from '../../utils/fn.js'; import './time-tooltip'; -/** - * @typedef { import('../../player').default } Player - */ - /** * The {@link MouseTimeDisplay} component tracks mouse movement over the * {@link ProgressControl}. It displays an indicator and a {@link TimeTooltip} @@ -23,7 +19,7 @@ class MouseTimeDisplay extends Component { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The {@link Player} that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/progress-control/play-progress-bar.js b/src/js/control-bar/progress-control/play-progress-bar.js index ffa602309c..d7ceb429b2 100644 --- a/src/js/control-bar/progress-control/play-progress-bar.js +++ b/src/js/control-bar/progress-control/play-progress-bar.js @@ -7,10 +7,6 @@ import * as Fn from '../../utils/fn.js'; import './time-tooltip'; -/** - * @typedef { import('../../player').default } Player - */ - /** * Used by {@link SeekBar} to display media playback progress as part of the * {@link ProgressControl}. @@ -22,7 +18,7 @@ class PlayProgressBar extends Component { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The {@link Player} that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/progress-control/progress-control.js b/src/js/control-bar/progress-control/progress-control.js index 75037af9c7..a2d1e64d94 100644 --- a/src/js/control-bar/progress-control/progress-control.js +++ b/src/js/control-bar/progress-control/progress-control.js @@ -9,10 +9,6 @@ import {silencePromise} from '../../utils/promise'; import './seek-bar.js'; -/** - * @typedef { import('../../player').default } Player - */ - /** * The Progress Control component contains the seek bar, load progress, * and play progress. @@ -24,7 +20,7 @@ class ProgressControl extends Component { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/progress-control/seek-bar.js b/src/js/control-bar/progress-control/seek-bar.js index b38f81fd50..51cd902456 100644 --- a/src/js/control-bar/progress-control/seek-bar.js +++ b/src/js/control-bar/progress-control/seek-bar.js @@ -15,11 +15,6 @@ import './load-progress-bar.js'; import './play-progress-bar.js'; import './mouse-time-display.js'; -/** - * @typedef { import('../../player').default } Player - * @typedef {import('../event-target').Event} Event - */ - // The number of seconds the `step*` functions move the timeline. const STEP_SECONDS = 5; @@ -37,7 +32,7 @@ class SeekBar extends Slider { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] @@ -249,7 +244,7 @@ class SeekBar extends Slider { /** * Handle mouse down on seek bar * - * @param {Event} event + * @param {MouseEvent} event * The `mousedown` event that caused this to run. * * @listens mousedown @@ -271,7 +266,7 @@ class SeekBar extends Slider { /** * Handle mouse move on seek bar * - * @param {Event} event + * @param {MouseEvent} event * The `mousemove` event that caused this to run. * @param {boolean} mouseDown this is a flag that should be set to true if `handleMouseMove` is called directly. It allows us to skip things that should not happen if coming from mouse down but should happen on regular mouse move handler. Defaults to false * @@ -356,7 +351,7 @@ class SeekBar extends Slider { /** * Handle mouse up on seek bar * - * @param {Event} event + * @param {MouseEvent} event * The `mouseup` event that caused this to run. * * @listens mouseup @@ -405,7 +400,7 @@ class SeekBar extends Slider { * Toggles the playback state of the player * This gets called when enter or space is used on the seekbar * - * @param {Event} event + * @param {KeyboardEvent} event * The `keydown` event that caused this function to be called * */ @@ -428,7 +423,7 @@ class SeekBar extends Slider { * PageDown key moves back a larger step than ArrowDown * PageUp key moves forward a large step * - * @param {Event} event + * @param {KeyboardEvent} event * The `keydown` event that caused this function to be called. * * @listens keydown diff --git a/src/js/control-bar/progress-control/time-tooltip.js b/src/js/control-bar/progress-control/time-tooltip.js index 07bee63e61..4f01b09873 100644 --- a/src/js/control-bar/progress-control/time-tooltip.js +++ b/src/js/control-bar/progress-control/time-tooltip.js @@ -6,10 +6,6 @@ import * as Dom from '../../utils/dom.js'; import {formatTime} from '../../utils/time.js'; import * as Fn from '../../utils/fn.js'; -/** - * @typedef { import('../../player').default } Player - */ - /** * Time tooltips display a time above the progress bar. * @@ -20,7 +16,7 @@ class TimeTooltip extends Component { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The {@link Player} that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/seek-to-live.js b/src/js/control-bar/seek-to-live.js index 8ff5a4e7b1..a40eb91be1 100644 --- a/src/js/control-bar/seek-to-live.js +++ b/src/js/control-bar/seek-to-live.js @@ -5,10 +5,6 @@ import Button from '../button'; import Component from '../component'; import * as Dom from '../utils/dom.js'; -/** - * @typedef { import('./player').default } Player - */ - /** * Displays the live indicator when duration is Infinity. * @@ -19,7 +15,7 @@ class SeekToLive extends Button { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('./player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/text-track-controls/caption-settings-menu-item.js b/src/js/control-bar/text-track-controls/caption-settings-menu-item.js index b40b651ae3..fdd128a2e5 100644 --- a/src/js/control-bar/text-track-controls/caption-settings-menu-item.js +++ b/src/js/control-bar/text-track-controls/caption-settings-menu-item.js @@ -4,10 +4,6 @@ import TextTrackMenuItem from './text-track-menu-item.js'; import Component from '../../component.js'; -/** - * @typedef { import('../../player').default } Player - */ - /** * The menu item for caption track settings menu * @@ -18,7 +14,7 @@ class CaptionSettingsMenuItem extends TextTrackMenuItem { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/text-track-controls/captions-button.js b/src/js/control-bar/text-track-controls/captions-button.js index 11c2e90e71..088ead0541 100644 --- a/src/js/control-bar/text-track-controls/captions-button.js +++ b/src/js/control-bar/text-track-controls/captions-button.js @@ -5,10 +5,6 @@ import TextTrackButton from './text-track-button.js'; import Component from '../../component.js'; import CaptionSettingsMenuItem from './caption-settings-menu-item.js'; -/** - * @typedef { import('../../player').default } Player - */ - /** * The button component for toggling and selecting captions * @@ -19,7 +15,7 @@ class CaptionsButton extends TextTrackButton { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/text-track-controls/chapters-button.js b/src/js/control-bar/text-track-controls/chapters-button.js index a002d25bda..cc5ef6fd60 100644 --- a/src/js/control-bar/text-track-controls/chapters-button.js +++ b/src/js/control-bar/text-track-controls/chapters-button.js @@ -6,12 +6,6 @@ import Component from '../../component.js'; import ChaptersTrackMenuItem from './chapters-track-menu-item.js'; import {toTitleCase} from '../../utils/str.js'; -/** - * @typedef { import('../../player').default } Player - * @typedef { import('../../menu/menu').default } Menu - * @typedef { import('../text-track-menu-item/menu/').default } TextTrackMenuItem - */ - /** * The button component for toggling and selecting chapters * Chapters act much differently than other text tracks @@ -24,7 +18,7 @@ class ChaptersButton extends TextTrackButton { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] @@ -164,7 +158,7 @@ class ChaptersButton extends TextTrackButton { /** * Create menu from chapter track * - * @return {Menu} + * @return { import('../../menu/menu').default } * New menu for the chapter buttons */ createMenu() { @@ -175,7 +169,7 @@ class ChaptersButton extends TextTrackButton { /** * Create a menu item for each text track * - * @return {TextTrackMenuItem[]} + * @return { import('./text-track-menu-item').default[] } * Array of menu items */ createItems() { diff --git a/src/js/control-bar/text-track-controls/chapters-track-menu-item.js b/src/js/control-bar/text-track-controls/chapters-track-menu-item.js index da5a83f77f..e5942ac5ba 100644 --- a/src/js/control-bar/text-track-controls/chapters-track-menu-item.js +++ b/src/js/control-bar/text-track-controls/chapters-track-menu-item.js @@ -4,10 +4,6 @@ import MenuItem from '../../menu/menu-item.js'; import Component from '../../component.js'; -/** - * @typedef { import('../../player').default } Player - */ - /** * The chapter track menu item * @@ -18,7 +14,7 @@ class ChaptersTrackMenuItem extends MenuItem { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/text-track-controls/descriptions-button.js b/src/js/control-bar/text-track-controls/descriptions-button.js index c2f8744033..44ca4a1389 100644 --- a/src/js/control-bar/text-track-controls/descriptions-button.js +++ b/src/js/control-bar/text-track-controls/descriptions-button.js @@ -5,10 +5,6 @@ import TextTrackButton from './text-track-button.js'; import Component from '../../component.js'; import * as Fn from '../../utils/fn.js'; -/** - * @typedef { import('../../player').default } Player - */ - /** * The button component for toggling and selecting descriptions * @@ -19,7 +15,7 @@ class DescriptionsButton extends TextTrackButton { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/text-track-controls/off-text-track-menu-item.js b/src/js/control-bar/text-track-controls/off-text-track-menu-item.js index 0f64f1aa7e..e7f5ad9da9 100644 --- a/src/js/control-bar/text-track-controls/off-text-track-menu-item.js +++ b/src/js/control-bar/text-track-controls/off-text-track-menu-item.js @@ -4,10 +4,6 @@ import TextTrackMenuItem from './text-track-menu-item.js'; import Component from '../../component.js'; -/** - * @typedef { import('../../player').default } Player - */ - /** * A special menu item for turning of a specific type of text track * @@ -18,7 +14,7 @@ class OffTextTrackMenuItem extends TextTrackMenuItem { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/text-track-controls/subs-caps-button.js b/src/js/control-bar/text-track-controls/subs-caps-button.js index 48ad1ac22f..5d8d182bad 100644 --- a/src/js/control-bar/text-track-controls/subs-caps-button.js +++ b/src/js/control-bar/text-track-controls/subs-caps-button.js @@ -7,10 +7,6 @@ import CaptionSettingsMenuItem from './caption-settings-menu-item.js'; import SubsCapsMenuItem from './subs-caps-menu-item.js'; import {toTitleCase} from '../../utils/str.js'; -/** - * @typedef { import('../../player').default } Player - */ - /** * The button component for toggling and selecting captions and/or subtitles * @@ -21,7 +17,7 @@ class SubsCapsButton extends TextTrackButton { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/text-track-controls/subtitles-button.js b/src/js/control-bar/text-track-controls/subtitles-button.js index fe2666a43c..184d878fb0 100644 --- a/src/js/control-bar/text-track-controls/subtitles-button.js +++ b/src/js/control-bar/text-track-controls/subtitles-button.js @@ -4,10 +4,6 @@ import TextTrackButton from './text-track-button.js'; import Component from '../../component.js'; -/** - * @typedef { import('../../player').default } Player - */ - /** * The button component for toggling and selecting subtitles * @@ -18,7 +14,7 @@ class SubtitlesButton extends TextTrackButton { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/text-track-controls/text-track-button.js b/src/js/control-bar/text-track-controls/text-track-button.js index 2ab9d51747..6848ab8a72 100644 --- a/src/js/control-bar/text-track-controls/text-track-button.js +++ b/src/js/control-bar/text-track-controls/text-track-button.js @@ -6,10 +6,6 @@ import Component from '../../component.js'; import TextTrackMenuItem from './text-track-menu-item.js'; import OffTextTrackMenuItem from './off-text-track-menu-item.js'; -/** - * @typedef { import('../../player').default } Player - */ - /** * The base class for buttons that toggle specific text track types (e.g. subtitles) * @@ -20,7 +16,7 @@ class TextTrackButton extends TrackButton { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options={}] diff --git a/src/js/control-bar/text-track-controls/text-track-menu-item.js b/src/js/control-bar/text-track-controls/text-track-menu-item.js index ef8a4120d2..c4b06f1fc9 100644 --- a/src/js/control-bar/text-track-controls/text-track-menu-item.js +++ b/src/js/control-bar/text-track-controls/text-track-menu-item.js @@ -6,10 +6,6 @@ import Component from '../../component.js'; import window from 'global/window'; import document from 'global/document'; -/** - * @typedef { import('../../player').default } Player - */ - /** * The specific menu item type for selecting a language within a text track kind * @@ -20,7 +16,7 @@ class TextTrackMenuItem extends MenuItem { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/time-controls/duration-display.js b/src/js/control-bar/time-controls/duration-display.js index 9f2f8e3d03..675e748109 100644 --- a/src/js/control-bar/time-controls/duration-display.js +++ b/src/js/control-bar/time-controls/duration-display.js @@ -4,10 +4,6 @@ import TimeDisplay from './time-display'; import Component from '../../component.js'; -/** - * @typedef { import('../../player').default } Player - */ - /** * Displays the duration * @@ -18,7 +14,7 @@ class DurationDisplay extends TimeDisplay { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/time-controls/remaining-time-display.js b/src/js/control-bar/time-controls/remaining-time-display.js index 21ad684f63..8cb635e4fb 100644 --- a/src/js/control-bar/time-controls/remaining-time-display.js +++ b/src/js/control-bar/time-controls/remaining-time-display.js @@ -5,10 +5,6 @@ import TimeDisplay from './time-display'; import Component from '../../component.js'; import * as Dom from '../../utils/dom.js'; -/** - * @typedef { import('../../player').default } Player - */ - /** * Displays the time left in the video * @@ -19,7 +15,7 @@ class RemainingTimeDisplay extends TimeDisplay { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/time-controls/time-display.js b/src/js/control-bar/time-controls/time-display.js index 109ef78ba9..fb9a0ffeeb 100644 --- a/src/js/control-bar/time-controls/time-display.js +++ b/src/js/control-bar/time-controls/time-display.js @@ -7,10 +7,6 @@ import * as Dom from '../../utils/dom.js'; import {formatTime} from '../../utils/time.js'; import log from '../../utils/log.js'; -/** - * @typedef { import('../../player').default } Player - */ - /** * Displays time information about the video * @@ -21,7 +17,7 @@ class TimeDisplay extends Component { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/track-button.js b/src/js/control-bar/track-button.js index 8f74c7b56a..bbdbbe73dc 100644 --- a/src/js/control-bar/track-button.js +++ b/src/js/control-bar/track-button.js @@ -5,10 +5,6 @@ import MenuButton from '../menu/menu-button.js'; import Component from '../component.js'; import * as Fn from '../utils/fn.js'; -/** - * @typedef { import('./player').default } Player - */ - /** * The base class for buttons that toggle specific track types (e.g. subtitles). * @@ -19,7 +15,7 @@ class TrackButton extends MenuButton { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('./player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/volume-control/check-mute-support.js b/src/js/control-bar/volume-control/check-mute-support.js index 7876f91bf2..044269e9ed 100644 --- a/src/js/control-bar/volume-control/check-mute-support.js +++ b/src/js/control-bar/volume-control/check-mute-support.js @@ -1,16 +1,11 @@ -/** - * @typedef { import('../../player').default } Player - * @typedef { import('../../component').default } Component - */ - /** * Check if muting volume is supported and if it isn't hide the mute toggle * button. * - * @param {Component} self + * @param { import('../../component').default } self * A reference to the mute toggle button * - * @param {Player} player + * @param { import('../../player').default } player * A reference to the player * * @private diff --git a/src/js/control-bar/volume-control/check-volume-support.js b/src/js/control-bar/volume-control/check-volume-support.js index 5d6cfa28ac..2b4f2b4681 100644 --- a/src/js/control-bar/volume-control/check-volume-support.js +++ b/src/js/control-bar/volume-control/check-volume-support.js @@ -1,16 +1,11 @@ -/** - * @typedef { import('../../player').default } Player - * @typedef { import('../../component').default } Component - */ - /** * Check if volume control is supported and if it isn't hide the * `Component` that was passed using the `vjs-hidden` class. * - * @param {Component} self + * @param { import('../../component').default } self * The component that should be hidden if volume is unsupported * - * @param {Player} player + * @param { import('../../player').default } player * A reference to the player * * @private diff --git a/src/js/control-bar/volume-control/mouse-volume-level-display.js b/src/js/control-bar/volume-control/mouse-volume-level-display.js index f9b5d50d6e..c7e433d1a6 100644 --- a/src/js/control-bar/volume-control/mouse-volume-level-display.js +++ b/src/js/control-bar/volume-control/mouse-volume-level-display.js @@ -1,7 +1,3 @@ -/** - * @typedef { import('../../player').default } Player - */ - /** * @file mouse-volume-level-display.js */ @@ -23,7 +19,7 @@ class MouseVolumeLevelDisplay extends Component { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The {@link Player} that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/volume-control/volume-bar.js b/src/js/control-bar/volume-control/volume-bar.js index 46aac589f1..d9878fce9c 100644 --- a/src/js/control-bar/volume-control/volume-bar.js +++ b/src/js/control-bar/volume-control/volume-bar.js @@ -11,11 +11,6 @@ import {IS_IOS, IS_ANDROID} from '../../utils/browser.js'; import './volume-level.js'; import './mouse-volume-level-display.js'; -/** - * @typedef { import('../../player').default } Player - * @typedef {import('../../event-target').Event} Event - */ - /** * The bar that contains the volume level and can be clicked on to adjust the level * @@ -26,7 +21,7 @@ class VolumeBar extends Slider { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/volume-control/volume-control.js b/src/js/control-bar/volume-control/volume-control.js index 889249a404..ed628ed1ab 100644 --- a/src/js/control-bar/volume-control/volume-control.js +++ b/src/js/control-bar/volume-control/volume-control.js @@ -9,10 +9,6 @@ import {throttle, bind_, UPDATE_REFRESH_INTERVAL} from '../../utils/fn.js'; // Required children import './volume-bar.js'; -/** - * @typedef { import('../../player').default } Player - */ - /** * The component for controlling the volume level * @@ -23,7 +19,7 @@ class VolumeControl extends Component { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options={}] diff --git a/src/js/control-bar/volume-control/volume-level-tooltip.js b/src/js/control-bar/volume-control/volume-level-tooltip.js index 12310ef673..14ae47301a 100644 --- a/src/js/control-bar/volume-control/volume-level-tooltip.js +++ b/src/js/control-bar/volume-control/volume-level-tooltip.js @@ -5,10 +5,6 @@ import Component from '../../component'; import * as Dom from '../../utils/dom.js'; import * as Fn from '../../utils/fn.js'; -/** - * @typedef { import('../../player').default } Player - */ - /** * Volume level tooltips display a volume above or side by side the volume bar. * @@ -19,7 +15,7 @@ class VolumeLevelTooltip extends Component { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../../player').default } player * The {@link Player} that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/control-bar/volume-panel.js b/src/js/control-bar/volume-panel.js index e1eb9c84bd..131a2bc567 100644 --- a/src/js/control-bar/volume-panel.js +++ b/src/js/control-bar/volume-panel.js @@ -7,10 +7,6 @@ import * as Events from '../utils/events.js'; import keycode from 'keycode'; import document from 'global/document'; -/** - * @typedef { import('./player').default } Player - */ - // Required children import './volume-control/volume-control.js'; import './mute-toggle.js'; @@ -26,7 +22,7 @@ class VolumePanel extends Component { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('./player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options={}] diff --git a/src/js/error-display.js b/src/js/error-display.js index 676bf24454..d6713779cb 100644 --- a/src/js/error-display.js +++ b/src/js/error-display.js @@ -4,10 +4,6 @@ import Component from './component'; import ModalDialog from './modal-dialog'; -/** - * @typedef { import('./player').default } Player - */ - /** * A display that indicates an error has occurred. This means that the video * is unplayable. @@ -19,7 +15,7 @@ class ErrorDisplay extends ModalDialog { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('./player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/live-tracker.js b/src/js/live-tracker.js index 598a28663c..28e12c549b 100644 --- a/src/js/live-tracker.js +++ b/src/js/live-tracker.js @@ -3,10 +3,6 @@ import {merge} from './utils/obj.js'; import window from 'global/window'; import * as Fn from './utils/fn.js'; -/** - * @typedef { import('./player').default } Player - */ - const defaults = { trackingThreshold: 20, liveTolerance: 15 @@ -24,7 +20,7 @@ class LiveTracker extends Component { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('./player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/menu/menu-button.js b/src/js/menu/menu-button.js index e3fb34cad8..94bb43f7d7 100644 --- a/src/js/menu/menu-button.js +++ b/src/js/menu/menu-button.js @@ -11,10 +11,6 @@ import { IS_IOS } from '../utils/browser.js'; import document from 'global/document'; import keycode from 'keycode'; -/** - * @typedef { import('../player').default } Player - */ - /** * A `MenuButton` class for any popup {@link Menu}. * @@ -25,7 +21,7 @@ class MenuButton extends Component { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options={}] diff --git a/src/js/menu/menu-item.js b/src/js/menu/menu-item.js index ce961185a0..57c199a5a5 100644 --- a/src/js/menu/menu-item.js +++ b/src/js/menu/menu-item.js @@ -7,10 +7,6 @@ import {MenuKeys} from './menu-keys.js'; import keycode from 'keycode'; import {createEl} from '../utils/dom.js'; -/** - * @typedef { import('../player').default } Player - */ - /** * The component for a menu item. `
  • ` * @@ -21,7 +17,7 @@ class MenuItem extends ClickableComponent { /** * Creates an instance of the this class. * - * @param {Player} player + * @param { import('../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options={}] diff --git a/src/js/menu/menu.js b/src/js/menu/menu.js index 8b471d34a4..7905e15ad5 100644 --- a/src/js/menu/menu.js +++ b/src/js/menu/menu.js @@ -7,10 +7,6 @@ import * as Dom from '../utils/dom.js'; import * as Events from '../utils/events.js'; import keycode from 'keycode'; -/** - * @typedef { import('../player').default } Player - */ - /** * The Menu component is used to build popup menus, including subtitle and * captions selection menus. @@ -22,7 +18,7 @@ class Menu extends Component { /** * Create an instance of this class. * - * @param {Player} player + * @param { import('../player').default } player * the player that this component should attach to * * @param {Object} [options] diff --git a/src/js/modal-dialog.js b/src/js/modal-dialog.js index e3560f96dd..d8d181ad06 100644 --- a/src/js/modal-dialog.js +++ b/src/js/modal-dialog.js @@ -7,11 +7,6 @@ import window from 'global/window'; import document from 'global/document'; import keycode from 'keycode'; -/** - * @typedef { import('./player').default } Player - * @typedef { import('./utils/dom').ContentDescriptor} ContentDescriptor - */ - const MODAL_CLASS_NAME = 'vjs-modal-dialog'; /** @@ -28,13 +23,13 @@ class ModalDialog extends Component { /** * Create an instance of this class. * - * @param {Player} player + * @param { import('./player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] * The key/value store of player options. * - * @param {ContentDescriptor} [options.content=undefined] + * @param { import('./utils/dom').ContentDescriptor} [options.content=undefined] * Provide customized content for this modal. * * @param {string} [options.description] @@ -325,7 +320,7 @@ class ModalDialog extends Component { * @fires ModalDialog#beforemodalfill * @fires ModalDialog#modalfill * - * @param {ContentDescriptor} [content] + * @param { import('./utils/dom').ContentDescriptor} [content] * The same rules apply to this as apply to the `content` option. */ fillWith(content) { @@ -402,12 +397,12 @@ class ModalDialog extends Component { * This does not update the DOM or fill the modal, but it is called during * that process. * - * @param {ContentDescriptor} [value] + * @param { import('./utils/dom').ContentDescriptor} [value] * If defined, sets the internal content value to be used on the * next call(s) to `fill`. This value is normalized before being * inserted. To "clear" the internal content value, pass `null`. * - * @return {ContentDescriptor} + * @return { import('./utils/dom').ContentDescriptor} * The current content of the modal dialog */ content(value) { diff --git a/src/js/player.js b/src/js/player.js index ef7b357b55..7d42ddd224 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -55,11 +55,6 @@ import './title-bar.js'; // Import Html5 tech, at least for disposing the original video tag. import './tech/html5.js'; -/** - * @typedef { import('./tracks/html-track-element').default } HtmlTrackElement - * @typedef { import('./utils/time').TimeRange } TimeRange - */ - // The following tech events are simply re-triggered // on the player when they happen const TECH_EVENTS_RETRIGGER = [ @@ -2423,7 +2418,7 @@ class Player extends Component { * Get a TimeRange object representing the current ranges of time that the user * has played. * - * @return {TimeRange} + * @return { import('./utils/time').TimeRange } * A time range object that represents all the increments of time that have * been played. */ @@ -2583,7 +2578,7 @@ class Player extends Component { * * @see [Buffered Spec]{@link http://dev.w3.org/html5/spec/video.html#dom-media-buffered} * - * @return {TimeRange} + * @return { import('./utils/time').TimeRange } * A mock {@link TimeRanges} object (following HTML spec) */ buffered() { @@ -4495,7 +4490,7 @@ class Player extends Component { * from the TextTrackList and HtmlTrackElementList * after a source change * - * @return {HtmlTrackElement} + * @return { import('./tracks/html-track-element').default } * the HTMLTrackElement that was created and added * to the HtmlTrackElementList and the remote * TextTrackList diff --git a/src/js/poster-image.js b/src/js/poster-image.js index 3f7e9422a6..a96528a824 100644 --- a/src/js/poster-image.js +++ b/src/js/poster-image.js @@ -6,10 +6,6 @@ import Component from './component.js'; import * as Dom from './utils/dom.js'; import {silencePromise} from './utils/promise'; -/** - * @typedef { import('./player').default } Player - */ - /** * A `ClickableComponent` that handles showing the poster image for the player. * @@ -20,7 +16,7 @@ class PosterImage extends ClickableComponent { /** * Create an instance of this class. * - * @param {Player} player + * @param { import('./player').default } player * The `Player` that this class should attach to. * * @param {Object} [options] diff --git a/src/js/slider/slider.js b/src/js/slider/slider.js index 3ea4181956..828b689659 100644 --- a/src/js/slider/slider.js +++ b/src/js/slider/slider.js @@ -7,11 +7,6 @@ import {IS_CHROME} from '../utils/browser.js'; import {clamp} from '../utils/num.js'; import keycode from 'keycode'; -/** - * @typedef { import('../player').default } Player - * @typedef {import('../event-target').Event} Event - */ - /** * The base functionality for a slider. Can be vertical or horizontal. * For instance the volume bar or the seek bar on a video is a slider. @@ -23,7 +18,7 @@ class Slider extends Component { /** * Create an instance of this class * - * @param {Player} player + * @param { import('../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] @@ -147,7 +142,7 @@ class Slider extends Component { /** * Handle `mousedown` or `touchstart` events on the `Slider`. * - * @param {Event} event + * @param {MouseEvent} event * `mousedown` or `touchstart` event that triggered this function * * @listens mousedown @@ -174,7 +169,7 @@ class Slider extends Component { * Triggered when the slider is in an active state * * @event Slider#slideractive - * @type {Event} + * @type {MouseEvent} */ this.trigger('slideractive'); @@ -192,7 +187,7 @@ class Slider extends Component { * `mousedown` and `touchstart`. This is due to {@link Slider#handleMouseDown} and * {@link Slider#handleMouseUp}. * - * @param {Event} event + * @param {MouseEvent} event * `mousedown`, `mousemove`, `touchstart`, or `touchmove` event that triggered * this function * @param {boolean} mouseDown this is a flag that should be set to true if `handleMouseMove` is called directly. It allows us to skip things that should not happen if coming from mouse down but should happen on regular mouse move handler. Defaults to false. @@ -205,7 +200,7 @@ class Slider extends Component { /** * Handle `mouseup` or `touchend` events on the `Slider`. * - * @param {Event} event + * @param {MouseEvent} event * `mouseup` or `touchend` event that triggered this function. * * @listens touchend @@ -307,7 +302,7 @@ class Slider extends Component { * arrow keys. This function will only be called when the slider has focus. See * {@link Slider#handleFocus} and {@link Slider#handleBlur}. * - * @param {Event} event + * @param {KeyboardEvent} event * the `keydown` event that caused this function to run. * * @listens keydown diff --git a/src/js/tech/loader.js b/src/js/tech/loader.js index c5a99ed9ce..c2c72f35e0 100644 --- a/src/js/tech/loader.js +++ b/src/js/tech/loader.js @@ -6,10 +6,6 @@ import Tech from './tech.js'; import {toTitleCase} from '../utils/str.js'; import {merge} from '../utils/obj.js'; -/** - * @typedef { import('../player').default } Player - */ - /** * The `MediaLoader` is the `Component` that decides which playback technology to load * when a player is initialized. @@ -21,7 +17,7 @@ class MediaLoader extends Component { /** * Create an instance of this class. * - * @param {Player} player + * @param { import('../player').default } player * The `Player` that this class should attach to. * * @param {Object} [options] diff --git a/src/js/tech/middleware.js b/src/js/tech/middleware.js index 2f18a58eda..5eebac619a 100644 --- a/src/js/tech/middleware.js +++ b/src/js/tech/middleware.js @@ -4,11 +4,6 @@ */ import {toTitleCase} from '../utils/str.js'; -/** - * @typedef { import('../player').default } Player - * @typedef { import('../tech/tech').default } Tech - */ - const middlewares = {}; const middlewareInstances = {}; @@ -32,7 +27,7 @@ export const TERMINATOR = {}; * passed in as an argument. * * @callback MiddlewareFactory - * @param {Player} player + * @param { import('../player').default } player * A Video.js player. */ @@ -74,7 +69,7 @@ export function getMiddleware(type) { * matching middlewares and calling `setSource` on each, passing along the * previous returned value each time. * - * @param {Player} player + * @param { import('../player').default } player * A {@link Player} instance. * * @param {Tech~SourceObject} src @@ -93,7 +88,7 @@ export function setSource(player, src, next) { * @param {Object[]} middleware * An array of middleware instances. * - * @param {Tech} tech + * @param { import('../tech/tech').default } tech * A Video.js tech. */ export function setTech(middleware, tech) { @@ -107,7 +102,7 @@ export function setTech(middleware, tech) { * @param {Object[]} middleware * An array of middleware instances. * - * @param {Tech} tech + * @param { import('../tech/tech').default } tech * The current tech. * * @param {string} method @@ -127,7 +122,7 @@ export function get(middleware, tech, method) { * @param {Object[]} middleware * An array of middleware instances. * - * @param {Tech} tech + * @param { import('../tech/tech').default } tech * The current tech. * * @param {string} method @@ -153,7 +148,7 @@ export function set(middleware, tech, method, arg) { * @param {Object[]} middleware * An array of middleware instances. * - * @param {Tech} tech + * @param { import('../tech/tech').default } tech * The current tech. * * @param {string} method @@ -245,7 +240,7 @@ function executeRight(mws, method, value, terminated) { /** * Clear the middleware cache for a player. * - * @param {Player} player + * @param { import('../player').default } player * A {@link Player} instance. */ export function clearCacheForPlayer(player) { diff --git a/src/js/tech/setup-sourceset.js b/src/js/tech/setup-sourceset.js index 3431bdee03..c4d48132cd 100644 --- a/src/js/tech/setup-sourceset.js +++ b/src/js/tech/setup-sourceset.js @@ -3,10 +3,6 @@ import document from 'global/document'; import {merge} from '../utils/obj'; import {getAbsoluteURL} from '../utils/url'; -/** - * @typedef { import('./html5').default } Html5 - */ - /** * This function is used to fire a sourceset when there is something * similar to `mediaEl.load()` being called. It will try to find the source via @@ -14,7 +10,7 @@ import {getAbsoluteURL} from '../utils/url'; * with the source that was found or empty string if we cannot know. If it cannot * find a source then `sourceset` will not be fired. * - * @param {Html5} tech + * @param { import('./html5').default } tech * The tech object that sourceset was setup on * * @return {boolean} diff --git a/src/js/tech/tech.js b/src/js/tech/tech.js index 0a5efd2854..b75ca5217f 100644 --- a/src/js/tech/tech.js +++ b/src/js/tech/tech.js @@ -16,10 +16,6 @@ import {toTitleCase, toLowerCase} from '../utils/str.js'; import vtt from 'videojs-vtt.js'; import * as Guid from '../utils/guid.js'; -/** - * @typedef { import('../utils/time').TimeRange } TimeRange - */ - /** * An Object containing a structure like: `{src: 'url', type: 'mimetype'}` or string * that just contains the src url alone. @@ -279,7 +275,7 @@ class Tech extends Component { /** * Get and create a `TimeRange` object for buffering. * - * @return {TimeRange} + * @return { import('../utils/time').TimeRange } * The time range object that was created. */ buffered() { diff --git a/src/js/tracks/audio-track-list.js b/src/js/tracks/audio-track-list.js index 61f21f1b1c..bddb3023b9 100644 --- a/src/js/tracks/audio-track-list.js +++ b/src/js/tracks/audio-track-list.js @@ -3,10 +3,6 @@ */ import TrackList from './track-list'; -/** - * @typedef { import('./audio-track').default } AudioTrack - */ - /** * Anywhere we call this function we diverge from the spec * as we only support one enabled audiotrack at a time @@ -14,7 +10,7 @@ import TrackList from './track-list'; * @param {AudioTrackList} list * list to work on * - * @param {AudioTrack} track + * @param { import('./audio-track').default } track * The track to skip * * @private @@ -60,7 +56,7 @@ class AudioTrackList extends TrackList { /** * Add an {@link AudioTrack} to the `AudioTrackList`. * - * @param {AudioTrack} track + * @param { import('./audio-track').default } track * The AudioTrack to add to the list * * @fires TrackList#addtrack diff --git a/src/js/tracks/html-track-element.js b/src/js/tracks/html-track-element.js index 6d5fdf21b6..e9502ed8bb 100644 --- a/src/js/tracks/html-track-element.js +++ b/src/js/tracks/html-track-element.js @@ -5,10 +5,6 @@ import EventTarget from '../event-target'; import TextTrack from '../tracks/text-track'; -/** - * @typedef { import('../tech/tech').default } Tech - */ - /** * A single track represented in the DOM. * @@ -23,7 +19,7 @@ class HTMLTrackElement extends EventTarget { * @param {Object} options={} * Object of option names and values * - * @param {Tech} options.tech + * @param { import('../tech/tech').default } options.tech * A reference to the tech that owns this HTMLTrackElement. * * @param {TextTrack~Kind} [options.kind='subtitles'] diff --git a/src/js/tracks/text-track-display.js b/src/js/tracks/text-track-display.js index b271eb1686..c16350aead 100644 --- a/src/js/tracks/text-track-display.js +++ b/src/js/tracks/text-track-display.js @@ -6,11 +6,6 @@ import * as Fn from '../utils/fn.js'; import * as Dom from '../utils/dom.js'; import window from 'global/window'; -/** - * @typedef { import('./player').default } Player - * @typedef { import('./tech/tech').default } Tech - */ - const darkGray = '#222'; const lightGray = '#ccc'; const fontMap = { @@ -92,7 +87,7 @@ class TextTrackDisplay extends Component { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/tracks/text-track-list-converter.js b/src/js/tracks/text-track-list-converter.js index e6dc96db79..f608ecbac2 100644 --- a/src/js/tracks/text-track-list-converter.js +++ b/src/js/tracks/text-track-list-converter.js @@ -5,10 +5,6 @@ * @module text-track-list-converter */ -/** - * @typedef { import('../tech/tech').default } Tech - */ - /** * Examine a single {@link TextTrack} and return a JSON-compatible javascript object that * represents the {@link TextTrack}'s state. @@ -50,7 +46,7 @@ const trackToJson_ = function(track) { * state of all {@link TextTrack}s currently configured. The return array is compatible with * {@link text-track-list-converter:jsonToTextTracks}. * - * @param {Tech} tech + * @param { import('../tech/tech').default } tech * The tech object to query * * @return {Array} diff --git a/src/js/tracks/text-track-list.js b/src/js/tracks/text-track-list.js index f9edc076ae..92af54d35a 100644 --- a/src/js/tracks/text-track-list.js +++ b/src/js/tracks/text-track-list.js @@ -3,10 +3,6 @@ */ import TrackList from './track-list'; -/** - * @typedef { import('./text-track').default } TextTrack - */ - /** * The current list of {@link TextTrack} for a media file. * @@ -18,7 +14,7 @@ class TextTrackList extends TrackList { /** * Add a {@link TextTrack} to the `TextTrackList` * - * @param {TextTrack} track + * @param { import('./text-track').default } track * The text track to add to the list. * * @fires TrackList#addtrack diff --git a/src/js/tracks/text-track-settings.js b/src/js/tracks/text-track-settings.js index 350dbed35f..298fdd02f5 100644 --- a/src/js/tracks/text-track-settings.js +++ b/src/js/tracks/text-track-settings.js @@ -8,10 +8,6 @@ import {createEl} from '../utils/dom'; import * as Obj from '../utils/obj'; import log from '../utils/log'; -/** - * @typedef { import('../player').default } Player - */ - const LOCAL_STORAGE_KEY = 'vjs-text-track-settings'; const COLOR_BLACK = ['#000', 'Black']; @@ -247,7 +243,7 @@ class TextTrackSettings extends ModalDialog { /** * Creates an instance of this class. * - * @param {Player} player + * @param { import('../player').default } player * The `Player` that this class should be attached to. * * @param {Object} [options] diff --git a/src/js/tracks/text-track.js b/src/js/tracks/text-track.js index 73eb6cde1b..dee5688051 100644 --- a/src/js/tracks/text-track.js +++ b/src/js/tracks/text-track.js @@ -11,10 +11,6 @@ import { isCrossOrigin } from '../utils/url.js'; import XHR from '@videojs/xhr'; import {merge} from '../utils/obj'; -/** - * @typedef { import('../tech/tech').default } Tech - */ - /** * Takes a webvtt file contents and parses it into cues * @@ -132,7 +128,7 @@ class TextTrack extends Track { * @param {Object} options={} * Object of option names and values * - * @param {Tech} options.tech + * @param { import('../tech/tech').default } options.tech * A reference to the tech that owns this TextTrack. * * @param {TextTrack~Kind} [options.kind='subtitles'] diff --git a/src/js/tracks/track-list.js b/src/js/tracks/track-list.js index 371a955afc..a1d2b33506 100644 --- a/src/js/tracks/track-list.js +++ b/src/js/tracks/track-list.js @@ -4,10 +4,6 @@ import EventTarget from '../event-target'; import {isEvented} from '../mixins/evented'; -/** - * @typedef { import('./track').default } Track - */ - /** * Common functionaliy between {@link TextTrackList}, {@link AudioTrackList}, and * {@link VideoTrackList} @@ -18,7 +14,7 @@ class TrackList extends EventTarget { /** * Create an instance of this class * - * @param {Track[]} tracks + * @param { import('./track').default[] } tracks * A list of tracks to initialize the list with. * * @abstract @@ -48,7 +44,7 @@ class TrackList extends EventTarget { /** * Add a {@link Track} to the `TrackList` * - * @param {Track} track + * @param { import('./track').default } track * The audio, video, or text track to add to the list. * * @fires TrackList#addtrack @@ -106,7 +102,7 @@ class TrackList extends EventTarget { /** * Remove a {@link Track} from the `TrackList` * - * @param {Track} rtrack + * @param { import('./track').default } rtrack * The audio, video, or text track to remove from the list. * * @fires TrackList#removetrack @@ -151,7 +147,7 @@ class TrackList extends EventTarget { * * @param {string} id - the id of the track to get * @method getTrackById - * @return {Track} + * @return { import('./track').default } * @private */ getTrackById(id) { diff --git a/src/js/tracks/video-track-list.js b/src/js/tracks/video-track-list.js index 7d46a16c90..518e3d73bd 100644 --- a/src/js/tracks/video-track-list.js +++ b/src/js/tracks/video-track-list.js @@ -3,17 +3,13 @@ */ import TrackList from './track-list'; -/** - * @typedef { import('./video-track').default } VideoTrack - */ - /** * Un-select all other {@link VideoTrack}s that are selected. * * @param {VideoTrackList} list * list to work on * - * @param {VideoTrack} track + * @param { import('./video-track').default } track * The track to skip * * @private @@ -75,7 +71,7 @@ class VideoTrackList extends TrackList { /** * Add a {@link VideoTrack} to the `VideoTrackList`. * - * @param {VideoTrack} track + * @param { import('./video-track').default } track * The VideoTrack to add to the list * * @fires TrackList#addtrack diff --git a/src/js/utils/buffer.js b/src/js/utils/buffer.js index f147e92273..8e5c18585f 100644 --- a/src/js/utils/buffer.js +++ b/src/js/utils/buffer.js @@ -4,14 +4,10 @@ */ import { createTimeRange } from './time.js'; -/** - * @typedef { import('./time').TimeRange } TimeRange - */ - /** * Compute the percentage of the media that has been buffered. * - * @param {TimeRange} buffered + * @param { import('./time').TimeRange } buffered * The current `TimeRanges` object representing buffered time ranges * * @param {number} duration diff --git a/src/js/utils/create-logger.js b/src/js/utils/create-logger.js index d742398a99..8954c5287a 100644 --- a/src/js/utils/create-logger.js +++ b/src/js/utils/create-logger.js @@ -91,7 +91,7 @@ export default function createLogger(name) { * `undefined` * * @namespace - * @param {(*|*[])} args + * @param {...*} args * One or more messages or objects that should be logged. */ const log = function(...args) { @@ -226,7 +226,7 @@ export default function createLogger(name) { /** * Logs error messages. Similar to `console.error`. * - * @param {(*|*[])} args + * @param {...*} args * One or more messages or objects that should be logged as an error */ log.error = (...args) => logByType('error', level, args); @@ -234,7 +234,7 @@ export default function createLogger(name) { /** * Logs warning messages. Similar to `console.warn`. * - * @param {(*|*[])} args + * @param {...*} args * One or more messages or objects that should be logged as a warning. */ log.warn = (...args) => logByType('warn', level, args); @@ -243,7 +243,7 @@ export default function createLogger(name) { * Logs debug messages. Similar to `console.debug`, but may also act as a comparable * log if `console.debug` is not available * - * @param {(*|*[])} args + * @param {...*} args * One or more messages or objects that should be logged as debug. */ log.debug = (...args) => logByType('debug', level, args); diff --git a/src/js/utils/filter-source.js b/src/js/utils/filter-source.js index de77c54ee1..7cfe021206 100644 --- a/src/js/utils/filter-source.js +++ b/src/js/utils/filter-source.js @@ -4,10 +4,6 @@ import {isObject} from './obj'; import {getMimetype} from './mimetypes'; -/** - * @typedef { import('../tech/tech').default } Tech - */ - /** * Filter out single bad source objects or multiple source objects in an * array. Also flattens nested source object arrays into a 1 dimensional diff --git a/src/js/utils/mimetypes.js b/src/js/utils/mimetypes.js index 2bf701279e..d593e2fd9e 100644 --- a/src/js/utils/mimetypes.js +++ b/src/js/utils/mimetypes.js @@ -1,9 +1,5 @@ import * as Url from '../utils/url.js'; -/** - * @typedef { import('../player').default } Player - */ - /** * Mimetypes * @@ -55,7 +51,7 @@ export const getMimetype = function(src = '') { * Find the mime type of a given source string if possible. Uses the player * source cache. * - * @param {Player} player + * @param { import('../player').default } player * The player object * * @param {string} src