Ice restart

145 views
Skip to first unread message

Gps Test

unread,
Oct 4, 2022, 6:15:38 PM10/4/22
to discuss-webrtc
What is procedure for restarting ice after one peer loses and regains connection ?
This is in native C++.

My understanding is in connectionchange on failure to call RestartIce() and then resend your offer. Is that correct?

Alexander Abagian

unread,
Oct 5, 2022, 3:29:01 PM10/5/22
to discuss-webrtc
Run pc.restartIce(), catch onnegotiationneeded event, create offer there like below, and send it to the peer.

let offerOpts = {
  iceRestart: true,
  offerToReceiveVideo: true,
  offerToReceiveAudio: true
};
pc.createOffer(offerOpts).then((offer)=>{... send it ... });

среда, 5 октября 2022 г. в 01:15:38 UTC+3, gtes...@gmail.com:

Gps Test

unread,
Oct 9, 2022, 5:59:48 PM10/9/22
to discuss-webrtc
Looks like in C++ native, you dont need to set iceRestart to true, that RestartIce() will cause that to happen?

devil 2010

unread,
Dec 6, 2022, 11:08:19 PM12/6/22
to discuss-webrtc
Hi, can u help me what is "send it to server" ??
I am using janus audiobridge plugin, when ice restart, i create offer again, setlocaldescription,  but I dont know what need to send, what is the command to send..
 THanks u very much

Vào lúc 02:29:01 UTC+7 ngày Thứ Năm, 6 tháng 10, 2022, Alexander Abagian đã viết:

Alexander Abagian

unread,
Dec 7, 2022, 9:38:58 AM12/7/22
to discuss-webrtc
It depends on specific implementation of the signaling protocol. WebRTC does not specify that, and I'm not familiar with Janus.
Usually, whole SDP is sent for this purpose.

среда, 7 декабря 2022 г. в 07:08:19 UTC+3, dungd...@gmail.com:

Mark Gooden

unread,
Dec 9, 2022, 7:48:31 AM12/9/22
to discuss-webrtc
Assuming you are using the videoroom plugin on Janus then it is documented here:


You need to send a 'configure' request with "restart" : true'.

Janus will then send you a new offer at which point you just need to create a new answer and send this back to Janus to commence the ICE restart.

Reply all
Reply to author
Forward
0 new messages