flutter-webrtc / dart-sip-ua

A dart-lang version of the SIP UA stack.
MIT License
338 stars 266 forks source link

Switch Call audio with connected device and mobile internal speaker #387

Open ChiragLiveu opened 1 year ago

ChiragLiveu commented 1 year ago

Describe the bug After starting the call it defaults to use the speaker mode in mobile. Once I connected to a Bluetooth headphone or earbuds it must be switched audio to the connected device. it's working fine with iOS devices but not working with Android devices. I have checked the below devices and it's not working as expected.

I need to switch between devices when a call is active like (Phone Speaker, Mobile Loud Speaker, or Bluetooth Device connected)

Model : Samsung s22, one-plus 10T, onePlus 10 Pro Version: Android 12, Android 13

To Reproduce Steps to reproduce the behavior:

  1. Start the one-to-one call with connected earbuds
  2. switch between the audio to the speaker and Bluetooth device

Expected behavior We can switch audio as per the user selection of audio input and audio output device

System Infomation() Flutter SDK Version: Flutter 3.7.12 Dart 2.19.6 • DevTools 2.20.1 Android OS support to 10 or above

emosto commented 7 months ago

I experience the same behavior. This happens if _handelStreams(callState) is not invoked in the SREAM call state event.

I will be glad to spend time help with debuggign these issues. Just give me idea what you need as info.

eduardothiesen commented 3 months ago

Any news on this? I facing this problem too. I am to be able to switch between receiver, speaker and bluetooth device but I am not able to control the switch between bluetooth <-> receiver.

receiver <-> speaker (ok - if no bluetooth device is connected) bluetooth <-> speaker (ok) receiver <-> bluetooth (not ok - could not find a option to switch between them)