Android WebRTC ICE restart example

860 views
Skip to first unread message

Naiyin

unread,
Nov 6, 2019, 2:56:29 PM11/6/19
to discuss-webrtc
Does anyone have an example about how to support ICE restart with WebRTC library in Android?

I've been tried for a while, I make it work for ICE restart.

dudu mark

unread,
Nov 15, 2019, 11:02:29 AM11/15/19
to discuss-webrtc
You can set this constrain before you call createOffer:

sdpMediaConstraints.mandatory.add(new MediaConstraints.KeyValuePair("IceRestart", "true"));
peerConnection.createOffer(localSdpObserver, sdpMediaConstraints);
Message has been deleted

Naiyin

unread,
Nov 15, 2019, 2:47:30 PM11/15/19
to discuss-webrtc
When should I call createOffer?
When ice disconnected event triggered?

dudu mark

unread,
Nov 17, 2019, 11:15:04 AM11/17/19
to discuss-webrtc
We are calling it as part of the RTP reconnecting process, when we get PeerConnectionEvents.onIceFailed()

Naiyin

unread,
Nov 19, 2019, 3:30:47 PM11/19/19
to discuss-webrtc
So only call it when ice failed, but not ice disconnected?

Do you call it on the caller side or callee side?

dudu mark

unread,
Nov 20, 2019, 9:08:05 AM11/20/19
to discuss...@googlegroups.com
We are doing it on the caller side, and only on failed, which is received few sec after the disconnect (possible to do it also on disconnect)

--

---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/ts_MoZs-hWo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/890d55f2-2b79-42f9-bbf6-c3dc626da901%40googlegroups.com.

Naiyin

unread,
Nov 21, 2019, 9:14:40 PM11/21/19
to discuss-webrtc
I'm doing the same thing, on caller side only.
When ice connection failed, I create an offer with "IceRestart" on the caller side.
However, after a few wifi->date, date->wifi, flight mode on/off try, it ice restart will not work anymore.
When ice restart do we need to send SDP to callee?

On Wednesday, November 20, 2019 at 6:08:05 AM UTC-8, dudu mark wrote:
We are doing it on the caller side, and only on failed, which is received few sec after the disconnect (possible to do it also on disconnect)

On Tue, Nov 19, 2019 at 10:31 PM Naiyin <tianx...@gmail.com> wrote:
So only call it when ice failed, but not ice disconnected?

Do you call it on the caller side or callee side?


On Sunday, 17 November 2019 08:15:04 UTC-8, dudu mark wrote:
We are calling it as part of the RTP reconnecting process, when we get PeerConnectionEvents.onIceFailed()


On Friday, November 15, 2019 at 9:47:30 PM UTC+2, Naiyin wrote:
When should I call createOffer?
When ice disconnected event triggered?

On Friday, 15 November 2019 08:02:29 UTC-8, dudu mark wrote:
You can set this constrain before you call createOffer:

sdpMediaConstraints.mandatory.add(new MediaConstraints.KeyValuePair("IceRestart", "true"));
peerConnection.createOffer(localSdpObserver, sdpMediaConstraints);



On Wednesday, November 6, 2019 at 9:56:29 PM UTC+2, Naiyin wrote:
Does anyone have an example about how to support ICE restart with WebRTC library in Android?

I've been tried for a while, I make it work for ICE restart.

--

---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/ts_MoZs-hWo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss...@googlegroups.com.

dudu mark

unread,
Nov 23, 2019, 12:04:14 PM11/23/19
to discuss...@googlegroups.com
Yes

To unsubscribe from this group and all its topics, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/182184dc-63e6-4a54-ab89-d4bcd5ce235c%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages