From 54ca15a4d68d107be767938a83612843db2d04c2 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Fri, 6 Aug 2021 19:13:50 -0400 Subject: Add pause preview, Cleanup logics --- src/utils/camera.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils') diff --git a/src/utils/camera.ts b/src/utils/camera.ts index ec2615de..5f02f653 100644 --- a/src/utils/camera.ts +++ b/src/utils/camera.ts @@ -24,11 +24,11 @@ export const takePicture = ( callback: (pic: TakePictureResponse) => void, ) => { if (cameraRef !== null) { + cameraRef.current?.pausePreview(); const options: TakePictureOptions = { forceUpOrientation: true, orientation: 'portrait', writeExif: false, - pauseAfterCapture: true, }; cameraRef.current?.takePictureAsync(options).then((pic) => { callback(pic); -- cgit v1.2.3-70-g09d2