livekit / client-sdk-flutter

Flutter Client SDK for LiveKit
https://docs.livekit.io
Apache License 2.0
229 stars 109 forks source link

[bug] Android loudspeaker never being used during calls #458

Open victorlsn opened 5 months ago

victorlsn commented 5 months ago

Describe the bug I'm working on an app that deals with videocalls, and so I'd like to use the loudspeaker while on a call, rather than using the earpiece. Unfortunately, I've been trying to switch the audioOutput for Android (after connection is established) and it just won't work. I've even tested creating a button that alternates through the two devices (earpiece and speaker), and while "selectedAudioOutput" does change, there's no change on where the sound is coming from or on the volume.

To Reproduce Just connect on a call and try to use Hardware.instance.selectAudioOutput() to change the output device.

Expected behavior Audio starts coming from the loudspeaker instead of earpiece.

Platform information