amazon-chime-sdk-js
amazon-chime-sdk-js copied to clipboard
Simultcast - `remoteVideoSourcesDidChange` called with incorrect number of videoSources
What happened and what did you expect to happen?
3rd attempt to enable simulcast in our app.
remoteVideoSourcesDidChange is called with an incorrect number of videoSources
Have you reviewed our existing documentation?
Reproduction steps
We haven't tested to see if this can be reproduced in a simple setup, so it may apply only to our app.
Using:
DefaultSimulcastUplinkPolicy.config.serverSideNetworkAdaption = ServerSideNetworkAdaption.BandwidthProbing
Layout (devices are of no relevance, except for the number of attendees):
- Device A (local)
- Device B (remote)
- Device C (remote)
- all devices have their cameras ON
When Device C hits refresh :
- A will see B as having turned off its camera (also its stream disappears), though B has not taken any action.
remoteVideoSourcesDidChangeis triggered twice; once with the remaining remote video source (B) and the second time with an empty array.- weirdly enough, we can't reproduce in less or more than 3 attendees
- cannot reproduce when not using simulcast
Amazon Chime SDK for JavaScript version
3.6.0
What browsers are you seeing the problem on?
any
Browser version
any
Meeting and Attendee ID Information.
No response
Browser console logs
no logs needed
Hi @kelvin2200 we will try to reproduce. Is this reproducible without config.serverSideNetworkAdaption = ServerSideNetworkAdaption.BandwidthProbing ? Also console logs would be nice if we are not able to reproduce.
I was able to reproduce this issue using JS SDK browser demo.
Steps:
- Three attendees (1, 2, 3) join the meeting enabling
simulcast,priorityBasedDownlinkPolicywithBandwidthProbing. - All of three enable camera.
- Refresh page in the window of attendee 3.
- From attendee 1's window, attendee 3's video tile disappears, and attendee 2's video tile disappears shortly and appears.
- From attendee 2's window, attendee 3's video tile disappears, and attendee 1's video tile disappears shortly and appears.
step 4 and 5 happens at the same time.
I observed three remoteVideoSourcesDidChange events from either attendee 1 or attendee 2's perspective:
videoSourcescontains the remaining remote attendee. (expected result)videoSourcesis empty.videoSourcescontains the remaining remote attendee. (expected result)
Hi @kelvin2200 we will try to reproduce. Is this reproducible without
config.serverSideNetworkAdaption = ServerSideNetworkAdaption.BandwidthProbing? Also console logs would be nice if we are not able to reproduce.
The main reason why we gave simulcast another try IS ServerSideNetworkAdaption.BandwidthProbing because without it, we're left with a whole different batch of Safari issues (tiles being paused randomly etc...). We loved the idea of server-sided metrics, and it seems to work nicely with the exception of the scenario above.
P.S. I don't know if it's related to the same issue, or perhaps I should open another one, but a more reliable scenario to reproduce the same (or at least very similar) issue, is with a random number of attendees, and one of them starts and stops sharing his screen while having the camera ON. At some point, one of the remaining video streams gets turned off for everybody.
Any update on this issue? I see 3.7.0 has been released. Has this been addressed in any way?
@hensmi-amazon @xuesichao ?
Hi @kelvin2200 , sorry for the late reply. 3.7.0 doesn't include a fix for this. Let me debug this further to figure out the root cause and come back to you later. thanks for your patience.
I reproduced the issue without using BandwidthProbing, and observed exact same results as previous test.
I used the same repro steps list below.
Steps:
- Three attendees (1, 2, 3) join the meeting enabling
simulcast,priorityBasedDownlinkPolicywithBandwidthProbing.- All of three enable camera.
- Refresh page in the window of attendee 3.
- From attendee 1's window, attendee 3's video tile disappears, and attendee 2's video tile disappears shortly and appears.
- From attendee 2's window, attendee 3's video tile disappears, and attendee 1's video tile disappears shortly and appears.
step 4 and 5 happens at the same time.
I observed three
remoteVideoSourcesDidChangeevents from either attendee 1 or attendee 2's perspective:
videoSourcescontains the remaining remote attendee. (expected result)videoSourcesis empty.videoSourcescontains the remaining remote attendee. (expected result)
The only difference is step1. Three attendees (1, 2, 3) join the meeting enabling simulcast, priorityBasedDownlinkPolicy with Server Side Network Adaption set to None instead of using BandwidthProbing.

Got the same results:

It seems it's not a BandwidthProbing issue. @hensmi-amazon
Sorry for the delay it seems this slipped out of my radar. I have reproduced the issues with simulcast and have pushed some fixes to both client and backend. The client changes should be in the next release and the backend changes should also hopefully be deployed by then as well.
Thanks a lot for this fix! Is there an ETA on when this will be released?
The fix has been released in the latest 3.9.0 version on Sep 21.
The fix has been released in the latest 3.9.0 version on Sep 21.
This version is already in the changelog, but it is not yet available npmjs, do you have any predictions for when it will be available there?
@bjason, any estimate on when version 3.9.0 will be released?
Unfortunately we try to avoid giving specific dates for release but we should have one soon. Also for the backend changes which had the bulk of fixes, those have been deployed so you should be able to see improvement even with previous JS SDK version, the JS SDK change just has a fix for some video freezes but you shouldn't see the incorrect remoteVideoSourcesDidChange callback anymore. Please let us know if you see differently.
3.9 has been released, please reopen or open a new issue if you continue to see issues.