General Properties

Description

This class displays the video and controls the camera, inheriting UIView. It supports real-time document detection, capturing images and documents.

Members


Member Type Member Name Description
Property var nextViewAfterCancel:DcsViewEnum Gets or sets the view to navigate to when the cancel tool item is tapped. The default value is DEV_IMAGEGALLERYVIEW.
Property var nextViewAfterCapture:DcsViewEnum Gets or sets the view to navigate to when the capture tool item is tapped. The default value is DEV_VIDEOVIEW.
Property var mode:DcsModeEnum Gets or sets the view mode. The default is DME_IMAGE.
Property var cameraPosition:DcsCameraPositionEnum Gets or sets the current camera position. The default is DCPE_BACK.
Property var ifAllowDocumentCaptureWhenNotDetected:Bool Gets or sets whether to disable document capture function when no document is detected. The default value is NO.

enum DcsViewEnum

DVE_VIDEOVIEW=0x0010 Video view
DVE_IMAGEGALLERYVIEW Image gallery view
DVE_EDITORVIEW Edit view. When the data you operate with is a document, it displays the document editor. If it's an image, then it displays the image editor.
nextViewAfterCancel:DcsViewEnum
Description Gets or sets the view to navigate to when the cancel tool item is tapped. The default value is DEV_IMAGEGALLERYVIEW.
Remarks If it's set to DVE_VIDEOVIEW, when the cancel button is clicked, the current page remains no change.

If it's set to DVE_IMAGEGALLERYVIEW, when the cancel button on the video view page is clicked, the current page redirects to the image gallery view.

If it's set to DVE_EDITORVIEW and the capture mode is DME_IMAGE, when the cancel button on the video view page is clicked, the current page redirects to the image editor view.

If it's set to DVE_EDITORVIEW and the capture mode is DME_Document, when the cancel button on the video view page is clicked, the current page redirects to the document editor view.

If it's not set to DVE_EDITORVIEW or DVE_VIDEOVIEW, the exception DcsValueOutOfRangeException will be thrown.

If the value equals nil, it means the set fails, the exception DcsValueOutOfRangeException will be thrown.

nextViewAfterCapture:DcsViewEnum
Description Gets or sets the view to navigate to when the capture tool item is tapped. The default value is DEV_VIDEOVIEW.
Remarks If it's set to DVE_VIDEOVIEW, when the capture button is clicked, the current page remains no change.

If it's set to DVE_IMAGEGALLERYVIEW, when the capture button on the video view page is clicked, the current page redirects to the image gallery view.

If it's set to DVE_EDITORVIEW and the capture mode is DME_IMAGE, when the capture button on the video view page is clicked, the current page redirects to the image editor view.

If it's set to DVE_EDITORVIEW and the capture mode is DME_Document, when the capture button on the video view page is clicked, the current page redirects to the document editor view.

If it's not set to DVE_EDITORVIEW or DVE_VIDEOVIEW, the exception DcsValueOutOfRangeException will be thrown.

If the value equals nil, it means the set fails, the exception DcsValueOutOfRangeException will be thrown.

enum DcsModeEnum

DME_IMAGE Displays the video stream and captures images.
DME_DOCUMENT Displays the video stream, detects documents in real time and captures documents.
(nonatomic, assign) DcsModeEnum mode
Description Gets or sets the view mode. The default is DME_IMAGE.
Remarks If it is set to DME_Document, it will detect documents in real time and draw the boundries of documents according to the value of property documentBoundaryColor and documentBoundaryThickness. When a document is detected, the event onDocumentDetected will be fired.

If the value is neither DME_Document nor DME_IMAGE, the exception DcsValueOutOfRangeException will be thrown.

enum DcsCameraPositionEnum

DCPE_BACK=0x0010 Back camera
DCPE_FRONT Front camera
cameraPosition:DcsCameraPositionEnum
Description Gets or sets the current camera position. The default is DCPE_BACK.
Remarks If the value is neither DCPE_BACK nor DCPE_FRONT, the exception DcsValueOutOfRangeException will be thrown.

ifAllowDocumentCaptureWhenNotDetected:Bool
Description Gets or sets whether to disable document capture function when no document is detected. The default value is NO.
Remarks When ifAllowDocumentCaptureWhenNotDetected is NO, you can’t capture documents when no document is detected. If you try to call captureDocument() or click the capture tool item on the UI to capture documents in that case, the event onCaptureFailure will be fired and the exception DcsDocumentNotDetectedException will be received.
Is this page helpful?