Closed funayamateppei closed 2 months ago
start process is designed to be async and cannot return results until connection established with backend.
Instead of using setTimeout, please use audioVideoDidStart
event to know when the meeting connects and you can use that function. See https://github.com/aws/amazon-chime-sdk-js/blob/main/README.md#starting-a-session.
Community Note
Tell us about your request
What do you want us to build?
The request is for the amazon-chime-sdk-js package.
Tell us about the problem you are trying to solve and why is it hard?
When attempting to retrieve the list of participants immediately after connecting to a call using
start
and then callinggetRemoteVideoSources
, an empty array is returned despite participants being present. It seems that thestart
method does not return an instance that can retrieve the list of participants right after the call connection.It would be helpful if
start
could return an instance that allows retrieving the list of participants immediately. Alternatively, is there a method to retrieve the list of participants right when the call is connected?Additionally, it would be helpful if the
start
method were asynchronous. Currently, we have to work around this by usingsetTimeout
to wait for one second before attempting to retrieve the list of participants.How are you currently solving a problem?
Currently, there is no effective workaround as the
getRemoteVideoSources
method returns an empty array immediately after connecting to a call. We are usingsetTimeout
to wait for one second before callinggetRemoteVideoSources
, but this is not an ideal solution.Additional context
This code uses setTimeout to wait for one second before calling getRemoteVideoSources to retrieve the list of participants, as the method returns an empty array immediately after the call connection, despite participants being present.