Skip to content

LG-3357: Upgrade Acuant SDK to v11.4.1#4128

Merged
aduth merged 2 commits intomasterfrom
aduth-upgrade-acuant
Aug 28, 2020
Merged

LG-3357: Upgrade Acuant SDK to v11.4.1#4128
aduth merged 2 commits intomasterfrom
aduth-upgrade-acuant

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Aug 26, 2020

Why: As a developer, I expect that I can pass translated text strings for Acuant's capture display, and that I am taking advantage of the latest improvements to the SDK published in recent releases.

LG-3340 will require a newer version of Acuant than we are currently using, since the release which added support for overriding text strings (11.3.2) is newer than the version we currently use (11.3.1). The current version of Acuant is 11.4.1.

Implementation Notes:

The proposed changes will upgrade us from 11.3.1 to 11.4.1 (latest version), which should keep us in closer alignment with current release and potentially simplify future upgrades.

The upgrade from 11.3 to 11.4 includes some breaking changes. See migration guide.

The largest impact for us appears to be in how AcuantCameraUI.start works:

  1. It no longer automatically starts manual capture if camera is not supported
  2. The first argument is no longer a success callback, but rather an object of callbacks { onCaptured, onCropped, onFrameAvailable? }
    • Through a deep-dive of the source, I discovered the onCaptured is required, even if not used. onFrameAvailable can safely be omitted.
    • In future enhancements, we can consider to heed advice to use onCaptured as an opportunity to update the UI to show a completed-but-pending-cropping UI state.

These are updated in both existing production document flow, as well as the upcoming React implementation. The first of the points above only affects existing flow, since this is managed separately in the React application (source).

Other minor notes:

  • AcuantImageProcessingService.wasm was removed and replaced by AcuantImageProcessingService.js.mem, which requires a few server-side revisions.
  • Since these files are not part of the asset pipeline, I've referenced them in loading with an appended query parameter, intended as a simplistic cache bust technique. We could also incorporate the version in the file name if the query parameter might pose a problem (related).

@aduth aduth force-pushed the aduth-upgrade-acuant branch from a119a18 to 50a65d0 Compare August 27, 2020 14:31
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants