docs(qr): scanner snappiness research + companion-dev handover; 10/s native decode
Demo images / Build & push demo images (push) Successful in 4m16s

Research findings and a concrete split of work: web-side items for this
repo (pre-warm camera, torch toggle, continuous focus, keep-stream-
alive) and a native handover list for the companion dev (pre-warmed
CameraX + ML Kit, QR-only format, 720p keep-latest analysis, torch,
zoom nudge, haptic dismiss) with acceptance criteria and how to
measure. Quick win landed now: live scan runs at 10 scans/sec when the
platform has a native BarcodeDetector, keeping 4/s only for the
JS-worker fallback.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
archipelago
2026-07-29 10:51:39 -04:00
co-authored by Claude Fable 5
parent 8bea3707ca
commit 21de734385
2 changed files with 87 additions and 3 deletions
+5 -3
View File
@@ -386,9 +386,11 @@ async function startScanning() {
returnDetailedScanResult: true,
highlightScanRegion: false,
preferredCamera: 'environment',
// 4/s decodes plenty fast for a hand-held QR while keeping the
// preview smooth on phone WebViews (10/s visibly lagged the video).
maxScansPerSecond: 4,
// With a native BarcodeDetector (Chrome/Android WebView) decoding is
// hardware-cheap — scan at 10/s for a snappier lock-on. The 4/s cap
// remains for the JS-worker fallback, where 10/s visibly lagged the
// preview on phone WebViews.
maxScansPerSecond: 'BarcodeDetector' in window ? 10 : 4,
}
)
await qrScanner.value.start()