1
0

Add stun/turn info after onIceCandidate

Signed-off-by: James Ketrenos <james_eikona@ketrenos.com>
This commit is contained in:
James Ketrenos 2022-03-14 10:28:05 -07:00
parent a4bc4b4d3b
commit 25e4b45198

View File

@ -103,6 +103,17 @@ const MediaAgent = () => {
if (!event.candidate) { if (!event.candidate) {
return; return;
} }
/* If a srflx candidate was found, notify that the STUN server works! */
if (event.candidate.type === "srflx"){
console.log("The STUN server is reachable!");
console.log(` Your Public IP Address is: ${event.candidate.address}`);
}
/* If a relay candidate was found, notify that the TURN server works! */
if (event.candidate.type === "relay"){
console.log("The TURN server is reachable !");
}
sendMessage({ sendMessage({
type: 'relayICECandidate', type: 'relayICECandidate',
config: { config: {