allow toggling flashlight during recording too
This commit is contained in:
parent
f83a841ae4
commit
40bc253bd8
|
@ -831,7 +831,7 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun checkFlashlight() {
|
override fun checkFlashlight() {
|
||||||
if (mCameraState == STATE_PREVIEW && mIsFlashSupported) {
|
if ((mCameraState == STATE_PREVIEW || mCameraState == STATE_RECORDING) && mIsFlashSupported) {
|
||||||
setFlashAndExposure(mPreviewRequestBuilder!!)
|
setFlashAndExposure(mPreviewRequestBuilder!!)
|
||||||
mPreviewRequest = mPreviewRequestBuilder!!.build()
|
mPreviewRequest = mPreviewRequestBuilder!!.build()
|
||||||
mCaptureSession?.setRepeatingRequest(mPreviewRequest, mCaptureCallback, mBackgroundHandler)
|
mCaptureSession?.setRepeatingRequest(mPreviewRequest, mCaptureCallback, mBackgroundHandler)
|
||||||
|
@ -839,8 +839,7 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun deviceOrientationChanged() {
|
override fun deviceOrientationChanged() {}
|
||||||
}
|
|
||||||
|
|
||||||
override fun resumeCamera() = true
|
override fun resumeCamera() = true
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue