Reputation: 3874
WebRTC comes essentially in 3 flavors depending on the network situation:
NAT - session uses STUN but is eventually peer to peer for the media
NAT+Firewall: in which case session is not peer to peer and media goes through a TURN server.
Is there a way/tool to figure out for an existing live session if it is using a TURN server or if it's peer to peer?
I am using chrome. If a tool exists for other browsers I am happy to know about it as well.
Thx
Upvotes: 0
Views: 276
Reputation: 17330
this pull request for the webrtc samples makes the constraints/getStats sample show the ip address. Instead of the local and remote ip around here you want the candidateType property. If either of them is "relay" you are using a turn server. If both are "host" this is a direct connection without NAT. For all other cases NAT is used.
Note that this sample is currently a bit of a mess since the getStats API changed a bit.
Upvotes: 1