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.
hideCaptureButton
• Optional
hideCaptureButton: boolean
Hides the capture button if set to true
, otherwise the camera will show
a capture button.
hideFlipButton
• Optional
hideFlipButton: boolean
Hides the flip button if set to true
, otherwise the camera will show
a flip button.
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.
Methods
onCapture
▸ Optional
onCapture(image
): void
Callback with an Image after capture button was pressed.
Parameters
Name | Type | Description |
---|---|---|
image | Image | An Image reference. |
Returns
void
onFrame
▸ Optional
onFrame(image
): void
Callback when the camera delivers an Image.
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
Name | Type | Description |
---|---|---|
image | Image | An Image reference. |
Returns
void