amazon-chime-sdk-android
amazon-chime-sdk-android copied to clipboard
Peer Discovery after reconnect
Describe the bug Not sure if this is a bug, feel free to change the type to "feature" or "question".
What would be the correct way to discover remote attendees presence after local reconnect? RealtimeObserver#onAttendeeXXX(...)
callbacks don't seem to be consistently reflecting the changes after the meeting is reconnected on both sides.
A use case we're seeking is a conversation between two peers. We want to be able to show some type of reconnect UI until both peers are present and are able to stream/are streaming the video to avoid a situation where a participant reconnects to the room but there's no one there. The initial room join scenario is covered well, however, we are exploring different in-call disconnect scenarios mostly revolving around short network disruptions during a meeting. They don't seem to provide the level of information we need.
To Reproduce Steps to reproduce the behavior in the Chime demo app.
- Start the meeting and connect two participants (Web and Android in my case).
- While in the meeting, disconnect the network on Android.
- Disconnect the network on Web.
- Reconnect the network on Android.
Expected behavior
After AudioVideoObserver#onAudioSessionStarted
is called, we should be able to know the remote participant had dropped. However, RealtimeObserver#onAttendeesDropped
does not get called. In fact, I don't see any invocations of RealtimeObserver
callbacks. In the demo app, I can still see the dropped attendee in the list.
Test environment Info (please complete the following information):
- Device: any
- OS: any
- Version amazon-chime-sdk: 0.11.0
- Version amazon-chime-sdk-media: 0.11.0
Additional context
If getting that information from RealtimeObserver
is a wrong assumption, can you please suggest other ways to detect if the remote attendee has dropped while the local attendee was disconnected as well? Is it possible?
Hi @tmilovan123 , While android attendee is disconnected, it will miss the RealtimeObserver events from other attendees. We will consider this as a feature request.
Hi @zhinang-amazon ,
Sorry, I want to be really clear here - I don't expect them to be notified while they are disconnected, but after they got reconnected. I have checked with Web and iOS, and it seems that right after the local participant reconnects, they receive onAttendeeDropped
callback with the list of the users removed while they were disconnected.
So this seems to be working on other platforms. Is it not implemented on Android?
Thanks, Tanya.
@zhinang-amazon Do we have any update on this one? Not a blocking issue, but interested in it since the same functionality appears to be working on other platforms (from my conversations with iOS engineers, iOS seems to be affected but they only seen it once or twice).
@tmilovan123 Sorry for late reply. We are currently investigating it.
Hello @tmilovan123, server doesn't hold the information about the dropped event, so if mobile clients missed this event, it won't be able to receive further dropped event. I was able to confirm the behavior on both iOS and Android. You might not see the same UI update for the web, however, due to its own handling logic of presence. code. However, for the web, dropped value will still be false, so technically, the behavior is same, but the way the attendee presence is handled is different.
The drop event currently takes around ~15s if you are not muted and ~30s for mobile SDK if you are muted, so some of tests on iOS might have passed due to not waiting long enough.
Since we already have added enhancement label, we'll update the ticket once we have additional logic to store these or make some workaround.
Thanks. Let us know if you have further question.
Got it, thank you for the explanation!
We found a related issue in our testing. If you want us to open this as a separate issue, please let us know.
Steps to reproduce.
- Join the meeting from web and mobile
- Turn off the internet on mobile
- Drop the web attendee
- Turn on the internet on mobile - Mobile participant will automatically reconnect and join the meeting
- Mobile attendee will see the dropped web attendee
We understand that server is not storing the dropped attendee, we believe this is not a right approach in the above case. There is no way to notify the mobile attendee about the missed event while he was offline. Surprisingly, join and other events are working and updating when the mobile attendee is back to the meeting. Only left attendee event is missing. So, we think this has to be marked a bug instead of a feature request or enhancement.
We've changed this to a bug and are currently investigating.
@dylonChime @zhinang-amazon hello, I was wondering if there is any update on this matter? Thanks.