aws / amazon-chime-sdk-component-library-react

Amazon Chime React Component Library with integrations with the Amazon Chime SDK.
Apache License 2.0
268 stars 160 forks source link

Destroy the VoiceFocus transformer on unmount of VoiceFocusProvider #859

Closed michhyun1 closed 1 year ago

michhyun1 commented 1 year ago

Issue #:

Description of changes: Related to: https://github.com/aws/amazon-chime-sdk-js/pull/2526

  1. Need to stop the voice focus transformer on unmount to prevent memory leak. BG Blur and BG Replacement do the same already.

  2. Stop initializing a BG Blur and BG Replacement on mount. It's not being used anyways.

Testing

  1. Have you successfully run npm run build:release locally? Yes

  2. How did you test these changes? In the meeting demo, join a meeting with Web Audio enabled. Then, leave the meeting.

Then, open the Task Manager for Chrome and see that the chrome tab that is running the meeting demo has one dedicated worker. Then, disable Web Audio checkbox. Verify that the worker thread has been killed.

  1. If you made changes to the component library, have you provided corresponding documentation changes? Yes

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

michhyun1 commented 1 year ago

tests will fail until JS SDK is merged into NPM, as this change requires the JS SDK changes