Turn off Camera

0
0

Is there a way to turn off camera when Barcodereader scan success?

I’m assign data on scan success but if I try to dispose Barcodereader or Camera to stop or turn off, the next error appears “Cannot read property ‘stopContinuousDecode’ of undefined”

How can I do it?

Thanks in advance

 

  • You must to post comments
0
0

I tried my project as https. When I try it on the computer, the camera view is displayed and it can read barcodes. Although the camera access is open in the iphone 11 safari application, there is no image in camera1. I am sharing the iPhone screen image in the attachment.

Attachment
  • Levie (ITG)
    Hi Onur, If you’re still having this issue can you please create a new issue in the forum and attach a link to the sample running on a secure site (https)? Thanks, Levie
  • Onur DOĞAN
    Thank you for your support and quick turnaround. my problem is solved.
  • You must to post comments
0
0

Thanks for the response Levie.

I run your attached sample, but the result is the same. I can’t stop or turn off the camera.

I have run your example 4 minutes ago, I left the application in the background and the camera is still on. If I kept using the application, it would keep running all the time.

The need to use dispose on the camera, is because we inferred that performing this action would turn off, but it is not.

I think there should be an option to turn the camera on or off whenever you want, and not let it stay on for as long as you close the browser or leave the application.

Thanks.

  • Levie (ITG)
    I see what you’re saying now. That’s a good point, we’ll add an enhancement that lets you control this. I’ll keep you updated! -Levie
  • Levie (ITG)
    Hi cagilferreiro, A fix for this issue will be available in the next build (Issue #2607). To turn off the webcam you can set the Video property to false. HTH -Levie
  • Manuel Gonzalez
    Hi Levie and cagilferreiro, I already updated both the version to 2.2.42 and the extension of the camera and I still have the same problem that it never turns off even though the video property is changed to false and use the dispose on the camera, Just it turns off until I close the browser. Thanks
  • Levie (ITG)
    Hi Manuel, You can also download and build the extension using the source code here: https://github.com/iceteagroup/wisej-extensions. If you still are having the issue after using the latest version (2.2.43), please let me know! Best, Levie
  • You must to post comments
0
0

I’ve logged the exception that’s thrown as issue #2606. A fix will be available in the next build!

Thanks for your help!

Levie

  • You must to post comments
0
0

Hello,

I’ll need to look and see why that error is thrown. It shouldn’t be, but…

You don’t need to Dispose the Camera or BarcodeReader to turn off the scanning. The BarcodeReader component has a property “ScanMode” that when set to AutomaticOnce will only report the first Barcode it finds.

You can then reset this and use it again by calling BarcodeReader.ResetScanner().

Please give the attached sample a try and let me know if you run into any issues with it. It demonstrates the different ScanModes.

 

Best,

Levie

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.