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 471 forks source link

Make uplink loss percent estimation for redundant audio more accurate #2800

Closed dinmin-amzn closed 8 months ago

dinmin-amzn commented 8 months ago

Issue #: n/a

Description of changes:

During canary testing, it was discovered that the local uplink loss metric that was being calculated was 10-20% higher than the actual uplink loss being simulated. Because of this discrepancy, RED kept turning off when 60% uplink loss was being simulated because the client-side RED thought that the uplink packet loss was 65-80%, which would constantly trigger the functionality to disable RED to avoid congestion collapse. This causes RED to turn off prematurely even when the uplink loss is considerably lower than 75%. This change makes the estimation more accurate so that RED does not turn off prematurely.

Testing:

Can these tested using a demo application? Please provide reproducible step-by-step instructions.

  1. Join a meeting with RED enabled
  2. Simulate 60% uplink loss using something like Network Link Conditioner for Mac
  3. When viewing the browser logs, RED should not be turning off constantly since 60% uplink loss is much lower than the 75% turn off threshold.

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.