This is the main method of ABBYY Mobile Web Capture API. It starts the capture process configured by the options parameter.
The capture method can be called:
- after the init method. In this case all required source files and license are initialized by capture start. Do it if you want to start capture immediately, as the initialization takes some time.
- separately at once. Initialization will be performed automatically. The loading screen is displayed until loading is completed.
After all source files and license are loaded, capture scenario starts.
Important! For capture from video stream on remote domain HTTPS connection is required. HTTP connection supports only processing of images loaded from the photo library.
The whole scenario is running through several logical screens, changing one after another:
- capture screen, represented by camera stream or choosing from device gallery button. After an image is captured or loaded, this screen is changed to the next one.
- document editor with captured or loaded image. This is a transition screen between capture and sending an image to back-end. Here the image can be edited, retaken, deleted or sent to a manual cropping screen. Adding a new page returns scenario to the capture screen.
- manual cropping screen can be started from the document editor screen for manual document boundary editing, if needed.
Basic scenario represents running through all the screens. You can tune any screen or integrate just the one you need by setting a mode option of the capture method to a corresponding value. See the CaptureMode enumeration description for details.
capture: (options?: IWebCapture)
- [input] An object of an IWebCapture interface, providing access to all capture settings.All the settings are optional.
The method returns captured images, represented by an array of objects, implementing IBlobImageResult inteface.