-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(liveness): Update start-screen UX * feat(liveness): more ux updates to match design mocks * chore: remove unused variables * chore: add disableStartScreen prop * make initial oval match dark mode theme * update styles * chore: update unit tests * chore(liveness): fix liveness to work with v6 * chore: fix size update * reomve unused import * small fixes * chore: remove StartLiveness, refactor * more code cleanup * increase wait time to 1 second * chore: fix unit tests and refactor * more cleanup * chore: fix color mode bug, fix glitchiness while loading, add internal hook for color mode * fix unti test * chore: add customization for recording icon and cancel button * Create pretty-tables-live.md * Update examples/next/pages/ui/components/liveness/components/LivenessInlineResults.tsx Co-authored-by: Scott Rees <[email protected]> * Update examples/next/pages/ui/components/liveness/components/LivenessInlineResults.tsx Co-authored-by: Scott Rees <[email protected]> * chore: update unit tests * remove unused variable * remove more unused variables * update snapshot * chore: fix liveness docs * chore: fix liveness e2e tests * chore: update useColormode hook * chore: update liveness docs * fix bbox generation formula * small refactor updates * chore: more liveness docs updates * chore: address ux feedback * address more liveness feedback * more fix * Update docs/src/pages/[platform]/getting-started/migration/migration.react.mdx Co-authored-by: Scott Rees <[email protected]> * update css colors * update white color in one more place * chore: remove component updates, refactor local storage to utils * fix unit test --------- Co-authored-by: Ayush Goyal <[email protected]> Co-authored-by: Scott Rees <[email protected]>
- Loading branch information
1 parent
ca86625
commit 872e27d
Showing
54 changed files
with
948 additions
and
787 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
"@aws-amplify/ui-react-liveness": major | ||
--- | ||
|
||
breaking(liveness): update liveness UX | ||
|
||
Replace start screen with instructions with a new hair check start screen that lets end users interface with the camera. Also added camera selection and upgraded the blazeface model. | ||
|
||
Updated `disableInstructionScreen` to `disableStartScreen` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -681,6 +681,55 @@ The latest version of the `Authenticator` has a completely different set of CSS | |
Previous versions of `Authenticator` exposed a `onAuthUIStateChange` handler to detect Auth state changes. For similar functionality see [useAuthenticator](/react/connected-components/authenticator/advanced#access-auth-state). | ||
## `@aws-amplify/ui-react-liveness` | ||
### Migrate from 2.x to 3.x | ||
#### Installation | ||
Install the 3.x version of the `@aws-amplify/ui-react-liveness` library. | ||
<Tabs.Container defaultValue="npm"> | ||
<Tabs.List> | ||
<Tabs.Item value="npm">npm</Tabs.Item> | ||
<Tabs.Item value="yarn">yarn</Tabs.Item> | ||
</Tabs.List> | ||
<Tabs.Panel value="npm"> | ||
<TerminalCommand command="npm install [email protected] @aws-amplify/[email protected]" /> | ||
</Tabs.Panel> | ||
<Tabs.Panel value="yarn"> | ||
<TerminalCommand command="yarn add [email protected] @aws-amplify/[email protected]" /> | ||
</Tabs.Panel> | ||
</Tabs.Container> | ||
#### Update and Usage | ||
Optionally update your App with the new prop usage: | ||
**App.js** | ||
```diff | ||
const App = () => ( | ||
return ( | ||
<ThemeProvider> | ||
{loading ? ( | ||
<Loader /> | ||
) : ( | ||
<FaceLivenessDetector | ||
sessionId={createLivenessApiData.sessionId} | ||
region="us-east-1" | ||
onAnalysisComplete={handleAnalysisComplete} | ||
- disableInstructionScreen={true} | ||
+ disableStartScreen={true} | ||
/> | ||
)} | ||
</ThemeProvider> | ||
); | ||
); | ||
``` | ||
#### CDN CSP Policy | ||
The 3.x version of the `FaceLivenessDetector` has been updated to use the latest version of TensorFlow and Blazeface, thus the default CDN paths have changed. If your application has an existing CSP policy, ensure your policy allows https://cdn.liveness.rekognition.amazonaws.com. If you are using a custom CDN make sure to update your CDN versions to match [@tensorflow/tfjs-backend-wasm](https://www.npmjs.com/package/@tensorflow/tfjs-backend-wasm/v/4.11.0) and [@tensorflow-models/face-detection](https://www.npmjs.com/package/@tensorflow-models/face-detection/v/1.0.2).Please look over the [Liveness Config](../connected-components/liveness/customization#facelivenessdetectorconfig) section for more information. | ||
### Migrate from 1.x to 2.x | ||
#### Installation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.