fix(android): stop preview if pauseAfterCapture is set to true (#1933)
Fixes #1930
This commit is contained in:
parent
bc3d86a686
commit
71b10c1ac8
@ -410,10 +410,15 @@ class Camera1 extends CameraViewImpl implements MediaRecorder.OnInfoListener,
|
||||
if (options.hasKey("pauseAfterCapture") && !options.getBoolean("pauseAfterCapture")) {
|
||||
camera.startPreview();
|
||||
mIsPreviewActive = true;
|
||||
if (mIsScanning) {
|
||||
camera.setPreviewCallback(Camera1.this);
|
||||
}
|
||||
}else{
|
||||
camera.stopPreview();
|
||||
mIsPreviewActive = false;
|
||||
camera.setPreviewCallback(null);
|
||||
}
|
||||
if (mIsScanning) {
|
||||
camera.setPreviewCallback(Camera1.this);
|
||||
}
|
||||
|
||||
mCallback.onPictureTaken(data);
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user