screenferry — test app

A basic manual test harness — not part of the library, not published. Uses the negotiated API (preferredBackend), so it exercises qrLtBackend, qrBinLtBackend, and the header-frame auto-detection between them.

Speed tuning (applies to every section below — see notes):

1. Self-test (no camera needed)

Sends a file to a hidden canvas and reads it straight back via a captured canvas stream — same trick as loopback-demo.html. Runs the real encodeToFramesDisplayDriverNegotiatingReceiverSession pipeline end to end, in this browser, without needing a second device or a real camera. This is the fastest way to check whether the selected backend actually works here at all.

Sender canvas

"Camera" (mirrors sender)

idle

2. Send (real screen, for a second device to scan)

Requires a real camera on the receiving end (section 3, on this device or another one). If the receiver is a different device on your network, plain http://<lan-ip> won't get camera access — browsers require a secure context (https://, or localhost on the same device) for getUserMedia. See the README's Browser support section.

The canvas below displays at its native resolution (drag its bottom-right corner to resize further). Avoid shrinking it — a downscaled code is harder for the receiving camera to resolve; hold the camera closer instead if you want the code to fill more of its view.

idle

3. Receive (real camera)

Point this device's camera at another device running section 2. Drag the video's bottom-right corner to resize the preview — a bigger preview makes it much easier to judge whether the code fills the frame cleanly (see the tuning notes below).

idle

Speed tuning notes (qr-lt)

qr-lt's throughput is roughly fps × fragmentSize bytes/second, bounded by how fast the receiver can actually scan and decode. Two knobs, both above:

Beyond these knobs: QR ECC is already at the library's minimum overhead level (L), so there's no further redundancy to trade away. On the physical/environmental side — screen brightness/contrast, camera autofocus lock, holding distance/angle steady, and reducing motion blur — all matter more than they might seem, and are usually a bigger lever on real-world reliability (which is what lets you safely raise fps/fragmentSize in the first place) than any of the code-level knobs above.