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:
parent
6efaa9e55b
commit
f75bf8536c
1 changed files with 9 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue