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() {