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

Race condition when the reset function is being called shortly after calling decodeOnceFromVideoDevice() #589

Open
purquijo opened this issue Feb 12, 2024 · 3 comments

Comments

@purquijo
Copy link

purquijo commented Feb 12, 2024

While using the BrowserCoderReader, if the reset function is invoked shortly after calling decodeOnceFromVideoDevice(), it occurs before the initialization of the variable this.stream. Consequently, the streams are inadequately terminated (stopStreams()), leading to the persistence of the camera being active. Is there a solution to this issue? If this.stream is initialized at the beginning, the problem should be resolved.

@purquijo purquijo added the bug label Feb 12, 2024
@gyto23
Copy link

gyto23 commented Feb 12, 2024

@purquijo maybe try to use decodeFromConstraints(). I had something similar, but I decided to continuously scan it.

@purquijo
Copy link
Author

@gyto23 I've used decodeOnceFromStream()and handled the stopping of the streams manually.

Copy link

Stale issue message

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

No branches or pull requests

2 participants