WebRTC Tutorial - How does WebRTC work?

WebRTC Crash Course

How To Create A Video Chat App With WebRTC

What?

Web Real-time communication (WebRTC) is mostly used to transmit video and voice data with very less communication by using Pear-to-pear communication.

It's a collection of standardized APIs supported by the browsers which allows direct connection to other browsers

Standardization is important because companies can implement WebRTC protocol their way but this might cause problems because different implementation of different companies will have to work in sync to make the experience smooth for people using any browser of their choice.

What usually happens?

Usually a server connects with a server, the server reponds and the connection gets created .

If multiple clients wanna connect then they make individual requests and the server responds to all those connections

And if it's a socket, then the connection to the server is single but persistent.

If one of the client updates something, a text or uploads a file then this change is sent to the server which then processes the information and pushes the update to all the connected clients. This processing part is usually not a big interval, and can cause a max-to-max delay of 1sec between a client updating some information and this update reaching the other clients.

This kind of delay in manageable and not very hurting in most of the cases. Unless the application is doing any sort of streaming like voice chat or live streaming where a delay of half a second can make the experience jarring and not fun overall.

How WebRTC works