webrtcwebrtc-android

Gathering ice candidates works but failing to connect


I have two different WebRTC clients: an Android device and an angular application. I set up a turn and stun server and both seems to work with the trickle ice tester and the webrtc tester.

As you can see here:

trickle ice results

webrtc test results

But all ice candidates fail in Firefox when I am watching the candidates in about:webrtc. ice candidates in Firefox

Does anyone have an explanation for this?
More info:


Solution

  • There was a simple error in my Android app. When receiving an ice candidate from the signaling server I did the following:

    peerConnection.AddIceCandidate(new IceCandidate(sdpCandidate, sdpMLineIndex, sdpMid));
    

    But as the documentation states you have to create an ice candidate in this order:

    public IceCandidate(string sdpMid, int sdpMLineIndex, string sdp);
    

    So I turned the sdpCandidate and sdpMid around to fix the issue.

    peerConnection.AddIceCandidate(new IceCandidate(sdpMid, sdpMLineIndex, sdpCandidate));