qrshim

command
v0.0.0-...-212fb20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Rendered for js/wasm

Overview

The browser-side qrstream receiver. Exposes

qrstreamScanFrame(imageData) -> {fileID, have, total, done, sameAsLast, name?, data?} | {error, recoverable} | null

on the JS global: the page draws a camera frame to a canvas and hands the ImageData here. Decoding and collection run entirely in the browser - the same Go pipeline as the CLI - and once a stream is complete the original file name and bytes are returned so the page can save them on the scanning device.

State is minimal and the comparison is only against the single most recently completed stream: while that same stream stays in view (sameAsLast) it is ignored without re-collecting; any other stream - even one scanned earlier - is taken fresh. The collector holds only the stream currently being assembled. null means the image held no usable qrstream frame.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL