aws / amazon-chime-sdk-js

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

Limit max Redundant Audio Encoding packet size to 1000 bytes. #2763

Closed dinmin-amzn closed 11 months ago

dinmin-amzn commented 11 months ago

Issue #:

Description of changes: In Chromium-based browsers, writing audio frames larger than 1000 bytes will cause an error to be thrown, so we limit the max Redundant Audio Encoding packet size to 1000 bytes. See https://crbug.com/1248479.

Testing: Previously, starting a call with WebAudio, Redundant Audio Encoding, and fullband music stereo quality all enabled and introducing high uplink packet loss (>20%) would cause the Redundant Audio Encoding payloads to exceed the Chromium-imposed limit and audio sending would stop working for the rest of the meeting. This issue is fixed by this PR.

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

  1. Have two attendees join a meeting using Chrome with WebAudio, Redundant Audio Encoding, and fullband music stereo quality all enabled
  2. Enable audio sending and receiving for both clients
  3. Introduce >20% uplink packet loss
  4. Both attendees should still be able to receive and hear audio from the other attendee

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.