Open rixiang-dev opened 1 year ago
To workaround for now, please make sure that startAudioInput
finished before start connecting.
One more customer here who hit this issue using the chime sdk. We used the workaround but adding a +1 to this coming up as an issue and being a little tricky to discover what's going wrong so would be great to fix in the library.
Just wanted to share that we discovered that this was the cause of numerous long-standing reports that "other people can't hear me" or "I can't hear other people" when joining a meeting. While enforcing that device setup occurs first does solve the race condition, doing that also slows join time significantly (for me, on my machine, adds at least 2500ms), as compared to letting device setup and peer connection happen somewhat in parallel. Which is quite a tradeoff for us.
What happened and what did you expect to happen?
When joining demo app (e.g. navigating device selection page fast (<1s) or quick-join which skips device selection), a race condition might happen between open audio device(getUserMedia()) and creating empty device during ReceiveAudioInputTask() during signaling. If former one, which is triggered asynchronous when joining a meeting, was still pending when ReceiveAudioInputTask() being executed during connection, SDK would create a null audio device. Compared with actual selected audio device still being read, this null audio device was added later into audioInputTaskQueue, meaning when consuming this queue it would be proceeded after actual audio input device was loaded and overrode it. Audio will not be working until user manually select audio device again later.
cd94ece5-7bba-4477-beff-8bc4987e0706 is a call between iPhone w/o Web Audio(iOS) and Macbook (left and right).
Notes (chat message) during test
Have you reviewed our existing documentation?
Reproduction steps
Amazon Chime SDK for JavaScript version
3.9.0
What browsers are you seeing the problem on?
Chrome on iPhone w/ iOS 16.1
Browser version
108.0.5359.112
Meeting and Attendee ID Information.
MeetingID: cd94ece5-7bba-4477-beff-8bc4987e0706 AttendeeID: 4df2cc19-bcc7-a179-1d58-5096fcea7632
Browser console logs
Full JS SDK demo log: cd94ece5-7bba-4477-beff-8bc4987e0706-IOS.txt
Selected logs with annotation :