We need to identify peers who connecting through TURN. In normal webrtc, we accomplish that by calling peerConnection.getStats() and then filtering the candidate-pair whose candidateType is relay.
How we can do the same in mediasoup using its stats API ?
I tried several things but not getting the desired response
As stated in the docs mediasoup is a ICE Lite endpoint so it doesn’t know whether client chose TURN or not. The way to discover it in mediasoup side is by inspecting the selected candidate IP and matching it against well known TURN IPs.