preview()

Description

Opens the video.

Syntax

func preview()

Parameters

None

Return value

Void

Remarks

If the capture mode is DME_DOCUMENT, the document border is detected in real time and displayed on the video stream.
If the camera is not authorized, the exception DcsCameraNotAuthorizedException will be thrown.

Example

class ViewController: UIViewController{
    var dcsView:DcsView!
    override func viewDidLoad() {
        super.viewDidLoad()
        dcsView = DcsView(frame: CGRect(x:0,y:0,width:self.view.frame.size.width,height:self.view.frame.size.height))
        view.addSubview(dcsView)
        dcsView.currentView = DVE_VIDEOVIEW
        dcsView.videoView.preview()
    }
}
Is this page helpful?