1

I created a webrtc android application using libjinge library, my issue is unable to reconnect after a network failure,In browser used 'icerestart', how to ICE Restart in Android peerconnection client?

1 Answers1

3

As the android peer connection object doesn't have any icerestart() method we have to do a workaround in our code to re-establish the connection.

Steps should be:

  1. Put additional constraint:
constraints.mandatory.add(new MediaConstraints.KeyValuePair("IceRestart","true"));
  1. Create offer again using that constraints:
peerConnection.createOffer(new YourSdpObserver(),constraints);
  1. Set generated sdp to peerConnection using setLocalDescription.:
peerConnection.setLocalDescription(new YourSdpObserver(),sdp);
  1. Send it to the remote peer.
Kathan Patel
  • 368
  • 3
  • 11