What is WebRTC and What is it Good For?

By Tsahi Levent-Levi

November 1, 2023  

Use cases of WebRTC, how it works and benefits of the technology explained in a nutshell.

What is WebRTC?

WebRTC is an HTML5 specification that you can use to add real time media communications directly between browser and devices.

Simply put:

WebRTC enables for voices and video communication to work inside web pages.

And you can do that without the need of any prerequisite of plugins to be installed in the browser.

It was announced in 2011 and since then it has steadily grown in popularity and adoption.

By 2016 there has been an estimate from 2 billion browsers installed that are enabled to work with WebRTC. From traffic perspective, it has seen an estimate of over a billion minutes and 500 terabytes of data transmitted every week from browser communications alone.

WebRTC has increased in popularity and use throughout the COVID-19 pandemic. Quarantines and work from home made remote communications a necessity, indoctrinating billions of users about the use of video calling. The end result has been a surge in the use of WebRTC:

The growth in use of WebRTC during the COVID-19 pandemic

In 2021 WebRTC got officially standardized, removing all doubts about its future prospects. Today, WebRTC is widely popular for video calling but it is capable of so much more.

A few things worth mentioning:

  • WebRTC is completely free
  • It comes as open source project that has been embedded in browsers but you can take and adopt it for your own needs
  • This in turn has created a vibrant and dynamic ecosystem around WebRTC of a variety of open source projects and frameworks as well as commercial offerings from companies that help you to build your products
  • WebRTC constantly evolving and improving, so you need to keep an eye on it (e.g. see hiring WebRTC developers)
  • See also: The state of WebRTC open source projects

Covered in this video:

  • What is WebRTC?
  • Current state of adoption
  • Why is it so much more than just a video chat enabler
  • The power of “Open Source”
  • How WebRTC works
  • Five reasons to choose it

(this article was updated in December 2023)

WebRTC’s meaning

WebRTC stands for Web Real-Time Communications.

Web is simple – it means that what we are doing works “over the web” and inside a browser. The browser part means that all modern browsers support WebRTC. If you run this inside a native application I will still be considering it as WebRTC. To me, it is the thought that counts, or more accurately, the implementation of WebRTC (or parts of it) are quite popular as a starting point in native applications. This is due to the quality of the WebRTC media engine (as implemented by Google) AND due to the fact that it makes it easier to communicate across native applications and web applications this way.

RTC, or Real-Time Communications means that whatever WebRTC does – it does in real time. Its focus is on sending the data it has as fast as possible – making sure to use low latency techniques to get things done. Whenever possible.

If we’re moving away a bit from the word-meaning of WebRTC, then this is the definition I usually use to define WebRTC:

Lets break it down a bit:

  • WebRTC offers real time communication natively from a web browser
    • WebRTC is part of the web browser. Every modern web browser today implements WebRTC
    • It offers the ability to create real time communication applications and experiences
  • WebRTC is a media engine with JavaScript APIs
    • WebRTC is a media engine. There were other media engines before WebRTC and there will probably be others after it. In that sense, there’s no “innovation” here
    • That said, it is standardized by an API layer defined in JavaScript. This contributes to the ecosystem that has been created around WebRTC

So, how does WebRTC work?

Code and API

It is important to understand from where we are coming from: If you wanted to build anything that allowed for voice or video calling a few years ago, you were most probably used C/C++ for that. This means long development cycles and higher development costs.

WebRTC changes all that: it takes the need for C/C++ and replace it with a Javascript API.

It comes with a Javascript API layer on the top that you can use inside the browser. This makes it far easier to develop and integrate real time communications anywhere. Internally, WebRTC is still mostly implemented using C/C++, but most developers that use WebRTC won’t need to dig deep into these layers in order to develop their applications.

Availability

WebRTC today is available in all modern browsers. Google Chrome, Mozilla Firefox, Apple Safari and Microsoft Edge support it.

You can also “take” it and integrate it into an application or an embedded device without the need of browser at all.

Browsers and operating system support for WebRTC

Media and access

What WebRTC does is allow the access to devices. You can access the microphone of your device, the camera that you have on your phone or laptop – or it can be a screen itself. You can capture the display of the user and then have that screen shared or recorded remotely.

Whatever it does is in real time, enabling live interactions.

WebRTC isn’t limited to voice and video. It allows sending any type of arbitrary data.

There are several reasons WebRTC is a great choice for real time communications

  1. First of all, WebRTC is an open source project
    • It is completely free for commercial or private use, so why not use it?
    • Since it is constantly evolving and improving, you are banking on a technology that would service you for years to come
    • WebRTC is a pretty solid choice – It already created a vibrant ecosystem around it of different vendors and companies that can assist you with your application
  2. It is available in all modern browsers
    • This has enabled and empowered the creation of new use cases and business models
    • From taking a Guitar or a Yoga lesson – to cloud gaming and social networking – to medical clowns or group therapy – to hosting large scale professional Webinars and live broadcasts; WebRTC is capable of serving all of them and more
  3. WebRTC is not limited to only browsers because it is also available for mobile applications
    • The source code is portable and has been used already in a lot of mobile apps
    • SDKs are available for both mobile and embedded environments so you can use WebRTC to run anywhere
  4. WebRTC is not only about for voice or video calling
    • It is quite powerful and versatile
    • You can use it to build a group calling service, add recording to it or use it only for data delivery
    • It is up to you to decide what to do with WebRTC
  5. WebRTC takes the notion of a communication service and downgrades it into a feature inside a different type of service. So now you can take it and simply add communication in business processes you need within your application or business

What is WebRTC used for?

You can group WebRTC applications into 4 broad categories:

  1. Conversational voice and video – the obvious one. Applications that need the ability to have a person communicate with others in real time and in a conversational manner. These will more often than not end up using WebRTC
  2. Live streaming – while WebRTC isn’t the most popular choice for streaming, it is one of the best technologies available for low-latency live streaming. If you need to stream something to one or more users and maintain really low latency to enhance the interactivity (things like cloud gaming, gambling, auctions, webinars, etc) – then WebRTC might be a great choice
  3. Data transfer – you can send voice and video with WebRTC, but you can also send arbitrary data. This can be used to share huge files between machines with little need for server space for example. Or it can be used to create a bittorrent like experience
  4. Privacy – since WebRTC runs direct between browsers, it is sometimes used to enhance privacy. Doing this by simply not sending the media or data via servers at all

Overview of Use-Cases with WebRTC

The use cases where WebRTC comes in handy seem endless. Every so often, I hear of a new way that WebRTC is being used to solve yet another problem.

Here are some of the main use cases you’ll find for WebRTC out there:

  • Unified communications – voice and video calling, 1:1 or group sessions
  • Contact center communications – client/agent, visual assistance, remote assistance, etc
  • Watch parties – watch television or a sports event together
  • eCommerce and retail – from one-to-one high touch sales to live broadcast for sales events and promotions
  • Telehealth, online education, legal proceedings, remote travel, fitness, dancing, tutoring, coaching, … – conduct remotely and virtually verticalized sessions you would have done in-person in the past
  • Teleoperations – drive cars, forklifts, trucks, drones, boats, submarines, … – remotely
  • Virtual and hybrid events – conduct webinars, large meetings and events online
  • Low latency broadcasting – broadcast a sports game, auction or interactive sessions to a large audience at sub second latency
  • Cloud gaming – render the visuals of a game in the cloud and send it in realtime to the player
  • Machine remoting – operate a remote machine (high performance machines or highly secured/configured machines) as if it was a local one
  • Virtual spaces and the metaverse – meet people in a synthetically rendered virtual environment in 2D or 3D

So what other choice do you really have besides using it?

The idea around WebRTC and what you can use it for are limitless. So go on – start building whatever you need!

People also ask

There are common questions people ask about WebRTC quite often. Here are my answers to them.

Is WebRTC free or paid?

WebRTC is free, but sometimes paid.

Let me explain…

WebRTC is an open protocol and has a free open source implementation. This free implementation is embedded in all modern browsers, making it free to use as a developer and a user.

The thing is, if you want to build an application with it, you will need to pay for *something* at *some point*. Meaningful applications in WebRTC require server infrastructure. This infrastructure cost to put up both in compute resources and in bandwidth resources.

You can decide to build it all from scratch on your own, or you can use third party CPaaS (communication platform as a service) vendors as a shortcut to your application development. Using a third party vendor means paying to it. Building from scratch means investing time and resources to develop and then to maintain the service (remember the infrastructure costs)?

So yes. WebRTC is free. But it costs money. I hope it makes more sense now 😉

Is WebRTC safe to use?

Yes it is. Or at least it should be.

WebRTC is safe. It got a solid security architecture. I’ve written a longform article about this if you want to dive deeper: Everything you need to know about WebRTC security 🔒

The TL;DR version is this one –

WebRTC is a modern, secure communication protocol and implementation. It was designed that way from the get go, at a time when browsers started shifting to HTTPS-first/only web. As such, it doesn’t allow for example to send media in the clear, and always encrypts the data.

Remember though that applications written using WebRTC need to take care of security and safety themselves – an application is only as secure as its weakest link, and that link isn’t going to be their WebRTC implementation.

Does WebRTC require a browser?

Nope.

WebRTC is embedded in all modern browsers today. Web developers can use the WebRTC Javascript APIs to build their applications for browser users.

Outside the browser, application developers can just take the free open source implementation of WebRTC (maintained by Google and used by all modern browsers), and compile it into their applications. Many communication applications do just that, which means that at the end of the day, WebRTC can be used everywhere and not only inside browsers.


You may also like

Leave a Reply

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

      1. Seriously? FUD, common. That’s a very poor comment. If it’s actually FUD why even mention it’s solvable with a extension?

        The issue is there either you or anybody else like it or not and for VPN users it’s crucial Not to have there IP and especially ones local IP leaked. It’s Not the users fault and definitely not VPN vendors fault either as this is a builtin Browser feature! Ignoring it and just point towards other is IMO weak at best.

        Other then that nice blog and good information on what WebRTC is.

        1. mrigloo,

          It is mostly FUD. Most people today don’t use a VPN, and if they do, it is more likely than not to be associated with trying to get to regionally restricted content (like people in Israel trying to watch US TV shows).

          Those who do need and care about VPN for privacy reasons should use a VPN vendor that actually knows what they are doing (not an easy task with all them “free” VPN services out there that just suck your data from you along the way), and that also means that said VPN vendor uses what the browsers have to offer to hide their local IP addresses.

          WebRTC and any other VoIP protocol needs these local addresses to work. A VPN can be seen as a trusted proxy, and in most cases, for real time communications, such proxies are undesirable if you want decent media quality.

          I hope this is a bit clearer in what my opinion on this matter is.

          1. I came to this page after reading Daniel Roesler’s project, because I wanted to learn more about how RTC works before installing any kind of extension. The comment you make above does not endear me to the trustworthiness of your organizaton, or of WebRTC.

            For one thing, that many people are using a VPN to get regionally restricted content has little bearing on the seriousness of a security flaw, and your point comes as if the size of that category of users is the only reason the problem has had any attention. It isn’t.

            From the write-ups on the research, there is no vendor that could “[know] what they are doing” to the extent it would mitigate this problem – as you’ve said in your last sentence, the needs of VPN users are at odds with the requirements of WebRTC in providing direct connections. So whether someone is using a VPN for “privacy reasons” or not, it would help to hear a serious response from you on this issue, rather than a churlish bit of opinion on why it doesn’t matter.

          2. I know this is an old thread, but I'm a little confused. The first step in the WebRTC connection is going to be a UDP connection to a STUN server to see if you're operating behind a proxy/nat/firewall/vpn. This will be done over UDP, which is routed over the VPN, so the answer is yes. The connection will then be directed to a TURN server so that communication is made using outgoing connections. If your VPN only proxies HTTP traffic, then yes this will leak your IP just as any other protocol you try to use would leak it. I would expect the correctly configured VPN to act as the sole, not preferred, gateway if you're trying to conceal your IP. The traffic to the TURN server would therefore also go through the VPN. Performance would suffer from the limitations of the VPN, but how does the leak occur?

          3. Over the signaling layer.

            WebRTC needs to negotiate IP addresses with the other side of the call so they can communicate. For that purpose, it will send a slew of IP addresses (local, public, TURN routed) and then the remote side will try to connect to them. Once connected, media can be sent and received.

            By “default”, WebRTC assumes it is fine to send any IP address if the user approved access to the camera or mic. This may give away its local IP address over signaling even if the call ends up over a VPN connection. There are mechanisms to overcome that for quite some time now, but “WebRTC IP leak” and the the concerns/FUD around it are still going strong.

  1. I liked this article very much it helped me understood the usage WEBRTC now i wish to use it .

    i do have a question how many simultaneous web conference can make ?

    can i get 35 people to log to a webserver with WEBRTC enabled and get all 35 people to watch 35 windows at the same time .

    so each person can see 34 screens of his webrtc mates ?

    this will similar but not exactly equal to running a conference meeting but also with private window chat to each participant .

    so a participant ca also say some words to one of the participant in private window without the other people hearing it .

    tomer

    1. Tomer,

      The answer to this would be “maybe”.

      I assume it is possible, but depends on a lot of variables – the network used, the quality you expect on each video stream, the machines, etc.

  2. We have been experimenting with WebRTC because we currently have a Flash-based video chatroom. With Flash quickly becoming obsolete, we have been experimenting with WebRTC as a replacement for this; the really good thing with testing a new alternative is that our users can now use the video chat function on their mobile devices. For us, WebRTC is now the only viable option due to all the modern browser restrictions (including https encryption) when trying to use Flash and it looks likely that we will soon be implementing WebRTC to replace Flash.

  3. The article says it’s built into most browsers, without having to add anything. With Chrome, you have to add an extension, in order to use it

    1. Steven, there is no extension needed in any of the browsers in order to use WebRTC. Up until recently, Chrome required an extension if you wanted to screen share in WebRTC (anything else worked without the extension) – and even that is going away now.

  4. Is it possible to use WebRTC to live broadcast audio when one, two or a few more users up to say ten are listeners and speakers to each other where a large number of other users (say 10K listeners) only listeners to their speech? Is that achieveable by P2P?

    1. Selçuk,

      P2P doesn’t scale well beyond a small number of participants. In your case, you want sessions with thousands of participants. There are a team or two trying to achieve this without the use of media servers. I don’t think we’re there at this point due to many different reasons.

      If you want to cater for such use cases, then WebRTC can be the solution for you but you will need to deploy media servers as part of the solution.

  5. Hi! Excellent information, just what I required! Thanks!

    I only have one question, is possible to stream the audio of a device with WebRTC? I know is possible send the microphone audio, but what about the sound of a notification on my computer as a replacement of PC speakers?

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}