Webrtcsink : end of (ice) candidates?

I am using webrtcsink and the provided signalling server, with a custom client.
Everything works fine on a local computer sending audiotest and videotest, with the provided example, to my custom client (Unity webrtc based). I’ve got something weird when I move this client to another machine (windows or mac). The gstreamer producer sends me a null ice candidate, in between regular ones.

2023-09-26T13:34:23.129295Z INFO ThreadId(05) gst_plugin_webrtc_signalling::server: Received message Ok(Text("{\"type\":\"peer\",\"sessionId\":\"a238c606-2a93-4184-b916-843d09daa542\",\"ice\":{\"candidate\":\"\",\"sdpMLineIndex\":0}}"))

Does it mean the end of the list of ice candidates? What would cause the sending of this message?

I just ignore this message in my client, and I can get it work with a wired network but not through wifi. I don’t know if it is related to this null ice candidate. Any idea?


Yes, that’s what is sent when all local ICE candidates are gathered to tell the peer that there won’t be any other ones anymore afterwards.

That directly maps to what is written on MDN on the page you linked

This string is empty ("") if the RTCIceCandidate is an “end of candidates” indicator.

Thanks. I was not sure it was done on purpose or not since I do not received an empty ice candidate in localhost configuration. Is it systematically sent, and in some condition the connection is just established before receiving it?

It’s sent when libnice reports that it gathered all local candidates. An ICE connection might already be successfully established before that. It just tells the peer that if it received that and none of the candidates so far works that there is no possible way of establishing a connection.

1 Like