diff options
Diffstat (limited to 'ext/js/media')
-rw-r--r-- | ext/js/media/media-util.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/js/media/media-util.js b/ext/js/media/media-util.js index 78668471..582b13a2 100644 --- a/ext/js/media/media-util.js +++ b/ext/js/media/media-util.js @@ -22,8 +22,8 @@ class MediaUtil { /** * Gets the file extension of a file path. URL search queries and hash * fragments are not handled. - * @param path The path to the file. - * @returns The file extension, including the '.', or an empty string + * @param {string} path The path to the file. + * @returns {string} The file extension, including the '.', or an empty string * if there is no file extension. */ static getFileNameExtension(path) { @@ -33,9 +33,9 @@ class MediaUtil { /** * Gets an image file's media type using a file path. - * @param path The path to the file. - * @returns The media type string if it can be determined from the file path, - * otherwise null. + * @param {string} path The path to the file. + * @returns {?string} The media type string if it can be determined from the file path, + * otherwise `null`. */ static getImageMediaTypeFromFileName(path) { switch (this.getFileNameExtension(path).toLowerCase()) { @@ -70,9 +70,9 @@ class MediaUtil { /** * Gets the file extension for a corresponding media type. - * @param mediaType The media type to use. - * @returns A file extension including the dot for the media type, - * otherwise null. + * @param {string} mediaType The media type to use. + * @returns {?string} A file extension including the dot for the media type, + * otherwise `null`. */ static getFileExtensionFromImageMediaType(mediaType) { switch (mediaType) { @@ -101,9 +101,9 @@ class MediaUtil { /** * Gets the file extension for a corresponding media type. - * @param mediaType The media type to use. - * @returns A file extension including the dot for the media type, - * otherwise null. + * @param {string} mediaType The media type to use. + * @returns {string} A file extension including the dot for the media type, + * otherwise `null`. */ static getFileExtensionFromAudioMediaType(mediaType) { switch (mediaType) { |