diff options
Diffstat (limited to 'src/utils/camera.ts')
-rw-r--r-- | src/utils/camera.ts | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/utils/camera.ts b/src/utils/camera.ts index ccdd42b0..f95499a5 100644 --- a/src/utils/camera.ts +++ b/src/utils/camera.ts @@ -8,10 +8,9 @@ import { TakePictureOptions, TakePictureResponse, } from 'react-native-camera'; -import {ProcessingManager} from 'react-native-video-processing'; + import ImagePicker, {ImageOrVideo, Video} from 'react-native-image-crop-picker'; import {ERROR_UPLOAD} from '../constants/strings'; -import RNFetchBlob from 'rn-fetch-blob'; /* * Captures a photo and pauses to show the preview of the picture taken @@ -69,9 +68,6 @@ export const navigateToImagePicker = ( mediaType: 'any', }) .then((media) => { - const path: String = getVideoPath(media); - ProcessingManager.compress(path, options.compress) // like VideoPlayer compress options - .then((data: any) => console.log(data)); callback(media); }) .catch((err) => { @@ -81,19 +77,12 @@ export const navigateToImagePicker = ( }); }; -const getVideoPath = (uri) => { - console.log(uri); - return uri.path; -}; - export const navigateToVideoPicker = (callback: (vid: Video) => void) => { ImagePicker.openPicker({ mediaType: 'video', }) .then(async (vid) => { if (vid.path) { - ProcessingManager.compress(vid.path, options.compress) // like VideoPlayer compress options - .then((data: any) => console.log(data)); callback(vid); } }) |