Hi Ankit-Aggarwal, Thank you so much for this wonderfull code for establishing video call using WebRTC in pure swift. I found lot of other cods that are not is pure swift. I implemented the video call using WebRTC and PubNub with the help of this code. But in my project I want to continue the calling process in background also. Also after establishing the video call, and I navigate from VideoChat screen to other screens I need to continue the calling like video needs to paused but voice call needs to continue. But here when I navigate back from the VideoChat screen without disconnecting the call, I'm getting callback in the deinit method and the removing the stream from the peerConnection and call get disconnected, and I commented the code then the app get crashed. Can you please help me I don't want to disconnect the call when I navigate back to other screens of the same app.
The deinit method is,
deinit { guard let peerConnection = self.peerConnection else { return } if let stream = peerConnection.localStreams.first { print(stream) audioTrack = nil peerConnection.remove(stream) } @@}
Hi Ankit-Aggarwal, Thank you so much for this wonderfull code for establishing video call using WebRTC in pure swift. I found lot of other cods that are not is pure swift. I implemented the video call using WebRTC and PubNub with the help of this code. But in my project I want to continue the calling process in background also. Also after establishing the video call, and I navigate from VideoChat screen to other screens I need to continue the calling like video needs to paused but voice call needs to continue. But here when I navigate back from the VideoChat screen without disconnecting the call, I'm getting callback in the deinit method and the removing the stream from the peerConnection and call get disconnected, and I commented the code then the app get crashed. Can you please help me I don't want to disconnect the call when I navigate back to other screens of the same app.
The deinit method is,
deinit { guard let peerConnection = self.peerConnection else { return } if let stream = peerConnection.localStreams.first { print(stream) audioTrack = nil peerConnection.remove(stream) } @@}