Module Loader Options

Defined under the namespace Scandit.Datacapture.Core

ModuleLoaderOptions
interface ModuleLoaderOptions

Added in version 8.0.0

licenseKey
licenseKey: string

Added in version 8.0.0

The license key.

libraryLocation
libraryLocation: string

Added in version 8.0.0

The location of the folder containing the external scandit-datacapture-sdk-*.js and scandit-datacapture-sdk-*.wasm files (external Scandit Data Capture library). By default they are retrieved from the root of the web application. Can be a relative URL or an absolute one, pointing to a CDN for example https://cdn.jsdelivr.net/npm/@scandit/web-datacapture-barcode@7.0/sdc-lib / https://unpkg.com/@scandit/web-datacapture-barcode@7.0/sdc-lib or another URL location.

moduleLoaders
moduleLoaders: ModuleLoader[]

Added in version 8.0.0

An array of modules that will be loaded. Currently only an array containing one single value must be passed, an empty array will trigger a DataCaptureError. Each data capture module provides a function to load itself, like the Barcode.barcodeCaptureLoader() for example.

logLevel
logLevel: Logger.Level

Added in version 8.0.0

The console log level to be used by the library. Level.Debug by default.

ModuleLoader
interface ModuleLoader

Added in version 8.0.0

Internal interface to load a data capture module. Every module provides a function which returns a ModuleLoader when called. The ModuleLoader’s load function is called when DataCaptureContext.forLicenseKey() is invoked.

moduleName
moduleName: string

Added in version 8.0.0

The name of the module

load(options)
load(options: ModuleLoaderOptions): Promise<any>

Added in version 8.0.0

An internal function to initialize the module.