livekit / client-sdk-js

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

Others could hear my voice but I couldn't hear others' voices when I minimized the webview on iOS. #1116

Closed Tyrese-FullStackGenius closed 6 months ago

Tyrese-FullStackGenius commented 6 months ago

Describe the bug

Hi LiveKit team, I'm using livekit-server for video conferencing. And I noticed that others could hear my voice but I couldn't hear others' voices when I minimized the webview on iOS. It's okay with livekit-client v1.15.4 but only on new versions (v2.x). This is an important function because users have to switch apps when users are in a meeting.

Reproduction

I tested at livekit cloud (meet.livekit.io)

Logs

No response

System Info

iOS

Severity

blocking an upgrade

Additional Information

No response

lukasIO commented 6 months ago

this is related to a WebKit bug that suspends WebAudio audio contexts when the browser/app goes into background (see report here).

With v2.0 we switched the default audio mode to use the WebAudio API. This was done also as a step to support audio processor plugins without any modifications needed of default config options.

If keeping the audio playing also in background is important to your app on iOS, you can manually set { webAudioMix: false } in your room options.

cc @davidzhao for thoughts on whether we should change the default audio mode for iOS given this bug. The downside would be that for people who currently use audio processors with iOS, their processor code paths would start to break if they don't explicitly specify webAudioMix: true.

davidzhao commented 6 months ago

IMO we should keep the default consistent across platforms. It would introduce confusion if track processing starts breaking only on a specific platform