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

Do not no-op server side network adaptation pauses that happen immediately after subscribe #2917

Open hensmi-amazon opened 2 days ago

hensmi-amazon commented 2 days ago

Issue #: None

Description of changes: The new tile may not be added when subscribe ack is received since it relies on Peer Connection track callbacks. Therefore we extend ReceiveRemoteVideoPauseResumeTask to also pre-emptively create tiles. Note some of this code could have also gone in DefaultAudioVideoController but I figured I could just put it in the task and rename it to ManageServerSideNetworkAdaptationTask in a future version.

Testing: See steps below

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

  1. Join one client with SSNA, enable video, and use Network Link Conditioner to tank the downlink bitrate to 20kbps or lower
  2. Join another client and enable video
  3. Check pause on first client. Toggling video on second client should always result in pause in first (assumeing downlink bitrate is low enough).

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.