fix: Fix torch staying on after recording a video (#584)

This commit is contained in:
Marc Rousavy 2021-12-10 09:57:05 +01:00 committed by GitHub
parent 1249cde337
commit 6319e5cc49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,6 +72,10 @@ extension CameraView: AVCaptureVideoDataOutputSampleBufferDelegate, AVCaptureAud
self.deactivateAudioSession()
}
}
if options["flash"] != nil {
// Set torch mode back to what it was before if we used it for the video flash.
self.setTorchMode(self.torch)
}
}
self.isRecording = false