What Is WebRTC, What Features Does It Have, and Which Browsers Support It?

Webrtc

WebRTC is one of the new terms globally, especially in web communication applications such as chat or video calling. But what is WebRTC, what features does it have, and which browsers support it? We will see later.

If you want to know more about this, stay tuned with SOJECT:

What is WebRTC?

WebRTC is a technology for connecting web browsers. Using WebRTC, browsers can send data directly to each other without the need for intermediaries. WebRTC includes software programming interfaces that allow seamless communication. Voice and video chat is one of the most prominent applications of this technology.

This technology is now widely used. Our professionals at Soject,  Keeping up with the advances of the day, use WebRTC for making various applications, including those involved video and audio calling. 

Webrtc
Webrtc

WebRTC History

GIPS was founded in 1999 to provide solutions to the VoIP problems. VoIP is a protocol for transmitting voice over the Internet, which at the time was associated with problems such as transmission delays and packet loss. In 2010, Google acquired GIPS for about $ 68 million, and in 2011, the company unveiled WebRTC. This technology aimed to provide a solution for live audio-visual communication between browsers without the need for plugins.

Which browsers support WebRTC?

The following is a list of browsers that support WebRTC:

  • Edge
  • Firefox
  • Chrome
  • Safari
  • Opera
  • Android browser
  • Chrome for android

As usual, the advanced browsers Google Chrome and Mozilla Firefox provide the best support for WebRTC. However, each has its drawbacks. For example, Firefox does not support Simulcast, which allows you to stream video in various qualities. On the other hand, Google Chrome does not support compressed streaming video according to the H.264 standard.

Opera browser is also in good condition due to the use of Google Chrome rendering engine, but not as perfect as Google Chrome; some features such as Screen Sharing are missing on Opera!

Unfortunately, Microsoft Internet Explorer and Apple Safari are very weak or, to be more precise, completely incapable of supporting WebRTC APIs.

The bad news is that although Microsoft has begun supporting the technology with the Edge browser’s unveiling, Apple has made no mention of WebRTC support in the future. The only hope is to use add-ons to use WebRTC capabilities to these browsers. For example, the Temasys plugin, which takes on this critical task for free, and of course, has one major drawback; it does not support all sites and services.

Webrtc-and-browsers
Webrtc-and-browsers

How does WebRTC work?

In a typical HTTP connection, the client sends a request to the server, and the server responds to that specific request. WebSocket protocol helps the stability of this connection, so that the server can inform the client of a situation or provide some information without receiving an offer.

When the client sends a command to the server (for example, for adding information to the database), the server typically transmits this information to other clients via WebSocket, which cause delay. Although this moratorium does not pose a particular problem in applications, it does interfere with voice and video callings.

But in WebRTC, clients communicate directly with each other by removing the server from intermediation. This dramatically reduces latency and does not make clients wait for a response from the server.

How do two clients find out each other’s requests?

The answer is: signaling.

What is signaling? Suppose client (a) intends to communicate with the client (b). To do this, some messages are exchanged between the server and the clients. Note the following conversation:

  • Client (a) to server: Hello server. I want to talk to client (b). This is my information.
  • Server to the client (b): Hello. Someone wants to talk to you. This is his information. Do you accept?
  • Client (b) to server: Yes. Why not! So this is my information.
  • Server to the client (a): The good news is that Client (b) has agreed to talk to you. This is its information.

After receiving information from each other through the server, clients put aside the server and talk directly to each other.

This conversation – information exchanging- is called signaling, and the server here is a signal server.

After signaling through the Signal Server, the direct connection of two clients is called peer-to-peer.

What goes on behind the scenes of WebRTC?

WebRTC usually uses UDP protocol, which unlike TCP, is not suitable for transmitting sensitive data as it does not check whether data packets have reached the recipient. However, UDP’s advantage is its high speed of data transfer. That’s why UDP is a suitable protocol for video and voice calls. For example, in a video stream (like while watching YouTube), nothing catastrophic will happen if a few video frames fail to reach their destination. But suppose several bytes of a file are not transferred; thus, the whole file may be unusable.

WebRTC is a programming interface, or API, but not in the form of a specific product or a particular programming interface; In fact, WebRTC consists of a set of APIs to complete different parts of an application or web connection.

Some WebRTC programming interfaces (APIs) are responsible for accessing a computer’s webcam and microphone, while others perform other tasks. For example, a unique API performs and facilitates screen sharing. There is even a particular API for streaming video with different qualities and bitrate. Another WebRTC API, known as MediaStream API, allows the developer to process or pause audio quickly, as well as adding other sounds.

Therefore, WebRTC is one of the most useful web technologies and has many capabilities; A common feature of WebRTC applications is real-time communication.

Can two clients always communicate directly?

In short, no!

In WebRTC, there are issues and difficulties with direct communication of clients.

The first issue is NAT (Network address translation). In standard web systems, clients can talk to servers. In other words, as long as the client is connected to the Internet, it can communicate with the servers via HTTP without the need to change the network. But WebRTC has broken that rule. In WebRTC, two clients want to talk to each other in the absence of the server.

But there are some problems here:

1: Two clients need to have an external IP to communicate with each other. How should they get it? How does each client know what its external IP is?

2: UDP communication is done through specific ports. What should the client do if the firewall closes these ports?

Here are the answers to the above questions:

One of the advantages of WebTIC is ICE or Interactive Connectivity Establishment. ICE is a protocol that eliminates NAT and firewall problems for peer-to-peer communication.

There are two types of servers for ICE: STUN and TURN.

STUN vs. TURN

STUN Server: This server helps clients get their external addresses.

TURN Server: This server, also known as Relay Server, helps clients obtain their external IP like TURN. Furthermore, it transfers media from a client to another and vice versa.

WebRTC uses

As mentioned, perhaps the most popular use of WebRTC is video conferencing and video chat. If you remember, the Firefox browser once used WebRTC to allow video chatting without any user account. I mean ‘Hello,’ a WebRTC-based service. Furthermore, appear.in website established the same type of connection.  You didn’t need an account, log in, or even install a plugin on the browser.

The Mozilla Hello service and the site mentioned above were just two examples of WebRTC applications for video calling. We see a lot of similar services these days. Even Skype has taken advantage of WebRTC with a particular version called Skype for Web to make video chatting easier.

Developers can also use WebRTC in online games. The Hobbit: The Battle of Five Armies game is one of the examples of this application, which before the introduction of the final version, which should be installed, attracts the attention of gamers.

Learn more: Video conferencing applications and usage

What are the benefits of WebRTC?

The essential benefits of WebRTC are:

  • Data transfer in WebRTC via UDP protocol has the least delay in a packet transfer.
  • Using WebRTC does not require a plug-in or add-on and is supported by most standard browsers today.
  • You can only use WebRTC on secure channels.
  • Encryption is mandatory in WebRTC. As this protocol is not dependent on a plug-in or add-on and runs inside the browser’s Sandbox, malicious programs cannot enter users’ systems through it.
  • Microphone and camera access permission is obtained manually through the browser, and the user’s image or voice is not transmitted without permission.

Is WebRTC secure?

Adobe Flash was one of those old ways of communicating through the browser, that for various reasons, one of the most important of which is the security it has been almost abandoned. Flash technology is full of security holes, and hackers are very interested in it. To solve this problem, Steve Jobs suggested setting aside the Flash; these days, however, Google Chrome, as a secure browser, uses Flash in the sandbox environment (a security term meaning running an application in a protected environment).

WebRTC is not a specific API but a group of APIs. That’s why its security is far higher than Flash. However, WebRTC also has its security issues, but it is much less than the ones related to Flash.

A few years ago, for example, one of the drawbacks of WebRTC was discovered: by writing a few lines of JavaScript code and using part of WebRTC, you can find the Internet address of the VPN user!

SOJECT and Video conferencing projects

SOJECT Company is one of the leading companies in the field of video conferencing software, using this technology to produce personalized software and provide it to its customers. Consulting, design, implementation, development, and maintenance servers are a skill of the SOJECT team. Besides, our experts produce and support a variety of software – in addition to voice and video calling. Contact us right now for advice on developing the specific software you need.

References:

Wikipedia

https://webrtc.org

https://www.fullstackacademy.com

youtube / googleChromeDevelopers


Leave a Comment

Your email address will not be published. Required fields are marked *