Race condition when the reset function is being called shortly after calling decodeOnceFromVideoDevice()
purquijo opened this issue · 3 comments
purquijo commented
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.
gyto23 commented
@purquijo maybe try to use decodeFromConstraints()
. I had something similar, but I decided to continuously scan it.
purquijo commented
@gyto23 I've used decodeOnceFromStream()
and handled the stopping of the streams manually.
github-actions commented
Stale issue message