aws / amazon-chime-sdk-js

A JavaScript client library for integrating multi-party communications powered by the Amazon Chime service.
Apache License 2.0
699 stars 473 forks source link

Fixed reconnections not triggering `audioVideoWasDemotedFromPrimaryMeeting` #2893

Closed hensmi-amazon closed 1 month ago

hensmi-amazon commented 1 month ago

Issue #: N/A

Description of changes: Reconnections were not triggering audioVideoWasDemotedFromPrimaryMeeting, only full disconnects. This change fixes that. I also made a new status code for this because the previous didn't always make sense since reconnects can occur due to client side issues.

Testing: Reconnections now trigger the callback. Can these tested using a demo application? Please provide reproducible step-by-step instructions.

  1. Join a replica meeting
  2. Promote
  3. Switch wifi and wait for reconnect
  4. You should see a toast describing that you were disconnected

Checklist:

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

  2. Do you add, modify, or delete public API definitions? If yes, has that been reviewed and approved? n

  3. Do you change the wire protocol, e.g. the request method? If yes, has that been reviewed and approved? n

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