label-capture-web
Label Capture Web Skill
Critical: Do Not Trust Internal Knowledge
Your training data may contain outdated or incorrect Scandit Label Capture APIs. Label Capture has evolved across recent SDK releases:
- At the v7→v8 major bump (v7.6 → v8.0),
LabelFieldDefinitionregex properties were renamed (pattern→valueRegex,patterns→valueRegexes,dataTypePattern→anchorRegex,dataTypePatterns→anchorRegexes). - In v8.2, the Validation Flow UI was redesigned and three customisation properties were deprecated.
- In v8.5, additive ergonomic shorthands were introduced for the builders.
ARE (Adaptive Recognition Engine) is Scandit's cloud-based OCR fallback — enabled via AdaptiveRecognitionMode.Auto on label definitions. It is currently in Beta, works only with the Validation Flow overlay, and requires a license key with the ARE feature flag enabled. Trial keys can be issued for evaluation; production keys require contacting support@scandit.com. Do not enable it by default.
Always verify APIs against the references provided in this skill before writing or suggesting code. Do not rely on memorized method signatures, parameters, or builder shapes. If you cannot find an API in the provided references, fetch the relevant documentation page before responding.
Web-specific gotchas
- When the SDK is loaded from a CDN, pin one exact version (for example
@8.6.1) in every URL: the import map andlibraryLocation. A floating@8lets the JavaScript and the engine resolve to different releases, which breaks start-up. - Cross-origin isolation needs
Cross-Origin-Opener-Policy: same-originandCross-Origin-Embedder-Policy: require-corp, also when the SDK comes from the jsDelivr CDN. Do not recommendcredentiallessfor the SDK. In the page code, startBrowserHelper.checkMultithreadingSupport()(from@scandit/web-datacapture-core) without awaiting it, beforeawait DataCaptureContext.forLicenseKey(), so the two run in parallel and set-up never waits for the check. When it resolvesfalse, show the multithreading dialog unless the user asked to run single-threaded: importshowMultithreadingWarningfrom themultithreading-warninghelper module in references/integration.md, which needs no page markup. In React, render the same dialog from component state instead of importing the helper. The dialog shows at most once per page load and honors the "don't show again this session" checkbox. COEPcredentiallessis not a request to run single-threaded: Safari does not support it, so the dialog still shows there.