Explore the most common WebRTC questions in ChatGPT and get answers to them that a human would give (as opposed to letting ChatGPT both ask and answer…

I am trying to use Generative AI in my own work more and more. I’ve been told (as well as told others) that I won’t be replaced by AI, but I will be replaced by someone who uses Generative AI. So the only thing to do is to replace myself by learning to use AI myself.
It started small, with the Midjourney images on social media and in my articles – these are actually handled by my son most of the time. And now from time to time, I try to have short conversations with different LLM engines that relate to work. Mostly to get ideas.
For my Video Q&A series with Philipp Hancke, which passed 50 (!) videos already, I wanted a few new and fresh questions, so I asked ChatGPT for a few. I picked a couple for some future videos, but decided it was time to write an article, answering these questions – in a way, answering ChatGPT’s questions about WebRTC – and no – I didn’t ask ChatGPT to answer them for me 😉

Table of contents
- 🔧 General / Introductory
- 🧑💻 For Developers / Technical Use
- How do I get started with WebRTC?
- How do I establish a peer-to-peer connection?
- What signaling server should I use with WebRTC?
- How do I handle NAT traversal in WebRTC?
- What’s the best TURN/STUN server to use?
- How do I record a WebRTC stream?
- How can I share my screen with WebRTC?
- How do I implement group calling or multiparty video?
- 🔒 Security and Privacy
- 📈 Performance and Optimization
- 🌐 Browser and Platform Compatibility
- 🏗️ Architecture and Deployment
- 📦 Use Cases and Applications
- 🤝 Interoperability and Standards
- 🔍 Debugging and Troubleshooting
- Got any questions for me?
🔧 General / Introductory

What is WebRTC?
Well… that should be relatively simple.
WebRTC is a technology for enabling live streaming of voice and video in web browsers (and elsewhere). It is open source and available in all modern browsers today.
If you want a longer answer, with videos, then head on to this article 👉 What is WebRTC and what is it good for?
How does WebRTC work?
WebRTC is actually a set of standard specifications that together make up a sophisticated media engine that is optimized for voice and video conversations. A large part of it means dealing with the devices and the networks that users end up using.
If I had to explain it, it would be something like this:
- WebRTC has minimal signaling of its own, and relies on the application on top of it to handle signaling for it
- It negotiates the requirements of a session via an SDP protocol (which the application is responsible of sending and receiving)
- The media connection gets established using the ICE protocol, which uses STUN and TURN server as the means to get connectivity in as many network conditions as possible
- Actual media is sent and received over SRTP, with the voice and video codecs negotiated in advance via SDP
I won’t go over all the details here, but if you want to dive deeper into this, then I can suggest these two free courses that I have:
What are the main components of WebRTC?
This depends how you look at it 🥸
I want to suggest two different approaches:
1. Technology stack

Here, you can find the various protocols that make up WebRTC. The drawing is taken from the great book High Performance Browser Networking.
You can read more about each one of these protocols in the WebRTC Glossary, or you can check out my WebRTC Protocols courses on webrtccourse.com
2. Entities

This is my preferred video of the WebRTC components, as it talks about the entities involved in connecting a session. It also suggests that in many ways, you’re not in control of most of what’s going on, which is sad, but it has its reasons.
Here are two articles to dig in about this angle:
👉 WebRTC Server: What is it exactly?
👉 The lead actors in WebRTC are outside of your control
Is WebRTC free to use?
Yes. No. Maybe.
WebRTC is an open protocol with a high quality, popular, permissive open source implementation.
This makes WebRTC free. Individuals and companies can use WebRTC to their heart’s content in whatever application they want to develop.
The thing is… developing with WebRTC is going to cost you time and engineers – both usually expensive. And running WebRTC applications isn’t free either – there are costs associated with hosting servers and paying for networking traffic – this can get expensive quickly for video that requires high bandwidth use.
Here’s a longer article on this topic 👉 Is WebRTC really free? The costs of running a WebRTC application
Who maintains or owns WebRTC?
Google. Not exactly, but close enough.
WebRTC is defined by the W3C and IETF. These are international standardization organizations that encompass the views of multiple vendors.
The implementation that goes into all modern web browsers today? That was implemented and maintained by Google.
They are by far the largest contributor to that piece of code, which means they control and own the behavior your application would deal with the moment it hits a web browser.
And remember, Google owns Chrome which has a bigger market share than all other browsers combined and with a long margin. And all other browsers run the same piece of code, known as libWebRTC.
So yes. WebRTC is maintained by Google. Mostly.
Here’s some more on this topic/question:
👉 With WebRTC, don’t expect Google to be your personal outsourcing vendor
🧑💻 For Developers / Technical Use

How do I get started with WebRTC?
Depends who you are, what you do and what you are aiming to achieve.
- For a developer trying to learn WebRTC, I’d go for building a sample application to understand the tech a bit better. You can use our WebRTC: The Missing Codelab training course as a starting point and an explainer for this
- Companies who wish to develop a demo or an MVP of something should most likely use a third party managed service for that. There are quite a few vendors and you can find many of them listed on this page of a report of mine: Video API report
- Support, QA, product managers, entrepreneurs and other people who need a basic understanding of WebRTC can start from my free WebRTC Basics training course
There are likely more approaches and others who may need getting started with WebRTC. If I haven’t covered your scenario or need, just leave me a comment on this article and I’ll try to help you out.
How do I establish a peer-to-peer connection?
Using WebRTC of course 🙂
You will need to pass the SDP messages created by the WebRTC API from one peer to another and vice versa. You will likely also need a TURN server (or a STUN server).
Lucky for you, the WebRTC: The Missing Codelab training course is free for all. It explains how to build a Node app that does exactly that – establishing a peer-to-peer connection with WebRTC. It is packed with explanations and rationale, including covering all relevant edge cases while at it.
What signaling server should I use with WebRTC?
Whatever fits your needs.
You need to start from figuring out the signaling protocol you want to use and move your way from there to the actual signaling server.
Here are two resources to guide you through this:
👉 Choosing the best WebRTC signaling protocol for your application
👉 What is a WebRTC Signaling Server and Why You Should NOT Use AppRTC?
How do I handle NAT traversal in WebRTC?
Using STUN and TURN servers and the ICE protocol.
WebRTC runs on technologies that are slightly different from the rest of what we’re used to in web browsers. This includes things like UDP, SRTP and ephemeral, dynamic ports. As such, certain network elements out there might block its traffic (such as NAT devices and firewalls). These shape the networks in ways that might hinder the ability to send what WebRTC needs sending over the network, which is why WebRTC uses STUN (to figure out public IP addresses) and TURN (to relay media). ICE then orchestrates the process to figure out the best path between the peers in the session.
More on this 👉 We TURNed to see a STUNning view of the ICE
What’s the best TURN/STUN server to use?
That depends…
Here are a few thoughts out of the top of my head:
- coturn is the most common and popular open source alternative. It is used quite a lot and by virtually everyone
- STUNner is a rather new and promising alternative to coturn. It has an actual company backing it, which can be seen as an advantage
- If you want a managed service, then I’d look at Cloudflare TURN or Twilio NTS before venturing to other avenues
How do I record a WebRTC stream?
There are multiple ways to record WebRTC streams.
I’ll start with a fact you need to first accept – you can’t use TURN to record WebRTC media streams. TURN servers aren’t privy to the encryption keys used…
You can record WebRTC streams on the client side using MediaRecorder API or in media servers (multiple alternatives there).
For a deeper dive into recording head here 👉 WebRTC recording challenges and solutions
How can I share my screen with WebRTC?
WebRTC has an API called GetDisplayMedia. With it, the user can decide to share a browser tab, a window or the whole screen to share.
The resulting media stream can then be sent as any other video streams over WebRTC (with some minor but important differences).
WebRTC: The Missing Codelab training course includes a lesson about screen sharing.
How do I implement group calling or multiparty video?
This one will take time and won’t fit here.
Group calling requires media servers. Usually, the SFU kind.
If you are asking, then my suggestion is to use a Video API vendor for this instead of doing it on your own. Assuming you want to build it on your own and be your own boss here, then go for one of the open source SFU media servers.
Start here to learn more about media servers 👉 What exactly is a WebRTC media server?
🔒 Security and Privacy

Is WebRTC secure?
Yes.
And no.
WebRTC is secure. To the point of being the most secure VoIP solution out there.
But you can ruin it all by doing things unintentionally in the application layer.
Here’s where you should continue when it comes to WebRTC security:
👉 Everything you need to know about WebRTC security 🔐
👉 WebRTC Security & Privacy Essentials (paid course)
Does WebRTC leak my IP address?
Yes. And no.
WebRTC needs IP addresses to work. How would anyone know how to reach your machine directly to send you media peer-to-peer otherwise?
While most of what you’ll find about WebRTC leak is FUD, there is truth in it as well. The fact IP addresses are needed can be abused in many creative ways.
You can read more about this here 👉 What is the WebRTC leak test?
How can I prevent WebRTC IP leaks in browsers?
A glitch in the ChatGPT matrix!
This question is too similar to the previous one 🤯
Just go read the answer above.
📈 Performance and Optimization

How do I reduce WebRTC latency?
- By placing your media servers closer to the users
- Doing the same for your TURN servers
- Analyzing the whole media processing pipeline end to end and reducing latency along that pipeline wherever you see the opportunity to do so
Guess what? I even wrote a long form article titled Reducing latency in WebRTC 😎
How can I measure the quality of a WebRTC call?
This one is tricky.
First you’ll need to define quality. Is it related to connectivity? Actual media quality? On which devices? Over what networks and network conditions?
Are you fine eating up more of the device CPU and network for better quality? Does your answer change if the device is a smartphone and the user would rather use it for the whole day and without it heating up in his hand?
One way to measure quality in WebRTC is by way of MOS and VMAF scores. Both are not really objective and have their drawbacks.
In most cases, and for doing measurements at scale, you will end up just looking at network related metrics, such as bitrate, packet loss, jitter and round trip time.
Here’s an ebook that will give you some more information on this 👉 Top 7 WebRTC Video Quality Metrics and KPIs
Oh, and you use WebRTC stats to collect these metrics and make sure measurements of quality.
What metrics should I monitor for WebRTC?
Ha! We just got an answer to it above.
I’ll reiterate it here then 👉 Top 7 WebRTC Video Quality Metrics and KPIs
How do I improve audio/video quality in poor networks?
- Use better codecs
- Reduce bitrate requirements
- Incorporate error resiliency techniques such as FEC, retransmissions and packet loss concealment
Here are a few resources to read about this topic:
👉 WebRTC media resilience: the role FEC, RED, PLC, RTX and other acronyms play
👉 Fixing packet loss in WebRTC
👉 8 ways to optimize WebRTC performance
🌐 Browser and Platform Compatibility

Which browsers support WebRTC?
All modern browsers: Chrome, Safari, Edge and Firefox.
There are some differences, but they aren’t too many. Essentially, you’ll need to test on all browsers and fix any issues that crop up.
Does WebRTC work on mobile (Android/iOS)?
Yes.
Both Chrome and Safari on mobile support WebRTC. Again, with some minor limitations and differences, but for the most part they work.
You can also get WebRTC compiled into a native application on Android and iOS, which is quite popular.
How do I make WebRTC work in Safari?
Just like you do for Chrome, but with less debugging and troubleshooting tools and with a bit more of a headache while doing so 😉
🏗️ Architecture and Deployment

Can WebRTC scale for large audiences?
Yes. It requires media servers and effort, but it is doable.
Ignore the FUD around WebRTC being P2P and the need for something different (which is someone ending up selling you their WebRTC implementation).
Here are a few resources for you to read on this topic:
👉 What is WebRTC P2P mesh and why it can’t scale?
👉 How Many Users Can Fit in a WebRTC Call?
👉 Different WebRTC server allocation schemes for scaling group calling
What’s the difference between SFU and MCU?
Both are media servers geared towards managing group meetings.
An MCU will mix the media from the participants and generate a single stream going back to the participants.
An SFU routes the media it receives to the participants in the meeting. It doesn’t process media beyond routing it.
Today? SFUs are a lot more common and popular. They offer flexibility and cost less to operate.
Start here for more information:
👉 WebRTC Multiparty Video Alternatives, and Why SFU is the Winning Model
👉 WebRTC conferences – to mix or to route audio
Should I use a media server with WebRTC?
Yes.
But it depends on your application and use case.
Generally speaking, you will need a media server if you wish to conduct group meetings or broadcasting.
Read more on WebRTC media servers.
Can WebRTC be used with backend frameworks like Node.js, Python, etc.?
Sure you can.
For the most part, backend frameworks for WebRTC means signaling server implementations. And these can be written in Node.js, Python, Java and even PHP.
We have our own backend framework written in Node in the WebRTC: The Missing Codelab training course.
While WebRTC media servers are backend related and are frameworks, they fit a bit less to this question (and mostly, they are written in C or Node, but can be written in other languages as well).
📦 Use Cases and Applications

Too many to count.
As a rule of thumb, if you need voice and video at a latency below 1 second to be shown inside a web browser, then you have a use case that needs WebRTC.
I wrote a series of articles about use cases. You can use these as guidance to the various types of applications people end up using WebRTC for:
👉 Zooming in on remote education and WebRTC
👉 WebRTC in telehealth: More than just HIPAA compliance
👉 Fitting WebRTC in the brave new world of webcams, security, surveillance and visual intelligence
👉 Cloud gaming, virtual desktops and WebRTC
👉 WHIP & WHEP: Is WebRTC the future of live streaming?
Also, my WebRTC for Business People report has use cases and examples in it.
Can I use WebRTC for video conferencing?
Yes.
How is WebRTC used in telehealth or remote education?
In many cases, just like video conferencing.
I have written detailed articles about these two verticals:
👉 Zooming in on remote education and WebRTC
👉 WebRTC in telehealth: More than just HIPAA compliance
Can I build a Zoom/WhatsApp alternative with WebRTC?
Yes.
Google Meet is built on WebRTC.
Zoom now uses WebRTC.
Facebook Messenger is built on top of WebRTC.
🤝 Interoperability and Standards

Is WebRTC compatible with SIP or VoIP systems?
Yes. And no.
WebRTC uses similar protocols as SIP and other VoIP systems, but interoperating between them requires a bit of an effort.
As a simple example, the SIP protocol is usually implemented on top of TCP or UDP transport. For WebRTC, you need to use a WebSocket transport for it. So existing infrastructure needs to accommodate for that, usually using a gateway of sorts.
More on transport protocols here 👉 Choosing the best WebRTC signaling protocol for your application
What codecs are supported by WebRTC?
For video: VP8 and H.264 are mandatory. VP9 and AV1 are mostly supported by web browsers today. HEVC is sporadically available in different browsers and devices.
If you’re asking to decide which video codec to use, then be sure to read this as well 👉 WebRTC video codec generations: Moving from VP8 and H.264 to VP9 and AV1
How do I ensure interoperability between browsers?
Use adapter.js and test frequently across browsers and devices your users are using.
🔍 Debugging and Troubleshooting

Why isn’t my WebRTC connection working?
Lots of things can go wrong.
Olivier wrote about the anatomy of a WebRTC connection, so that’s where you should start your journey to understand this topic.
Things that can go wrong?
- Your application logic
- Something in your signaling protocol implementation
- getUserMedia failing
- SDP messages not passing properly or timing out
- Not having TURN servers
- TURN servers not configured properly
- Firewalls blocking the connections even through your TURN servers
- I probably forgot a few more…
How do I debug WebRTC in the browser?
By way of chrome://webrtc-internals
More on that here 👉 Everything you wanted to know about webrtc-internals and getStats
What tools help monitor or test WebRTC performance?
rtcstats is the open source I’d use.
watchRTC is the service in testRTC for monitoring that we’ve built and launched when I was the CEO at testRTC. It is still going strong.
Got any questions for me?

You can ask ChatGPT.
Or you can contact me and ask.
I offer training and consulting for WebRTC, so be sure to check out my services.