tony-xlh / vision-camera-dynamsoft-barcode-reader

React Native Vision Camera Frame Processor Plugin of Dynamsoft Barcode Reader
MIT License
73 stars 15 forks source link

How to add timeout between each scan? #9

Closed aminvb12 closed 1 year ago

aminvb12 commented 1 year ago

I was wondering how we can add timeout between each scan.

xulihang commented 1 year ago

You can add a timeout setting to the template:

const config:DBRConfig = {};
config.template="{\"ImageParameter\":{\"BarcodeFormatIds\":[\"BF_ALL\"],\"Description\":\"\",\"Timeout\": 3500, \"Name\":\"Settings\"},\"Version\":\"3.0\"}"; 
aminvb12 commented 1 year ago

Thanks, in advance @xulihang Would you please provide me an example in order to how we can enable and disable scanner?

xulihang commented 1 year ago

What do you mean?

Do you need to turn off the camera or turn off the frame processor?

If you only need to stop scanning, you can use a sharedValue of react-native-animated to control whether to call the decode function.

aminvb12 commented 1 year ago

What do you mean?

Do you need to turn off the camera or turn off the frame processor?

If you only need to stop scanning, you can use a sharedValue of react-native-animated to control whether to call the decode function.

@xulihang Thanks for your response. Basically, I want to enable/disable frame processor between each successful scan for couple of seconds.

Would it be feasible for you, in order to provide me an example for it? I would appreciate it Dear @xulihang