diff options
Diffstat (limited to 'src/utils/camera.ts')
-rw-r--r-- | src/utils/camera.ts | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/utils/camera.ts b/src/utils/camera.ts index 9e37d62e..c0b0c6bf 100644 --- a/src/utils/camera.ts +++ b/src/utils/camera.ts @@ -9,7 +9,7 @@ import { TakePictureResponse, } from 'react-native-camera'; import {ProcessingManager} from 'react-native-video-processing'; -import ImagePicker, {ImageOrVideo, Video} from 'react-native-image-crop-picker'; +import ImagePicker, {ImageOrVideo} from 'react-native-image-crop-picker'; import {ERROR_UPLOAD} from '../constants/strings'; /* @@ -66,6 +66,7 @@ export const navigateToImagePicker = ( 'UserLibrary', ], mediaType: 'any', + compressVideoPreset: 'Passthrough', }) .then((media) => { callback(media); @@ -77,22 +78,6 @@ export const navigateToImagePicker = ( }); }; -export const navigateToVideoPicker = (callback: (vid: Video) => void) => { - ImagePicker.openPicker({ - mediaType: 'video', - }) - .then(async (vid) => { - if (vid.path) { - callback(vid); - } - }) - .catch((err) => { - if (err.code && err.code !== 'E_PICKER_CANCELLED') { - Alert.alert(ERROR_UPLOAD); - } - }); -}; - export const showGIFFailureAlert = (onSuccess: () => void) => Alert.alert( 'Warning', |