diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-11-22 17:58:29 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-22 17:58:29 +0000 |
commit | 378107492194a5f408747790015c4ca1d624302b (patch) | |
tree | e12e121265d081b49c50d7cd0cc5f71c5f477bf7 /src/lib/media | |
parent | 76ca72cf727e926101ec60eb232f0797e6584b49 (diff) | |
download | voidsky-378107492194a5f408747790015c4ca1d624302b.tar.zst |
Add gif support to web (#6433)
* add gif support to web * rm set dimensions * rm effect from preview * rm log * rm use of {cause: error} * fix lint
Diffstat (limited to 'src/lib/media')
-rw-r--r-- | src/lib/media/video/util.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/media/video/util.ts b/src/lib/media/video/util.ts index 87b422c2c..b80e0a4a1 100644 --- a/src/lib/media/video/util.ts +++ b/src/lib/media/video/util.ts @@ -32,6 +32,8 @@ export function mimeToExt(mimeType: SupportedMimeTypes | (string & {})) { return 'mpeg' case 'video/quicktime': return 'mov' + case 'image/gif': + return 'gif' default: throw new Error(`Unsupported mime type: ${mimeType}`) } @@ -47,6 +49,8 @@ export function extToMime(ext: string) { return 'video/mpeg' case 'mov': return 'video/quicktime' + case 'gif': + return 'image/gif' default: throw new Error(`Unsupported file extension: ${ext}`) } |