Documentation
¶
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.