pion / example-webrtc-applications

Examples of WebRTC applications that are large, or use 3rd party libraries
https://pion.ly/
MIT License
1.03k stars 244 forks source link

sfu-ws doesn't work with TURN #92

Closed RichardoC closed 3 years ago

RichardoC commented 3 years ago

Your environment.

What did you do?

I configured both the browser client and backend server code to use a turn/ice server that had TLS and authentication. I did this in the javascript by setting an RTCConfig and in the backend by setting a non-empty webrtc.Configuration{ ICEServers: []webrtc.ICEServer{ block. I have tested this configuration using https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/ and do get the "relay" option there.

I have changed this server to use TLS due to Modern browser security policies preventing video without TLS for non-localhost.

What did you expect?

The video call to work using TURN

What happened?

"WebRTC: ICE failed, add a STUN server and see about:webrtc for more details" in the firefox JS console logs.

Even when running the server with "PION_LOG_TRACE=all" there were no logs

From coturn I can see what look like successful connections which then go to "allocation timed out"

Please let me know if there's anything else I can send that would help!

RichardoC commented 3 years ago

This can be closed, in my case it was a faulty webrtc config on the browser side of this meaning that it wasn't actually using the ICE servers I was providing.