react-native-webrtc / react-native-incall-manager

Handling media-routes/sensors/events during a audio/video chat on React Native
ISC License
547 stars 191 forks source link

BLUETOOTH Device not listed #236

Open mudioo opened 7 months ago

mudioo commented 7 months ago

Hello, i am trying to get the list of all audio devices wich are connected to a android phone.

InCallManager.start({ media: "audio" });

DeviceEventEmitter.addListener("onAudioDeviceChanged", (event) => {
  console.log(event.availableAudioDeviceList);
});

//output: ["EARPIECE","SPEAKER_PHONE"] //expected output: ["BLUETOOTH","EARPIECE","SPEAKER_PHONE"]

I am trying it with a bluetooth speaker and with airpods on a xiaomi redmi 12 phone.

wilmxre commented 6 months ago

you can try RNCallKeep.getAudioRoutes() or RNCallKeep.addListener('didChangeAudioRoute') and see if it gives you back the bluetooth device as expected