diff --git a/resources/views/fields/camera-capture.blade.php b/resources/views/fields/camera-capture.blade.php
index a852c64..415a0bb 100644
--- a/resources/views/fields/camera-capture.blade.php
+++ b/resources/views/fields/camera-capture.blade.php
@@ -729,6 +729,7 @@ function cameraCapture() {
Switch Camera
+ Retake
Capture Photo
Verify
@@ -839,7 +840,7 @@ function cameraCapture() {
// this.stopDetection();
// },
-capturePhoto() {
+ capturePhoto() {
const video = this.$refs.video;
const canvas = this.$refs.canvas;
const snapshot = this.$refs.snapshot;
@@ -932,6 +933,14 @@ capturePhoto() {
}
},
+
+ async retakePhoto() {
+ this.photoTaken = false;
+ this.$refs.snapshot.classList.add('hidden');
+ this.$refs.video.classList.remove('hidden');
+ await this.initCamera();
+ },
+
startDetection() {
if (this.textDetectionInterval) clearInterval(this.textDetectionInterval);
this.textDetectionInterval = setInterval(() => this.detectText(), 1000);