livekit / client-sdk-js

LiveKit browser client SDK (javascript)
https://livekit.io
Apache License 2.0
368 stars 149 forks source link

Problem of No Sound Sometimes in Chrome on IOS #1133

Closed eyupduran closed 5 months ago

eyupduran commented 6 months ago

Describe the bug

I can't hear audio from users with active microphones when navigating between rooms in the audio and video chat application on iOS Chrome browser. This issue only occurs on iOS Chrome. I've updated Livekit's version, but the problem persists

Reproduction

In the audio chat application, there are multiple rooms available, and users sometimes experience audio issues when switching between rooms, especially on iOS Chrome browser. Specifically, I can't hear users with active microphones intermittently. This problem seems to occur exclusively on iOS Chrome, as there are no issues on other platforms such as Chrome desktop or Android Chrome. I upgraded the Livekit client JS package from version 1.15.13 to 2.1.3, but it didn't resolve the issue. How can I fix this problem?

Logs

No response

System Info

Iphone 12 Pro,Chrome(124.0.6367.111)

Severity

annoyance

Additional Information

The device joining the room with iOS that cannot receive audio triggers the RoomEvent.ParticipantConnected event, and additionally, the audio indicator for the participant with an active microphone in the room keeps flashing, even though there is no audio coming from the room. So, it seems there's no issue with the Livekit connection. No response

lukasIO commented 5 months ago

Are you handling the RoomEvent.AudioPlaybackStatusChanged event?

eyupduran commented 5 months ago

No, I don't handling this Event. What exactly should I do in this event?

lukasIO commented 5 months ago

if audio playback failed you should show a button with a click handler that calls room.startAudio(), see also the docs here

eyupduran commented 5 months ago

In fact, I am building a room connection with user interaction. Doesn't this automatically trigger Room.startaudio?

lukasIO commented 5 months ago

it should, but it's not guaranteed. Listen to the event I mentioned to make sure that audio playback isn't blocked

eyupduran commented 5 months ago

okey, thanks for your interest