Skip to content

Commit

Permalink
add turn tcp url
Browse files Browse the repository at this point in the history
  • Loading branch information
mpromonet committed Jan 28, 2024
1 parent cba0a80 commit 0634d91
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/PeerConnectionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,12 @@ const Json::Value PeerConnectionManager::getIceServers(const std::string &client
Json::Value urlList(Json::arrayValue);
webrtc::PeerConnectionInterface::IceServer srv = getIceServerFromUrl(iceServer, clientIp);
RTC_LOG(LS_INFO) << "ICE URL:" << srv.uri;
urlList.append(srv.uri);
if (srv.uri.find("turn:") == 0) {
urlList.append(srv.uri+"?transport=udp");
urlList.append(srv.uri+"?transport=tcp");
} else {
urlList.append(srv.uri);
}
server["urls"] = urlList;
if (srv.username.length() > 0)
server["username"] = srv.username;
Expand Down

0 comments on commit 0634d91

Please sign in to comment.