mirror of
https://github.com/videojs/video.js.git
synced 2025-01-10 23:30:03 +02:00
fix(types): Add jsdoc plugin to handle ts-style imports (#8225)
This commit is contained in:
parent
629000bc8c
commit
61bd74de8d
@ -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"
|
||||
],
|
||||
|
277
package-lock.json
generated
277
package-lock.json
generated
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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.
|
||||
*
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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={}]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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() {
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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={}]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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={}]
|
||||
|
@ -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]
|
||||
|
@ -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={}]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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={}]
|
||||
|
@ -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. `<li>`
|
||||
*
|
||||
@ -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={}]
|
||||
|
@ -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]
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
|
@ -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]
|
||||
|
@ -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) {
|
||||
|
@ -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}
|
||||
|
@ -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() {
|
||||
|
@ -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
|
||||
|
@ -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']
|
||||
|
@ -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]
|
||||
|
@ -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}
|
||||
|
@ -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
|
||||
|
@ -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]
|
||||
|
@ -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']
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user