diff options
author | Ivan Chen <ivan@tagg.id> | 2021-07-16 15:34:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-16 15:34:38 -0400 |
commit | 6c76dca48244ed01dca2d2f81a4dce5f95c5a08a (patch) | |
tree | 750422383fa88ae309182db77dc53056f0a77bb2 /src/utils/camera.ts | |
parent | 17ac3b21f6db0107d3c5eeb8885884fa8cfa5a72 (diff) | |
parent | 6c7a8531bd133e4e58ac2d3463800d7f7cac4e31 (diff) |
Merge pull request #508 from brian-tagg/tma987-crop-loading-indicator
[TMA-987] Crop Loading Indicator
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', |