I have developed a video streaming app that streams video from one android device to another (and not the other way around). When both devices are on their individual LTE network the app works fine. But when one of the devices is connected to WiFi the app fails in the handshaking (exchange of offer and answer) and shows this in logs
D/null localPeerCreation:
onIceConnectionChange() called with:
iceConnectionState = [CLOSED]
(in some cases there is FAILED in place of CLOSED)
I don't know why this is happening that in case of individual LTE it works but with WIFI it doesn't. I have been trying to debug this problem for quite some time but I can't point my finger at anything because there are also very fewer references for android implementation of WebRTC. Please Help.
Edit: I was starting to send the Ice candidates before Xirsys responded with the candidates so the TURN server was never used. So I changed my app such that any handshaking will only happen after the candidates have been received from Xirsys. I know it was pretty dumb.
I am not familiar with Xirsys' TURN servers, but it might not cover all cases need to connect an LTE both clients.
I would check into the following.
If you can share the candidates on both sides and your RTCConfiguration that would help a lot. Make sure to anonymize your URLs and IPs!