chrisguttandin / timing-provider-server

A command line tool to spin up a server which can be used with the timing-provider.
MIT License
15 stars 7 forks source link

WebRTC: ICE failed, add a TURN server and see about:webrtc for more details #4

Closed carmelofascella closed 9 months ago

carmelofascella commented 1 year ago

Hi chrisguttandin,

Thank you very much for this amazing work!

I am using your entire set of timing libraries in a web application to synchronise different audio tracks on different devices connected to the same local network, and I start the timing-provider-server on my laptop. Everything works fine and the tracks are synchronised very well between the different devices!

I noticed that if I use too many devices, usually more than 10, this error arises: WebRTC: ICE failed, add a TURN server and see about:webrtc for more details. When this happens, the devices can’t connect and can’t reproduce the audio track.

Do you have an idea on how this problem can avoided?

chrisguttandin commented 1 year ago

Hi @Karwelox, thanks for your nice words.

The error sounds as if there was no way to establish a peer to peer connection between some of your clients. Is it possible that some of them are not on the same network or are blocked by something else to talk to each other. Maybe the network is just at its max capacity and can't transmit the data in time anymore.

In general this server is very simple and after re-reading the README I realized that I forgot to mention that it is primarily meant for local testing. It establishes a full mesh P2P network. Every client needs to create n-1 connections to all the other clients in this scenario. While it's very easy to reason about it's also very inefficient with more and more clients.

I built a commercial solution available at suenc.io that supports a very large number of concurrent clients by connecting them in a more sophisticated way. Maybe that works as an alternative for your use case.

Anyway, I would still be happy to track down the error that you reported. Is it possible that it's just a network issue?

chrisguttandin commented 9 months ago

Hi @carmelofascella,

I added a little note to the readme which mentions the intended use case of this server.

Nevertheless, I would still be happy to check if there is anything that could be fixed to avoid the error you got. Feel free to re-open this issue.