diff options
author | Samuel Newman <mozzius@protonmail.com> | 2025-03-06 19:49:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-06 11:49:51 -0800 |
commit | 153fc17676cf9301e0f066e3c280da83821a6a63 (patch) | |
tree | 732c6805267ff87d5c656af59cfeaf7956af5634 /src/lib/media | |
parent | 8eb1f8f1fc0d80635ac2f78d87adc73a3862ca3f (diff) | |
download | voidsky-153fc17676cf9301e0f066e3c280da83821a6a63.tar.zst |
tweak ci (#7916)
Diffstat (limited to 'src/lib/media')
-rw-r--r-- | src/lib/media/video/compress.web.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/media/video/compress.web.ts b/src/lib/media/video/compress.web.ts index c64a147c5..995fbf1da 100644 --- a/src/lib/media/video/compress.web.ts +++ b/src/lib/media/video/compress.web.ts @@ -1,10 +1,9 @@ import {ImagePickerAsset} from 'expo-image-picker' +import {VIDEO_MAX_SIZE} from '#/lib/constants' import {VideoTooLargeError} from '#/lib/media/video/errors' import {CompressedVideo} from './types' -const MAX_VIDEO_SIZE = 1000 * 1000 * 50 // 50mb - // doesn't actually compress, converts to ArrayBuffer export async function compressVideo( asset: ImagePickerAsset, @@ -17,7 +16,7 @@ export async function compressVideo( const blob = base64ToBlob(base64, mimeType) const uri = URL.createObjectURL(blob) - if (blob.size > MAX_VIDEO_SIZE) { + if (blob.size > VIDEO_MAX_SIZE) { throw new VideoTooLargeError() } |