Closed zaid296imtiaz closed 3 years ago
I experience the same but with audio calls in #1028
I can’t go through your code, sorry. Make sure you call release() on the track.
I am also facing the same issue. Any update?
Yes release() was not properly called on the stream. Make sure you add a .catch()
to your .then
to see if there's a mistake above your release call.
Our iOS app has audio video calling implemented using the following technologies:
"react-native": "0.63.4" "react": "16.13.1" "react-native-webrtc": "^1.87.3" "react-native-incall-manager": "^3.3.0" iOS version 14.4.1
Our calling module works like the following:
First request and initiate audio call Then request and initiate video call On the code side things work like this:
We call the getStream() function which gets the user media for audio call i.e Audio only Then we call the startStream() function which connects the peer connection On requesting video we call the getVideoStream() method to get Audio and Video streams Call startStream() again to start peer connection with video The scenario is as follows:
We start off by connecting an audio call. On success the audio call is connected and works fine as expected We request for video and connect video call, all works fine as expected and I receive video on both ends When I disconnect the call and stop tracks using this.state.localStream.getTracks(), the mic does not close. An orange indicator for mic is visible on iOS. Important Notes:
Disconnecting from the audio call closes the mic just fine
Even if we get video stream on audio call and disconnect without connecting video it still works fine and closes both tracks
Its only when I connect the video is when the issue arises
Calling InCallManager.stop() closes the mic but does not open it on second call. The mic does not open on second call and the orange mic indicator on iOS is not shown.
Get User Media Audio Call
getStream() { InCallManager.setSpeakerphoneOn(false); InCallManager.setMicrophoneMute(false);
} Get User Media for Video Call
getVideoStream() { this.state.peerConn.removeStream(this.state.localStream); InCallManager.setSpeakerphoneOn(false); InCallManager.setMicrophoneMute(false);
} Start Stream Function
startStream() { console.log('start Stream');
} newPeerConnection()
newPeerConnection() { var peerConn = new RTCPeerConnection({ iceServers: turnServer, });
} Close Tracks
if (this.state.localStream) { const tracks = this.state.localStream.getTracks();