Pages

Friday, 9 August 2019

WebRTC Overview


In this article, we will discuss to WebRTC which stands for Web Real-Time Communication that allows individuals and even enterprises to communicate via certain browsers DIRECTLY* without any third-party software and plug-ins. It’s not a solution, it’s a completely new technology. In other words, there is a world which lets that phones, TVs, computers can communicate on a same platform. It’s an open source and its codes is available for all at http://webrtc.org/


DIRECTLY*: The only time when you will need a server is when a client trying to call out of the local network in other words out of firewall. In this sense, Firewall will not let the client to reach untrusting side without STUN or TURN protocols because of security. That is why we will need a server. It assigns a pole on firewall to enable the client have connection. 

However, for local call, after introducing themselves to server, clients will not need a server to communicate each other. This is the most important thing that is distinguished from the way of common web browsers working, because there was no way to let communicate between browser clients without a server.




There are a few components that can be called media capture, encoding and decoding audio and video, transportation layer, and session management.

Let’s take a look for these components;

Media Capture: In order to provide accessible environment for microphones and camera, media capture step asks for permission to user to use the components. It makes that via the method that we see as “getUserMedia()” 

Encoding and Decoding Audio&Video: Transferring streams of audio and video is not easy over the internet because it should be carried by separating into small parts and should be compressed. “CODEC” is the best way to provides these processes. 

Transportation layer: This controls lost packets, order of packets and connection to other users. 

Session management: This can be pretended as SIP that provides session initiating terminating and modifying. If you transfer audio and video streams to the user it also makes sense to transfer collateral data. This is done by the RTCDataChannel API.



In addition WebRTC works via three main JavaScript APIs as showed below:
1.GetUserMedia: Gain access to camera, microphone and screen
2.PeerConnection: Encoding and decoding media, sending it and takes care of NAT
3.DataChannel: Sending arbitrart data directly between browsers.

Challenges & Benefits

We have some challenges regarding WebRTC:

  •  Uses UDP (is not reliable)
  •  No Standard signaling protocol.
  •  Not compatible for all browsers (Chrome, Safari, Firefox, Edge and Opera)


We also have some benefits regarding WebRTC:

  • No need for extra apps
  • Embedded in web tech
  • Secure (Encryption is mandatory for all WebRTC components )


STUN and TURN duties in WebRTC Tech:

As it’s showed below STUN which stands for Session Traversal Utilities for NAT, it enables clients to get introduced themselves, getting IP address information and determining the best media path. Furthermore, TURN is proceeding relay media.


In the next article, we will proceed to discuss technical details related on WebRTC...

No comments:

Post a Comment