Skip to content

Camera remains in use even after unmounting the FaceLiveness component. #6245

Open
@rishabhgupta1234

Description

@rishabhgupta1234

Before creating a new issue, please confirm:

On which framework/platform are you having an issue?

React

Which UI component?

Liveness

How is your app built?

Create React App

What browsers are you seeing the problem on?

Chrome, Firefox, Microsoft Edge

Which region are you seeing the problem in?

No response

Please describe your bug.

I am encountering an issue with FaceLivenessDetectorCore while implementing face liveness detection for users. After the face liveness process is completed, the camera light remains on, indicating that the camera is not being released properly.

It seems that FaceLivenessDetectorCore continues to access the user's camera permissions and does not release the camera resource once the face liveness process is finished.

What's the expected behaviour?

After the face liveness process is completed, the camera should be released, and the camera light should turn off.

Help us reproduce the bug!

  1. Run FaceLivenessDetectorCore independently, and it will request camera permissions.
  2. Complete the face liveness check.
  3. After the process is completed, the camera light remains on.

Code Snippet

import { FaceLivenessDetectorCore } from '@aws-amplify/ui-react-liveness'

<FaceLivenessDetectorCore
    sessionId={sessionId}
    region={AWS_AMPLIFY_REGION}
    onAnalysisComplete={handleAnalysisComplete}
    onError={handleLivenessComponentError}
    config={getLivenessConfig()}
/>

Console log output

No response

Additional information and screenshots

No response

Metadata

Metadata

Assignees

Labels

LivenessbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions