Skip to main content
Version: 0.1

Interface: CameraProps

CameraView.CameraProps

Properties for the camera.

<Camera
onFrame={(image: Image) => {
image.release();
}}
hideCaptureButton={true}
/>

Hierarchy​

  • ViewProps

    ↳ CameraProps

Properties​

facing​

• Optional facing: CameraFacing

Direction the camera faces relative to the device's screen.

Defined in​

CameraView.tsx:83


hideCaptureButton​

• Optional hideCaptureButton: boolean

Hides the capture button if set to true, otherwise the camera will show a capture button.

Defined in​

CameraView.tsx:70


targetResolution​

• Optional targetResolution: TargetResolution

Camera target resolution. It is not guaranteed that the camera runs at the set target resolution, and it might pick the closest available resolution.

{@see https://developer.android.com/reference/androidx/camera/core/ImageAnalysis.Builder#setTargetResolution(android.util.Size)}

Defined in​

CameraView.tsx:78

Methods​

onCapture​

▸ Optional onCapture(image): void

Callback with an Image after capture button was pressed.

Parameters​

NameTypeDescription
imageImageAn Image reference.

Returns​

void

Defined in​

CameraView.tsx:90


onFrame​

▸ Optional onFrame(image): void

Callback when the camera delivers an Image.

caution

Needs to call Image.release to receive the next frame. The camera preview will continue to render updates, but new Image frames will be omitted until Image.release is called.

Parameters​

NameTypeDescription
imageImageAn Image reference.

Returns​

void

Defined in​

CameraView.tsx:105