Open sveres opened 3 years ago
Hi @sveres,
You're right. We don't have a teardown logic that doesn't cause the video to stop. I suppose this is something that will benefit your use case?
Also, there is no VideoRecognizer.deleteRecognizer()
method. To make things more clear, could you clarify which method do you reference there?
Sincerely, Vjekoslav
hi @vjekoart
Yes, in our use case, the barcode recognition is optional and our barcode reading implementation cannot stop the video, otherwise it interferes with an other, parallel capturing method. Is there by any chance a workaround to use the VideoRecognizer without causing the video to pause at the end of the scanning?
You are right, there is no method like that, sorry about the confusion. What I meant is the delete()
method. Which, In my understanding should be called after the cancellation, please correct me if I am wrong.
https://github.com/BlinkID/blinkid-in-browser/blob/36373d0488f3bc4d7506b1aa334a4b4b74ccd3ff/src/MicroblinkSDK/DataStructures.ts#L82
Hi @sveres,
Thank you for the explanation. We'll look into this behaviour and extend the functionality from our side if we don't find an alternative solution.
Sincerely, Vjekoslav
Thank you as well, if there is anything else I can clarify, please just let me know.
Hi @vjekoart Do you have any update on this feature?
Hi @sveres,
We're currently not working on this feature. However, the task is defined and placed in the backlog, but we cannot tell the exact date when it's going to be implemented due to limited resources.
Sincerely, Vjekoslav
Hi @sveres,
if you are using VideoRecognizer
directly from your code, you can call pauseRecognition
- this will pause the recognition loop (i.e. new frames won't be processed, even if there are still live processImage
tasks queued from setTimeout
), but the video feed will keep working (the camera will still be enabled). You can then resume the recognition by calling resumeRecognition
.
If you also want to stop the video feed (i.e. "freeze" the video feed, without tearing down the camera), you can call pauseVideoFeed
. However, after pausing the video feed, you will need to resume the recognition by calling either recognize
or startRecognition
(recognize
is just simple wrapper around startRecognition
that set the default onScanningDone
callback that pauses the video feed before resolving the promise).
Thanks @DoDoENT, this is great news, we will check pauseRecognition out.
Hey, I think there is no way to stop the video recognition without pausing the video feed.
If I VideoRecognizer.cancelRecognition(), it pauses the video feed. If I call VideoRecognizer.deleteRecognizer() without calling cancel firs, it will result in an unexpected error: "Uncaught (in promise): Recognizer runner is deleted. It cannot be used anymore!" I think that's because there is still a setTimeout alive that tries to call processImage().
If I am wrong and there is a way, could you point me to the right documentation/code piece, please?