diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-09-10 01:01:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-09 17:01:40 -0700 |
commit | 436e30fdedb4fd7a1ad462e5c37f4d6eefe8b4ae (patch) | |
tree | ebabbd93de8c2fdca0c12c3777a54ea8c285ab77 /src/lib/media | |
parent | 723a5e488eab40eac63a1983fc8cbbfa3992b3e7 (diff) | |
download | voidsky-436e30fdedb4fd7a1ad462e5c37f4d6eefe8b4ae.tar.zst |
[Video] use correct max size (#5245)
Co-authored-by: Hailey <me@haileyok.com>
Diffstat (limited to 'src/lib/media')
-rw-r--r-- | src/lib/media/video/compress.web.ts | 4 | ||||
-rw-r--r-- | src/lib/media/video/errors.ts | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/media/video/compress.web.ts b/src/lib/media/video/compress.web.ts index 34d69267d..7f057d2ea 100644 --- a/src/lib/media/video/compress.web.ts +++ b/src/lib/media/video/compress.web.ts @@ -3,9 +3,9 @@ import {ImagePickerAsset} from 'expo-image-picker' import {VideoTooLargeError} from 'lib/media/video/errors' import {CompressedVideo} from './types' -const MAX_VIDEO_SIZE = 1024 * 1024 * 100 // 100MB +const MAX_VIDEO_SIZE = 1024 * 1024 * 50 // 50mb -// doesn't actually compress, but throws if >100MB +// doesn't actually compress, converts to ArrayBuffer export async function compressVideo( asset: ImagePickerAsset, _opts?: { diff --git a/src/lib/media/video/errors.ts b/src/lib/media/video/errors.ts index 1c55a9ee9..5d91758c7 100644 --- a/src/lib/media/video/errors.ts +++ b/src/lib/media/video/errors.ts @@ -1,6 +1,6 @@ export class VideoTooLargeError extends Error { constructor() { - super('Videos cannot be larger than 100MB') + super('Videos cannot be larger than 50mb') this.name = 'VideoTooLargeError' } } |