Namespace: Utilities

KfxWebSDK.Utilities

Methods

(static) supportsAutoCapture(successCallBack, errorCallBack, resolutionopt)

Checks browser and device model support for web capture. This is useful in checking the compatibility for advanced document detection based capture experience. This information can be used to configure capture experience options while creating capture control. The API caches its result internally: first call may take some time to complete, but other calls will complete immediately based on the first result till web page gets reloaded.
The API is asynchronous and checks:
1 Secure protocol HTTPS is used
2 Browser supports WebRTC
3 Device has proper auto focus hardware support
4 Device can provide at least FHD back camera resolution via WebRTC
Parameters:
Name Type Attributes Default Description
successCallBack function empty callback indicating that auto capture is supported
errorCallBack function empty callback indicating that auto capture is not supported
resolution KfxWebSDK.resolution <optional>
RES_FULL_HD To check if the device browser supports this resolution or not. Using this parameter, you can check the device browser supports Full HD resolution or 4K resolution. You need to pass RES_FULL_HD for Full HD and RES_4K for 4K resolutions. If you do not specify this parameter then it will check for Full HD resolution. If you pass other than RES_FULL_HD and RES_4K values then errorCallBack will be called.
See:

(static) supportsSelfieCapture(successCallBack, errorCallBack)

Checks browser and device model support for selfie capture. The API caches its result internally: first call may take some time to complete, but other calls will complete immediately based on the first result till web page gets reloaded.
The API is asynchronous and checks:
1 Secure protocol HTTPS is used
2 Browser supports WebRTC
Parameters:
Name Type Description
successCallBack function empty callback indicating that auto capture is supported
errorCallBack function empty callback indicating that auto capture is not supported
See: