Open jameschristianw opened 1 week ago
We could make onDetect
return a nullable BarcodeCapture
. The barcodes stream does also not report events when an image frame has no barcode I think. (because that would be expensive, you'd have to send events every frame)
I'm curious about your use case, though? How would you handle this with a continuous stream of images frames that all might not contain barcodes?
i agree that would be expensive. to be fair, i still don't know how to handle the continuous stream of image so what i'm doing right now is save detected barcode to a temp variable, pausing subscription, do something with the barcode, remove the detecte barcode from temp variable, resume subs
i have a suggestion, i don't know if this is feasible or not, can you add new function to controller to detect current frame
Pausing the subscription when a barcode is received is the correct way to handle things here.
What do you mean with "detect current frame" ? The scanner continuously uses the frames as they come in for detection, so I do not see how that is different from "detect the current frame" ?
ondetect runs when there's a barcode. how to tell if there's no barcode?