react-native-webrtc / react-native-callkeep

iOS CallKit framework and Android ConnectionService for React Native
ISC License
926 stars 445 forks source link

MIcrophone stays open after calling endCall #445

Open JeroenVanSteijn opened 3 years ago

JeroenVanSteijn commented 3 years ago

Bug report

Description

The red microphone bar stays on when the app is in the background after a call. Even after calling endAllCalls

Steps to Reproduce

  1. start a call (with react-native-webrtc)
  2. call endAllCalls
  3. go to the background

Versions

- Callkeep: 4.2.0
- React Native: 0.63.3
- iOS: 14.5
- Android: -
- Phone model: iPhone XS and iPhone 7 
JeroenVanSteijn commented 3 years ago

An extra note: I have seen with debugger on that I sometimes receive 561017449 when opening the audiochannel, indicating that it is already taken. Could it be possible that endAllCalls is not working correctly/as I think it should?

namnm commented 3 years ago

@JeroenVanSteijn endAllCalls will only end the calls from displayIncomingCall or startCall from callkeep itself.

What do you mean by start a call (with react-native-webrtc)? Did you end the call from that as well?

JeroenVanSteijn commented 3 years ago

@namnm I use a peer connection, whcih I close at the end like so:

stream.getTracks().forEach((track) => {
    track.stop();
    this.removeTrack(track, stream);
});
this.peerConnection.removeStream(stream);
this.peerConnection.close();
namnm commented 3 years ago

@JeroenVanSteijn So what if you completely remove callkeep? Does it happen? As I mentioned, endAllCalls will only end the calls from displayIncomingCall or startCall from callkeep itself If you dont use those methods, you may not need to callkeep at all

usamaabutt commented 3 years ago

@JeroenVanSteijn are you using agora.io with RNCallKeep?

homersimpsons commented 2 years ago

I have the same issue (on Android).

For the user that end the call the microphone indicator correctly disappear. But for the user where I call RNCallKeep.endCall(...) the microphone indicator stay. The only option I found to make it disappear is to kill the app entirely.

fukemy commented 1 year ago

sometimes my users warn me the orange dot still alive after close the call.

I want to ask: does anyone success to check the orange dot before join the call?