Real-time communication is rapidly becoming an integral part of many application areas. From customer service to telemedicine, video conferencing can be quickly integrated into work processes in a variety of industries.
However, creating an application that supports multi-party video conferencing can be a complex task without proper guidance. Allowing more than one user to participate in a call is one of the most difficult tasks to perform, as it relates not only to the application but also to the underlying infrastructure on which the application is hosted.
There are two ways in which a video conferencing app can be made and deployed:
- On-Premise and,
- CPaaS ( Communication-Platform-as-a-Service) provider.
On-premise means that you are responsible for both developing your application and managing the necessary server infrastructure.
We can follow two strategies in this approach:
- Peer-to-Peer Approach
WebRTC by default is peer-to-peer in nature, it directly connects the clients and establishes communication between them. This connection is encrypted and is a direct browser to browser or device to device connection.
However, client devices typically reside behind NAT configurations and/or firewalls restrictions, which makes it difficult to establish a direct connection between them.
While using this approach you are in charge of building the actual application and also setting up signaling services, this gives you full control over the performance of your app.
The downside is that it requires high maintenance, and adding features becomes more and more complex and increases the load on the app.
- Media Server Approach
it’s possible to hold video calls with multiple participants using peer-to-peer communication, it stops being practical as the number of participants increases. This is because a peer must send their video/audio stream to every participant while also receiving a video/audio stream per participant.
This is where a media server comes in handy as it helps reduce the number of streams a client needs to send and receive. When a media server acts as this kind of media relay, it is usually called a single forwarding unit (SFU). Its main purpose is to forward media streams between clients.
When building an on-premise web conference application using the media server approach, besides building the application and adding the signaling layer, you need to add the actual media server and configure it accordingly.
Some popular open-source options for media servers are:
- Jitsi – https://jitsi.org/jitsi-videobridge/
- Janus – https://janus.conf.meetecho.com/
- Kurento – http://www.kurento.org/
- Mediasoup – https://mediasoup.org/
CPaaS Provider Approach
With a commercial Communication Platform as a Service (CPaaS), you need to pay a monthly fee according to usage. And CPaaS will handle:
- All WebRTC supports/updates
- Media Servers
- Browser/Mobile support
- Additional features around the video like recording, broadcasting, or transcription
This is the simplest way to build a video conference app, as it frees you from having to provision and maintain your own infrastructure and instead allows you to focus on writing your application. This boosts up the development time and you are ready to go in a short amount of time.
Some popular CPaaS Provider are:
- Vonage – https://www.vonage.com/
- Agora – https://www.agora.io/en/
- Twilio – https://www.twilio.com/