Issue #1991 - Support TURN TLS Support in WebRTC Backport of Mozilla bug 1056934

This commit is contained in:
Basilisk-Dev 2022-08-20 14:21:43 -04:00 • committed by roytam1
commit 2dc4713d14
16 changed files with 282 additions and 26 deletions

View file

@ -526,8 +526,8 @@ PeerConnectionConfiguration::AddIceServer(const RTCIceServer &aServer)
if (!(isStun || isStuns || isTurn || isTurns)) {
return NS_ERROR_FAILURE;
}
if (isTurns || isStuns) {
continue; // TODO: Support TURNS and STUNS (Bug 1056934)
if (isStuns) {
continue; // TODO: Support STUNS (Bug 1056934)
}
nsAutoCString spec;
rv = url->GetSpec(spec);
@ -576,6 +576,11 @@ PeerConnectionConfiguration::AddIceServer(const RTCIceServer &aServer)
if (port == -1)
port = (isStuns || isTurns)? 5349 : 3478;
if (isStuns || isTurns) {
// Should we barf if transport is set to udp or something?
transport = "tls";
}
// First check the known good ports for webrtc
bool knownGoodPort = false;
for (int i = 0; !knownGoodPort && gGoodWebrtcPortList[i]; i++) {