simple-peer
simple-peer copied to clipboard
Detect what ice server is used (STUN/TURN)
I'm trying to set a lower resolution when a TURN server is used. I tried looking at the APIs and didn't find a way to detect whether STUN or TURN was used. Perhaps it can be somehow found from RTCSessionDescription, but I'm not sure how. Is there a way to detect it?
You could probably do this by finding selected ice candidates in peer.getStats()
, but I'm not sure about the details. There shouldn't be anything specific to simple-peer
.
Maybe something here could help you: https://stackoverflow.com/questions/32137156/webrtc-determine-which-turn-server-is-used-in-peerconnection