Verwendung

Pause and resume a camera preview.

Dieser Typ wird verwendet von Camera

tsx
// Pause and resume a camera preview.
import { Button, Camera, ref, type CameraHandle } from 'kuito';

function Scanner() {
  // A plain ref holds the handle; cameraRef() adds ready and error signals.
  const camera = ref<CameraHandle>();

  return (
    <>
      <Camera ref={camera} flex={1} />
      <Button onPress={() => void camera.current?.pausePreview()}>Pause</Button>
      <Button onPress={() => void camera.current?.resumePreview()}>Resume</Button>
    </>
  );
}

Typdeklaration

ts
export type BarcodeType =
  | 'qr'
  | 'aztec'
  | 'datamatrix'
  | 'pdf417'
  | 'ean13'
  | 'ean8'
  | 'upc_e'
  | 'code39'
  | 'code93'
  | 'code128'
  | 'itf14';

Typ

ts
"qr" | "aztec" | "datamatrix" | "pdf417" | "ean13" | "ean8" | "upc_e" | "code39" | "code93" | "code128" | "itf14"
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.