mediasoup-client-swift
mediasoup-client-swift copied to clipboard
Receive Transport Crash on second call
PS - Tried almost everything. Checked discourse group as well.
Case - First time everything works fine, able to leave the call as well BUT when trying to join again then its crashes in the beginning with below error
On leave -
- Attempt 1 - Tried setting to nil to all the property (consumer, producer, track, media, device close and nil) and socket disconnect
- Attempt 2 - Only socket disconnect
- Attempt 3 - consumer close, sent pause consumer socket and socket disconnect
What is the correct way to do this?
Transport callback handling ` func onConnectionStateChange(transport: Transport, connectionState: TransportConnectionState) { LOG.debug("Transport- Reconnect- (transport.id == sendTransport?.id ? "send" : "receive") onConnectionStateChange == (connectionState)")
qJMMediaBGQueue.async {
if connectionState == .disconnected && self.isCallEnded{
LOG.error("Transport- End- transport closed")
transport.close()
return
}
if connectionState == .closed && transport.id == self.sendTransport?.id{
LOG.error("Transport- End- transport sent closed - stop capture")
self.videoCapture?.stopCapture()
}
}
`