Skip to content
Tauri

@tauri-apps/plugin-barcode-scanner

Enumerations

Format

Enumeration Members

Aztec
Aztec: "AZTEC";

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L20

Codabar
Codabar: "CODABAR";

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L18

Code128
Code128: "CODE_128";

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L17

Code39
Code39: "CODE_39";

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L15

Code93
Code93: "CODE_93";

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L16

DataMatrix
DataMatrix: "DATA_MATRIX";

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L21

EAN13
EAN13: "EAN_13";

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L14

EAN8
EAN8: "EAN_8";

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L13

ITF
ITF: "ITF";

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L19

PDF417
PDF417: "PDF_417";

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L22

QRCode
QRCode: "QR_CODE";

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L10

UPC_A
UPC_A: "UPC_A";

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L11

UPC_E
UPC_E: "UPC_E";

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L12

Interfaces

ScanOptions

Properties

PropertyType
cameraDirection?"back" | "front"
formats?Format[]
windowed?boolean

Scanned

Properties

PropertyType
boundsunknown
contentstring
formatFormat

Type Aliases

PermissionState

type PermissionState: "granted" | "denied" | "prompt";

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L7

Functions

cancel()

function cancel(): Promise<void>

Cancel the current scan process.

Returns

Promise<void>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L48


checkPermissions()

function checkPermissions(): Promise<PermissionState>

Get permission state.

Returns

Promise<PermissionState>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L55


openAppSettings()

function openAppSettings(): Promise<void>

Open application settings. Useful if permission was denied and the user must manually enable it.

Returns

Promise<void>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L73


requestPermissions()

function requestPermissions(): Promise<PermissionState>

Request permissions to use the camera.

Returns

Promise<PermissionState>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L64


scan()

function scan(options?): Promise<Scanned>

Start scanning.

Parameters

ParameterTypeDescription
options?ScanOptions

Returns

Promise<Scanned>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L41


© 2024 Tauri Contributors. CC-BY / MIT