simple-peer icon indicating copy to clipboard operation
simple-peer copied to clipboard

Detect what ice server is used (STUN/TURN)

Open ThomasOrlita opened this issue 5 years ago • 1 comments

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?

ThomasOrlita avatar Jun 01 '19 09:06 ThomasOrlita

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

t-mullen avatar Jun 05 '19 04:06 t-mullen