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 rare race conditions with simulcast + server side network adaptation on third attendee join. #2906

Closed hensmi-amazon closed 2 weeks ago

hensmi-amazon commented 3 weeks ago

Issue #: N/A

Description of changes: Just was testing something else and ran across this. The remote video update logic can happen during subscribe (which is mostly fine) and caused issues to the mappings used in the track mapping.

Additionally, the currently location of subscribeFrameSent can cause discrepancies to the track mapping to transceiver. This doesn't cause issues to all highest policy because it will resubscribe anyways, but with SSNA we do not resubscribe in this case.

Testing: See steps below Can these tested using a demo application? Please provide reproducible step-by-step instructions.

  1. Enable simulcast and SSNA and join 2 attendees and enable video
  2. Join a third attendee with SSNA. Depending on timing this can be anywhere from a 0-50% repro (my RTT is pretty low).

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.