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

Attendee doesn't republish local video or see other attendee video after network change when server side network adaptation enabled #2882

Closed nathan-wright-streem closed 1 month ago

nathan-wright-streem commented 2 months ago

What happened and what did you expect to happen?

This is similar to #2560, but when SS network adaptation is enabled.

When an attendee's network connection changes (e.g., when a cell phone's changes from a WIFI connection to the cell connection or vice versa) and they are viewing video for a remote attendee, Chime throws the following error:

index.js:18 Uncaught TypeError: Cannot read properties of null (reading 'length')
    at Object.utf8_length [as length] (index.js:18:32)
    at Writer.write_string [as string] (writer.js:392:20)
    at Function.encode (SignalingProtocol.js:13461:50)
    at Function.encode (SignalingProtocol.js:13140:57)
    at Function.encode (SignalingProtocol.js:312:45)
    at DefaultSignalingClient.sendMessage (DefaultSignalingClient.js:253:91)
    at DefaultSignalingClient.remoteVideoUpdate (DefaultSignalingClient.js:141:14)
    at DefaultAudioVideoController.sendRemoteVideoUpdate (DefaultAudioVideoController.js:846:37)
    at DefaultAudioVideoController.updateRemoteVideosFromPolicy (DefaultAudioVideoController.js:643:23)
    at DefaultAudioVideoController.update (DefaultAudioVideoController.js:614:59)

This does not happen when either SS network adaptation is disabled or the other attendee is not displaying video. We are not using simulcast.

Have you reviewed our existing documentation?

Reproduction steps

  1. join a meeting with another attendee whose camera is on
  2. change your network (on a cell phone, this can be enabling or disabled a WIFI connection)

Amazon Chime SDK for JavaScript version

3.21.1

What browsers are you seeing the problem on?

chrome

Browser version

124.0.6367.54

Meeting and Attendee ID Information.

No response

Browser console logs

console_logs_chime_error.txt

hensmi-amazon commented 2 months ago

Hello, thank you for the report. This sounds like something I also ran into and fixed in https://github.com/aws/amazon-chime-sdk-js/pull/2878. I will still try to double check using the reproduction steps here.

Unfortunately I don't know if there's any way to mitigate this without a release or fork (though at least we have started a monthly cadence of releases).

hensmi-amazon commented 2 months ago

On an unrelated note, may I ask why simulcast (or VP9 SVC) is being avoided? It is quite beneficial with network adaptation, as it allows for quicker responses (to avoid impacting audio), without needing to fully pause video.

nathan-wright-streem commented 2 months ago

On an unrelated note, may I ask why simulcast (or VP9 SVC) is being avoided? It is quite beneficial with network adaptation, as it allows for quicker responses (to avoid impacting audio), without needing to fully pause video.

We are in the process of implementing Chime and were trying to implement MVP and weren't sure that we need simulcast. Also, as of now, all of our use cases involve 2 participants.

hensmi-amazon commented 2 months ago

I have verified the fix on reconnection. We usually put up a github on the first thursday of each month to confirm when the next release will be.

nathan-wright-streem commented 1 month ago

This is already closed, but I did verify that it is fixed!