Changed logic in ocr for capture
This commit is contained in:
@@ -203,6 +203,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
try {
|
||||
this.stream = await navigator.mediaDevices.getUserMedia({
|
||||
video: {
|
||||
facingMode: this.currentFacingMode, // 'user' or 'environment'
|
||||
width: { ideal: 1920 },
|
||||
height: { ideal: 1080 },
|
||||
},
|
||||
@@ -215,6 +216,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
|
||||
|
||||
|
||||
async switchCamera() {
|
||||
this.currentFacingMode = this.currentFacingMode === 'user' ? 'environment' : 'user';
|
||||
await this.initCamera();
|
||||
|
||||
Reference in New Issue
Block a user