RTSPtoWebRTC icon indicating copy to clipboard operation
RTSPtoWebRTC copied to clipboard

Adding TURN creds

Open abergdesign opened this issue 4 years ago • 4 comments

Hi, could I add a TURN server to the ICE Servers? I spent an hour on it but didn't get anywhere. Thank you for a great project! Ulf

abergdesign avatar Mar 04 '21 11:03 abergdesign

Hi @deepch ,

I'm using the pion/turn.

Do you have any idea how to implement this? I can observe that we need to change the ICE Server struct, right?

tfmeneses avatar Apr 19 '21 13:04 tfmeneses

Hi both,

I now think a turn server will only make sense if the server code can be separated from the "peer" code (which is reading the rtsp stream), so those two functions (server and peer) can run on different machines. Otherwise stun is enough since a server will always be reachable by any browser clients by default. Am I right in this assumption?

My use case is an IP cam on a LAN with an edge device (think raspberry pi) on a LAN that cannot be accessed from the internet and no port forwarding is available since it is over a cellular network. I'd need the rtsp code/webRTC peer on the edge and the server code on the internet. Many thanks!

abergdesign avatar Apr 19 '21 16:04 abergdesign

@deepch I can put up a PR shortly. Done.

travishaagen avatar Apr 19 '21 17:04 travishaagen

Thank you! Can you confirm if it is possible to run the server code on a separate machine from the RTSP/peer code? The machine having access to the RTSP stream is not exposed to the internet. Many thanks, Ulf Aberg Design

abergdesign avatar Apr 20 '21 09:04 abergdesign