modified logic in ocr
This commit is contained in:
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user