From 43397b1854023ef7838ba2f787b7d9b5ada5f677 Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Sat, 25 Apr 2026 13:50:42 -0400 Subject: [PATCH] fix(shopfloor): swap to ZXing-js as primary QR decoder; jsQR is fallback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 149 jsQR attempts at full 720x1280 with px:ok and no detection means the QR in the frame has perspective skew, motion blur, or glare under jsQR's threshold but well within what real-world phone scanning needs to handle. jsQR is fast but brittle. Vendor @zxing/library 0.21.3 (Apache 2.0, ~328KB UMD) and make it the default decoder. ZXing's HybridBinarizer + perspective transform are the same algorithm family the iOS Camera app uses internally and they recover from the cases jsQR rejects. Decoder selection order: 1. ZXing-js (window.ZXing.BrowserMultiFormatReader) -- new default 2. native BarcodeDetector -- if ZXing missing 3. jsQR -- last-resort Implementation details: - Hint ZXing to QR_CODE only so it doesn't waste frames probing Code 128 / EAN / PDF417. - Use decodeFromCanvas on each video frame (rather than ZXing's built-in continuous video reader) so we keep ownership of the modal UI, the