With WebRTC, you have a number of options for adding more than one user to the connection in order to make it a multi-party video call.  Mesh is probably the most obvious solution for adding other users to the connection. As you already know, for the connection to be possible, each peer that uses the RTCPeerConnection specifically API, must create a connection object. This connection object adds all the relevant information, such as video and audio stream. STUN/TURN servers’ addresses and handlers for when ice candidates are created or any data is received.

The API then takes care of establishing the connection using all the data that has been passed with a signaling process in the middle.

We then just repeat this process for any number of peers that are added to the call. In other words, we create additional RTCPeerConnection objects for each one.

So, if we add another peer to the diagram described above using this strategy, it will look like this diagram below.

Now, let’s see what this would look like if we add a few more peers. As the number of users keep increasing, the processing and bandwidth consumption becomes excessive, and this is more visible on mobile devices or in low-end spec computers, where resources are more limited, and on broadband connections, which are usually ties to contracts where a monthly limit of usage is specified.

With all this, we can say the Mesh is the simplest way to implement multi-party, as it doesn’t require any change on the infrastructure. All the work done is done on the browser. The only problem is that it only works with a small number of users.

If we want to be able to support more users without any problems, we need to find another strategy- one that allows us to mix all those connections created by Mesh, in order to avoid the high cpu and bandwidth consumption on the client side.

Want to learn more?

To learn more about Mesh and other ways to add users to your connection visit our website here.

Recent Blog Posts