Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 18 - Download of .wasm file cancelled when there is a camera + camera freeze #77

Open
KoenVerhulst opened this issue Nov 29, 2024 · 1 comment

Comments

@KoenVerhulst
Copy link

KoenVerhulst commented Nov 29, 2024

Hi,

on a company managed device (macbook pro) I'm unable to get the ngx-scanner-qrcode working. Whenever the camera is available, my network tab shows that the download of the .wasm file was canceled.

On a personal iPad (pro) the camera is working and scanning qr codes. However, the camera freezes after a while and stops scanning.

The main difference with the application on github is that I'm using angular 18 (with standalone components) and I start the camera directly after view init:

ngAfterViewInit(): void { this.action.isReady.subscribe((res: any) => { this.handle(this.action, 'start'); }); }

I also pass the camera on scan:

public onEvent(e: ScannerQRCodeResult[], action?: any): void { e && action && action.pause(); this.onCodeResult(e[0].value) }

and resume after processing an API call:

this.qrService.scanQr(resultString).pipe(finalize(()=> { this.resumeCamera(); })).subscribe ...

private resumeCamera() { this.timerId = setTimeout(() => { this.action.play(); }, 1000) }

Are there any known issues with angular 18?

Also, what is the purpose of this:

// Necessary to solve the problem of losing internet connection LOAD_WASM('assets/wasm/ngx-scanner-qrcode.wasm').subscribe(res => { console.log('LOAD_WASM -V4',res) });

@KoenVerhulst
Copy link
Author

KoenVerhulst commented Nov 30, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant