From 1b02cc7c269dc197ba2c76bb2018ca74ffe4b454 Mon Sep 17 00:00:00 2001 From: Tuan Pham Date: Thu, 11 Apr 2024 10:12:20 -0500 Subject: [PATCH] fix: update preview screen to configure and start camera session --- .../Views/GetReadyPage/CameraPreviewViewModel.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/FaceLiveness/Views/GetReadyPage/CameraPreviewViewModel.swift b/Sources/FaceLiveness/Views/GetReadyPage/CameraPreviewViewModel.swift index 5a9bcbc8..db408664 100644 --- a/Sources/FaceLiveness/Views/GetReadyPage/CameraPreviewViewModel.swift +++ b/Sources/FaceLiveness/Views/GetReadyPage/CameraPreviewViewModel.swift @@ -33,7 +33,8 @@ class CameraPreviewViewModel: NSObject, ObservableObject { ) do { - try previewCaptureSession?.startSession() + try previewCaptureSession?.configureCamera() + previewCaptureSession?.startSession() } catch { Amplify.Logging.default.error("Error starting preview capture session with error: \(error)") }