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

'continuous' doesn't stop when granite-qrcode-scanner is disconnected #19

Open
davidmaxwaterman opened this issue Sep 11, 2019 · 3 comments

Comments

@davidmaxwaterman
Copy link

If the element with continuous set is disconnected, some internals of the scanner aren't stopped, and there is continuous console output.

I suggest adding a disconnectedCallback() to set the active and continuous options to false - that seems to work in my experiments, but perhaps there's a 'better' way if you have more knowledge of the internals. For now, I can add these to the disconnectedCallback() in my element (since it is also removed).

@LostInBrittany
Copy link
Owner

LostInBrittany commented Sep 11, 2019 via email

@syampillai
Copy link

Is this issue resolved?
I think, in order to switch off the camera, the stream should be closed.
stream.getTracks().forEach( t=> { t.stop(); });

@davidmaxwaterman
Copy link
Author

I'm not able to look at this in the foreseeable future.

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

3 participants