Skip to content
rdlabo.dev

API

method present(...)

present(scannerOption: ScannerOption) => Promise<void>
Param Type
scannerOption <code><a href="#scanneroption">ScannerOption</a></code>

method addListener('CodeScannerCatchEvent', ...)

addListener(eventName: 'CodeScannerCatchEvent', listenerFunc: (event: { code: string; }) => void) => Promise<PluginListenerHandle>
Param Type
eventName <code>'CodeScannerCatchEvent'</code>
listenerFunc <code>(event: { code: string; }) => void</code>

Returns: <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>


Interfaces

interface ScannerOption

Prop Type Description
detectionWidth <code>number</code>
detectionHeight <code>number</code>
enableCloseButton <code>boolean</code> Enable close button on the top left of the scanning area (default: true)
sheetScreenRatio <code>number</code> Specify the ratio of the scanning area (sheet modal size) to the screen size. Default is 0.9 for android, 1(pageSheet) for iOS.
metadataObjectTypes <code>MetadataObjectTypes[]</code> Specify the types of codes to recognize (default: ["qr", "code39", "ean13"])
isMulti <code>boolean</code> Enable multi scan mode (default: false)
enableAutoLight <code>boolean</code> Enable auto light when environment is dark (default: true)

interface PluginListenerHandle

Prop Type
remove <code>() => Promise<void></code>

Type Aliases

type alias MetadataObjectTypes

<code>'aztec' | 'code128' | 'code39' | 'code39Mod43' | 'code93' | 'dataMatrix' | 'ean13' | 'ean8' | 'face' | 'interleaved2of5' | 'itf14' | 'pdf417' | 'qr' | 'upce' | 'catBody' | 'dogBody' | 'humanBody' | 'salientObject'</code>