diff --git a/resources/views/fields/camera-capture.blade.php b/resources/views/fields/camera-capture.blade.php index 7f7a120..397f923 100644 --- a/resources/views/fields/camera-capture.blade.php +++ b/resources/views/fields/camera-capture.blade.php @@ -792,14 +792,21 @@ function cameraCapture() { canvas.height = video.videoHeight; ctx.drawImage(video, 0, 0); + // const snapshotData = canvas.toDataURL('image/png'); + // this.$refs.hiddenInput.value = snapshotData; + // this.capturedPhoto = snapshotData; // store for verification const snapshotData = canvas.toDataURL('image/png'); this.$refs.hiddenInput.value = snapshotData; - this.capturedPhoto = snapshotData; // store for verification + this.capturedPhoto = snapshotData; // Stop camera stream if (this.stream) this.stream.getTracks().forEach(track => track.stop()); - snapshot.src = dataUrl; + // snapshot.src = dataUrl; + // snapshot.classList.remove('hidden'); + // video.classList.add('hidden'); + const snapshot = this.$refs.snapshot; + snapshot.src = snapshotData; snapshot.classList.remove('hidden'); video.classList.add('hidden');