Resource Base
Table of contents

CameraView

CameraView is a widget that integrates with the CameraEnhancer - providing a camera interface with configurable and customizable UI components like torch control, scan region visualization, and custom drawing layers.

Definition

Assembly: dynamsoft-capture-vision-react-native

class CameraView extends Component<CameraViewNativeProps, any>

Properties

Property Type Description
cameraToggleButton Object Defines a custom widget to replace the default camera toggle button.
cameraToggleButtonVisible boolean Determines whether the camera toggle button is visible.
scanLaserVisible boolean Determines whether the scan laser will be visible in the scan region.
scanRegionMaskVisible boolean Determines whether the scan region mask will be visible. (Scan region mask is a mask covered outside the scan region.)
torchButton Object Defines a custom TorchButton instead of the default torch icon.
torchButtonVisible boolean Controls the visibility of the torch/flash button.
visibleLayerIds number[] Defines which drawing layer(s) to display on the camera view.

cameraToggleButton

Defines a custom widget (as a CameraToggleButton object) to replace the default camera toggle button (to switch between the front and back cameras).

cameraToggleButton?: {
    location?: {
        x?: Int32;
        y?: Int32;
        width?: Int32;
        height?: Int32;
    }
    cameraToggleImageBase64?: string;
};

cameraToggleButtonVisible

Determines whether the camera toggle button (to switch between the front and back cameras) is visible.

cameraToggleButtonVisible?: boolean

Default Value

false.

scanLaserVisible

Determines whether the scan laser will be visible in the scan region or not.

scanLaserVisible?: boolean

Default Value

false

scanRegionMaskVisible

Determines whether the scan region mask will be visible. Scan region mask is a mask covered outside the scan region.

scanRegionMaskVisible?: boolean

Default Value

false

torchButtonVisible

Controls the visibility of the torch/flash button that allows the user to activate the flash in low brightness scenarios.

torchButtonVisible?: boolean

Default Value

false

torchButton

Defines a custom TorchButton instead of the default torch icon that comes with the camera view. This property allows you to customize the size, position, and icon images of the torch button.

torchButton?: {
    location?: {
        x?: Int32;
        y?: Int32;
        width?: Int32;
        height?: Int32;
    };
    visible?: boolean;
    torchOnImageBase64?: string;
    torchOffImageBase64?: string;
};

visibleLayerIds

Defines which drawing layer(s) (see EnumDrawingLayerId) to display on the camera view. The drawing layer is responsible for highlighting the captured result, so in the case of the Barcode Reader, the drawing layer would highlight any recognized barcodes.

visibleLayerIds?: number[]

Remarks

The Capture Vision library can work with multiple functional products, including the Barcode Reader, Label Recognizer, and the Document Normalizer. If you would like to disable the feature to highlight any found barcodes, then the visibleLayerIds must not include EnumDrawingLayerId.dbr.

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: