A high-performance, responsive Web Block to scan 1D & 2D barcodes (QR Code, EAN-13, CODE-128, DataMatrix, etc.) using webcams with auto-stop protection, built-in camera switching, and flexible control options.
html5-qrcode
ShowCameraSwitch
ShowStart_StopButtons
QrBoxWidth
QrBoxHeight
Fps
FacingMode
"environment"
"user"
10
250
AutoStart
True
False
ExtendedClass
""
OnScanSuccess
DecodedText
FormatName
OnScanError
ErrorMessage
Parent screens can invoke these public actions directly on the block instance widget reference (e.g. MyScannerBlock.StartScanner):
MyScannerBlock.StartScanner
StartScanner
StopScanner
SwitchCamera
Ideal for lookup forms, search inputs, or product detail pages.
QRAndBarcodeScanner
SearchVariable = DecodedText
Ideal for scanning multiple items sequentially without re-opening screens.
ScannerWidget
ScannerWidget.StartScanner
Ideal when users scan occasionally and you want to conserve device battery.
Ideal when you want custom action buttons outside the block on your screen.
MyScanner
On Click
MyScanner.StartScanner
A: Web browsers restrict camera access (getUserMedia) exclusively to Secure Contexts (HTTPS) or localhost. Ensure your deployment environment has a valid SSL certificate.
getUserMedia
localhost
A: Duplicate scans are automatically prevented! The component automatically invokes StopScanner immediately when OnScanSuccess fires.
A: Because these actions are Public Block-Level Client Actions, simply give your Block widget a name on your screen canvas (e.g. MyScanner) and invoke MyScanner.StartScanner or MyScanner.SwitchCamera from any screen action!
MyScanner.SwitchCamera