Added logic in camera in ocr
This commit is contained in:
@@ -837,15 +837,15 @@ function cameraCapture() {
|
||||
this.$refs.hiddenInput.value = snapshotData;
|
||||
this.capturedPhoto = snapshotData;
|
||||
|
||||
// Stop the camera stream
|
||||
if (this.stream) this.stream.getTracks().forEach(track => track.stop());
|
||||
|
||||
// ✅ Hide video + overlay, show captured snapshot
|
||||
// ✅ Hide live video immediately → prevents black frame
|
||||
video.classList.add('hidden');
|
||||
overlay.classList.add('hidden');
|
||||
|
||||
// Stop camera stream after hide
|
||||
if (this.stream) this.stream.getTracks().forEach(track => track.stop());
|
||||
|
||||
snapshot.src = snapshotData;
|
||||
snapshot.classList.remove('hidden');
|
||||
|
||||
this.stopDetection();
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user