Troubleshoot the user presence feature

Learn about the underlying technology and how to troubleshoot issues with the user presence feature.

WebRTC

WebRTC is used as the data transport mechanism for the "User Presence" feature.

WebRTC is an evolving technology that allows browsers to connect to each other (peer-to-peer) using end-to-end encryption and transfer data and / or video / audio media streams without - in many cases - having to route the data through an intermediary, such as a server.

This means that the data is sent securely and with very low latency, and the load on our servers is reduced.

Getting connected

Browsers negotiate via our SignalR transport (websockets) in order to establish a connection. The initiating browser makes various "offers" to the recipient browser (using SDP) until they find a suitable arrangement and can create the connection.

Depending on the browsers and network this can take several seconds.

Recommended requirements

Your browser must support WebRTC (current status ). Google Chrome has the best WebRTC support, followed by Firefox.

A stable, fast internet connection with at least 500 Kb/s bandwidth available for WebRTC. Latency should ideally be less than 50ms.

While WebRTC will work over 4G / LTE sometimes the latency can be very high (1000ms+) so it is not recommended.

Firewalls and NAT

In some cases, such as when devices are behind a firewall or Network Address Translator (NAT), a TURN server is required to allow the two devices to enter a peer-to-peer connection.

In addition a STUN server is sometimes also required to help devices behind a NAT to determine their public address.

It is important that the following ports are whitelisted to allow communication with our TURN / STUN server.

Protocol Ports
TCP 80, 443, 3478, 5349, 19302
UDP 80, 443, 3478, 5349, 19302, 49152-65535

The WebRTC tool the server uses is https://github.com/coturn/coturn

Unstable connections

Sometimes an active WebRTC connection will fail. When this happens Collaboard will attempt to reconnect automatically.

Here are some reasons why a connection may fail:

  • A loss of network (a WIFI deadspot) on one device
  • An IP address changes for a device or for your router
  • Hopping to a new WIFI base station / network
  • Poor / low speed network connection