Barcode scanner not detecting Code 128 barcodes #5

Closed
opened 2026-05-20 21:28:06 +00:00 by shawn · 0 comments
Owner

Problem

ZXing BrowserMultiFormatReader scanned ALL barcode formats on every frame, missing 1D barcodes like Code 128. Camera used manual stream + decodeFromVideoElement (older API).

Fix

  • Switched to decodeFromVideoDevice (handles camera + scanning in one call)
  • 1D-only format hints: Code 128, Code 39, EAN/UPC, ITF, Codabar
  • TRY_HARDER hint for low-light/angle tolerance
  • 50ms scan interval (was ~500ms default)

Commits

## Problem ZXing BrowserMultiFormatReader scanned ALL barcode formats on every frame, missing 1D barcodes like Code 128. Camera used manual stream + decodeFromVideoElement (older API). ## Fix - Switched to `decodeFromVideoDevice` (handles camera + scanning in one call) - 1D-only format hints: Code 128, Code 39, EAN/UPC, ITF, Codabar - TRY_HARDER hint for low-light/angle tolerance - 50ms scan interval (was ~500ms default) ## Commits - b20998e
shawn closed this issue 2026-05-20 21:28:06 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shawn/canteen-asset-tracker#5