DOT Web Auto Capture Migration 5.2.0

This guide describes how to migrate DOT Web Auto Capture component from version 4.0.0 or higher to version 5.2.0.

Introduction

All Auto Capture components now use more than one WASM file. It is essential that the customer provides the component with all WASM files from our distribution.

Migration Steps

Property samWasmUrl

In order to use the new version of the component, you need to copy wasm directory from our distribution into your distribution. Then if you are using samWasmUrl property, you need to change it to wasmDirectoryPath property and provide the path to the directory where all the WASM files are located. You can find more information about how to host sam.wasm files here.

Changelog

  • The samWasmUrl was changed to wasmDirectoryPath property.
  • The wasmDirectoryPath refers to the directory where all the WASM files are located, not to just single wasm file like it was before.

Before

Copy sam.wasm file from our distribution into your distribution and use it like this:

<div style={{position: "relative"}}>
  <DocumentCamera
    cameraFacing="environment"
    onPhotoTaken={handlePhotoTaken}
    onError={onError}
    samWasmUrl="/path/to/sam.wasm"
  />
  <DocumentUi />
</div>

After

Copy wasm directory from our distribution into your distribution and use it like this:

<div style={{position: "relative"}}>
  <DocumentCamera
    cameraFacing="environment"
    onPhotoTaken={handlePhotoTaken}
    onError={onError}
    samWasmUrl="/path/to/wasm/directory" // <-- path to directory where all the WASM files are located
  />
  <DocumentUi />
</div>