This asset has the following block and functionality available:
LiveStream Block:
LiveStream managing actions:
Static images:
Utils:
Getting Started
Using Quagga JS is straightforward. There are two main ways to scan and decode barcodes: using the camera video stream or calling a client action.
Step 1:
Start by installing the Quagga JS component in your desired environment. Click the "Manage Dependencies" button, and depending on your needs, either add the LiveStream block to use a camera device, or add the StaticImages_DecodeFromImage client action references to your application.
Step 2:
To scan barcodes using a camera device, place the LiveStream block on a page, fill in the necessary settings, and assign an action to the OnDetected event to capture the barcodes. To decode a barcode from an image, simply call the StaticImages_DecodeFromImage client action, set the Image input with a URL or Data URI of an image, and define which readers to use.