modified logic in ocr

This commit is contained in:
dhanabalan
2025-10-27 09:57:28 +05:30
parent 0cfe16c203
commit a24218bc3f

View File

@@ -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');