Commercial SupportGuaranteed response times on Shiny bug fixes, straight from the maintainers. Plans from US$1,500 a year.Guaranteed response times on Shiny bug fixes, straight from the maintainers. Plans from US$1,500 a year.See the plans
AI Conversations, Speech, & Audio ReleaseHave a full conversation with AI, use speech commands, and interact with audio content seamlessly.Have a full conversation with AI, use speech commands, and interact with audio content seamlessly.
The barcodes bridge turns the device’s camera into a barcode scanner for the page. When the page asks, the device shows
a full-screen scanner over the web app, and the codes it reads come back to the page. It’s built on the modal scanner
in Shiny Controls’ media service, including its
long-range mode, which reads codes the platform scanners miss, such as a shelf label
across an aisle, and can zoom in on them by itself.
This is the camera of the device running the app. A page that wants the camera of the machine showing it uses the
browser’s own BarcodeDetector. To drive the device’s camera from somewhere else, with a viewfinder, see
Device Camera.
scan answers when the scanner closes, with every code it read and why it closed. In Blazor, register
AddBarcodesBridgeClient() and inject IBarcodesBridge.
maxResults: 0 keeps the scanner open until the person taps ✓, timeoutSeconds passes without a read, or the page
calls stopScan(). Listen for barcodes.detected to show each code as it’s read:
In Standard mode, the platform’s scanner reads the whole frame, every frame. That’s the quickest read of a code held
up to the lens. But Vision and ML Kit shrink the frame before they look at it, so a code a few metres away loses its
bars. LongRange mode finds codes in the full-resolution frame first. It reads 1D codes (EAN/UPC, Code 128, Code 39,
ITF) with a blur-tolerant decoder down to about a pixel per bar. 2D codes go to the platform’s scanner cut out and
enlarged, and codes are tracked across frames. With autoZoom, a code that’s been found but is too small to read pulls
the camera in until it can be read. A pinch takes back control at once. A big, close code can read a frame or two later
than in Standard mode, so Standard is still the default.
Narrowing formats is the biggest speed-up. A list with only 1D formats skips the platform’s scanner altogether.
The remaining settings tune long range and are ignored in Standard mode. Leave them out to use the scanner’s
defaults:
Field
Range
Default
Meaning
maxAutoZoom
1–10
4
The furthest auto-zoom goes, as a multiple of the starting zoom
fullFrameInterval
0–30
3
Run the platform’s scanner over the whole frame every this many frames, to catch close codes and Code 93 / Codabar. 0 never does
maxNativeCropsPerFrame
0–8
2
Candidates handed to the platform’s scanner per frame, cut out and enlarged
uncheckedConfirmations
1–10
2
Frames a code without a check digit (Code 39, short ITF) must read on before it’s reported
Shows the scanner and answers when it closes, with every code it read. A refused permission, a person backing out or a timeout is a result (reason), not an error. Fails with 400 for a request out of range, and with 409 scan_in_progress while another scan is running.
LongRange only: zoom in on a code that has been found but is too small to read, and zoom back out once nothing is in view. A pinch takes control back at once.
maxAutoZoom
number | null
LongRange only: the furthest auto-zoom goes, as a multiple of the starting zoom. 1 to 10; the scanner's default is 4.
fullFrameInterval
number | null
LongRange only: run the platform's scanner over the whole frame every this many frames, which catches close codes and Code 93 / Codabar. 0 (never) to 30; the scanner's default is 3.
maxNativeCropsPerFrame
number | null
LongRange only: candidates handed to the platform's scanner per frame, cut out and enlarged. 0 to 8; the scanner's default is 2.
uncheckedConfirmations
number | null
LongRange only: frames a code without a check digit (Code 39, short ITF) must read on before it is reported. 1 to 10; the scanner's default is 2.
maxResults
number
Close the scanner after this many codes. 1 by default, a one-code scan; 0 keeps scanning until the person taps done, timeoutSeconds passes or the page stops it. At most 1000.
filterDuplicates
boolean
Report each symbology and value once per scan. On by default.
timeoutSeconds
number | null
Close the scanner after this long without reading anything; each code restarts the clock. Null waits as long as it takes. At most an hour.
A scan. Every member is optional: an empty request reads the first code of any symbology, in Standard mode, and waits for the person as long as they take.
LongRange only: zoom in on a code that has been found but is too small to read, and zoom back out once nothing is in view. A pinch takes control back at once.
maxAutoZoom?
number | null
LongRange only: the furthest auto-zoom goes, as a multiple of the starting zoom. 1 to 10; the scanner's default is 4.
fullFrameInterval?
number | null
LongRange only: run the platform's scanner over the whole frame every this many frames, which catches close codes and Code 93 / Codabar. 0 (never) to 30; the scanner's default is 3.
maxNativeCropsPerFrame?
number | null
LongRange only: candidates handed to the platform's scanner per frame, cut out and enlarged. 0 to 8; the scanner's default is 2.
uncheckedConfirmations?
number | null
LongRange only: frames a code without a check digit (Code 39, short ITF) must read on before it is reported. 1 to 10; the scanner's default is 2.
maxResults?
number
Close the scanner after this many codes. 1 by default, a one-code scan; 0 keeps scanning until the person taps done, timeoutSeconds passes or the page stops it. At most 1000.
filterDuplicates?
boolean
Report each symbology and value once per scan. On by default.
timeoutSeconds?
number | null
Close the scanner after this long without reading anything; each code restarts the clock. Null waits as long as it takes. At most an hour.