Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[Video] TEMP disable skip compression (#5271)

authored by

Samuel Newman and committed by
GitHub
a19c91d9 580b67ba

+9 -9
+9 -9
src/lib/media/video/compress.ts
··· 1 1 import {getVideoMetaData, Video} from 'react-native-compressor' 2 2 import {ImagePickerAsset} from 'expo-image-picker' 3 3 4 - import {SUPPORTED_MIME_TYPES, SupportedMimeTypes} from '#/lib/constants' 4 + // import {SUPPORTED_MIME_TYPES, SupportedMimeTypes} from '#/lib/constants' 5 5 import {extToMime} from '#/state/queries/video/util' 6 6 import {CompressedVideo} from './types' 7 7 8 - const MIN_SIZE_FOR_COMPRESSION = 1024 * 1024 * 25 // 25mb 8 + // const MIN_SIZE_FOR_COMPRESSION = 1024 * 1024 * 25 // 25mb 9 9 10 10 export async function compressVideo( 11 11 file: ImagePickerAsset, ··· 16 16 ): Promise<CompressedVideo> { 17 17 const {onProgress, signal} = opts || {} 18 18 19 - const isAcceptableFormat = SUPPORTED_MIME_TYPES.includes( 20 - file.mimeType as SupportedMimeTypes, 21 - ) 19 + // const isAcceptableFormat = SUPPORTED_MIME_TYPES.includes( 20 + // file.mimeType as SupportedMimeTypes, 21 + // ) 22 22 23 - const minimumFileSizeForCompress = isAcceptableFormat 24 - ? MIN_SIZE_FOR_COMPRESSION 25 - : 0 23 + // const minimumFileSizeForCompress = isAcceptableFormat 24 + // ? MIN_SIZE_FOR_COMPRESSION 25 + // : 0 26 26 27 27 const compressed = await Video.compress( 28 28 file.uri, ··· 30 30 compressionMethod: 'manual', 31 31 bitrate: 3_000_000, // 3mbps 32 32 maxSize: 1920, 33 - minimumFileSizeForCompress, 33 + // minimumFileSizeForCompress, 34 34 getCancellationId: id => { 35 35 if (signal) { 36 36 signal.addEventListener('abort', () => {