library icon indicating copy to clipboard operation
library copied to clipboard

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

Open purquijo opened this issue 1 year ago • 3 comments

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 avatar Feb 12 '24 14:02 purquijo

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

gyto23 avatar Feb 12 '24 20:02 gyto23

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

purquijo avatar Feb 14 '24 13:02 purquijo

Stale issue message

github-actions[bot] avatar Apr 29 '24 08:04 github-actions[bot]