From 0cfe16c203aff7b16cc74322fd88ef26f52effb5 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Mon, 27 Oct 2025 09:53:49 +0530 Subject: [PATCH] Added capture photo in ocr --- resources/views/fields/camera-capture.blade.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/views/fields/camera-capture.blade.php b/resources/views/fields/camera-capture.blade.php index edf4269..7f7a120 100644 --- a/resources/views/fields/camera-capture.blade.php +++ b/resources/views/fields/camera-capture.blade.php @@ -796,9 +796,15 @@ function cameraCapture() { this.$refs.hiddenInput.value = snapshotData; this.capturedPhoto = snapshotData; // store for verification + // Stop camera stream + if (this.stream) this.stream.getTracks().forEach(track => track.stop()); + + snapshot.src = dataUrl; + snapshot.classList.remove('hidden'); + video.classList.add('hidden'); + alert("Photo captured!"); this.stopDetection(); - }, async verifyPhoto() {