1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

webrtc: Enable ICE TCP

Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
Steffen Vogel 2024-05-27 18:09:11 +02:00 committed by pipeacosta
parent 6efaa9e55b
commit f75bf8536c

View file

@ -81,8 +81,10 @@ int WebRTCNode::parse(json_t *json) {
if (json_ice) {
json_t *json_servers = nullptr;
ret = json_unpack_ex(json_ice, &err, 0, "{ s?: o }", "servers",
&json_servers);
int tcp = -1;
ret = json_unpack_ex(json_ice, &err, 0, "{ s?: o, s?: b }", "servers",
&json_servers, "tcp", &tcp);
if (ret)
throw ConfigError(json, err, "node-config-node-webrtc-ice");
@ -105,6 +107,11 @@ int WebRTCNode::parse(json_t *json) {
rtcConf.iceServers.emplace_back(uri);
}
if (tcp > 0)
rtcConf.enableIceTcp = tcp > 0;
else
rtcConf.enableIceTcp = true;
}
}