From 095aac22705f546d0646c8709db1f878e642b2bf Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Sat, 18 Oct 2025 09:51:31 +0530 Subject: [PATCH] Changed logic in ocr for capture --- resources/views/fields/camera-capture.blade.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/views/fields/camera-capture.blade.php b/resources/views/fields/camera-capture.blade.php index 23148fe..80615f4 100644 --- a/resources/views/fields/camera-capture.blade.php +++ b/resources/views/fields/camera-capture.blade.php @@ -203,6 +203,7 @@ document.addEventListener('DOMContentLoaded', () => { try { this.stream = await navigator.mediaDevices.getUserMedia({ video: { + facingMode: this.currentFacingMode, // 'user' or 'environment' width: { ideal: 1920 }, height: { ideal: 1080 }, }, @@ -215,6 +216,7 @@ document.addEventListener('DOMContentLoaded', () => { } + async switchCamera() { this.currentFacingMode = this.currentFacingMode === 'user' ? 'environment' : 'user'; await this.initCamera();