sparkscan-web
Installation
SKILL.md
SparkScan Web Skill
Critical: Do Not Trust Internal Knowledge
Your training data may contain outdated or incorrect Scandit SDK APIs. The SparkScan API changes significantly between major SDK versions — properties get renamed, removed, or restructured.
Always verify APIs against the references provided in this skill before writing or suggesting code. Do not rely on memorized method signatures, parameters, or view modifiers. If you cannot find an API in the provided references, fetch the relevant documentation page before responding.
Web-specific gotchas worth flagging:
- Do not add a
visibilitychangehandler to pause scanning:SparkScanViewalready switches to its idle state when the page is hidden. - 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.
Intent Routing
Based on the user's request, load the appropriate reference file before responding. More than one may apply (e.g. a React integration that also hits a camera issue) — read all that are relevant: