Open davidmaxwaterman opened 5 years ago
Going to look at that, thanks :)
On Wed, Sep 11, 2019 at 9:22 AM Max Waterman notifications@github.com wrote:
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).
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/LostInBrittany/granite-qrcode-scanner/issues/19?email_source=notifications&email_token=AAFRLTAWAM3Z37LUQYAU36TQJCMFBA5CNFSM4IVQHS2KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HKUJAUA, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFRLTE63P5XKRXWSGERAD3QJCMFBANCNFSM4IVQHS2A .
Is this issue resolved? I think, in order to switch off the camera, the stream should be closed. stream.getTracks().forEach( t=> { t.stop(); });
I'm not able to look at this in the foreseeable future.
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).