Introduction to WebRTC protocols - Web APIs | MDN (2024)

This article introduces the protocols on top of which the WebRTC API is built.

ICE

Interactive Connectivity Establishment (ICE) is a framework to allow your web browser to connect with peers. There are many reasons why a straight up connection from Peer A to Peer B won't work. It needs to bypass firewalls that would prevent opening connections, give you a unique address if like most situations your device doesn't have a public IP address, and relay data through a server if your router doesn't allow you to directly connect with peers. ICE uses STUN and/or TURN servers to accomplish this, as described below.

STUN

Session Traversal Utilities for NAT (STUN) is a protocol to discover your public address and determine any restrictions in your router that would prevent a direct connection with a peer.

The client will send a request to a STUN server on the Internet who will reply with the client's public address and whether or not the client is accessible behind the router's NAT.

Introduction to WebRTC protocols - Web APIs | MDN (1)

NAT

Network Address Translation (NAT) is used to give your device a public IP address. A router will have a public IP address and every device connected to the router will have a private IP address. Requests will be translated from the device's private IP to the router's public IP with a unique port. That way you don't need a unique public IP for each device but can still be discovered on the Internet.

Some routers will have restrictions on who can connect to devices on the network. This can mean that even though we have the public IP address found by the STUN server, not anyone can create a connection. In this situation we need to use TURN.

TURN

Some routers using NAT employ a restriction called 'Symmetric NAT'. This means the router will only accept connections from peers you've previously connected to.

Traversal Using Relays around NAT (TURN) is meant to bypass the Symmetric NAT restriction by opening a connection with a TURN server and relaying all information through that server. You would create a connection with a TURN server and tell all peers to send packets to the server which will then be forwarded to you. This obviously comes with some overhead so it is only used if there are no other alternatives.

Introduction to WebRTC protocols - Web APIs | MDN (2)

SDP

Session Description Protocol (SDP) is a standard for describing the multimedia content of the connection such as resolution, formats, codecs, encryption, etc. so that both peers can understand each other once the data is transferring. This is, in essence, the metadata describing the content and not the media content itself.

Technically, then, SDP is not truly a protocol, but a data format used to describe connection that shares media between devices.

Documenting SDP is well outside the scope of this documentation; however, there are a few things worth noting here.

Structure

SDP consists of one or more lines of UTF-8 text, each beginning with a one-character type, followed by an equals sign ("="), followed by structured text comprising a value or description, whose format depends on the type. The lines of text that begin with a given letter are generally referred to as "letter-lines". For example, lines providing media descriptions have the type "m", so those lines are referred to as "m-lines."

For more information

To learn more about SDP, see the following useful resources:

Introduction to WebRTC protocols - Web APIs | MDN (2024)

FAQs

Is WebRTC an API? ›

WebRTC provides software developers with application programming interfaces (APIs) written in JavaScript. Developers use these APIs to create peer-to-peer (P2P) communications between internet web browsers and mobile applications without worrying about compatibility and support for audio-, video- or text-based content.

What are WebRTC protocols? ›

Web Real-Time Communications (WebRTC) is an open-source communications protocol that enables real-time voice, text, and video streaming between web browsers and devices.

Does WebRTC use TCP or UDP? ›

WebRTC primarily works over UDP, while WebSocket is over TCP. This means that WebRTC offers slightly lower latency than WebSockets, as UDP is faster than TCP. However, the difference is negligible; plus, TCP is more reliable when it comes to packet delivery (in comparison, with UDP some packets may be lost).

What is the WebRTC introduction? ›

What Is WebRTC? WebRTC or Web Real-Time Communication was created to act as a standard for enabling real-time communication between web browsers. It is an open-source project created by Google and is now developed by various large organisations such as Google, Mozilla, Opera, and more.

Does Netflix use WebRTC? ›

No, Netflix does not use WebRTC for streaming. They use their own proprietary technology called Adaptive Streaming over HTTP (ASoH) that is based on HTTP Live Streaming (HLS).

Is WebRTC owned by Google? ›

WebRTC is an open-source project supported by Google, Mozilla and Opera. The API and underlying protocols are being developed jointly at the W3C and IETF.

Is WebRTC still used? ›

WebRTC was originally created to facilitate peer-to-peer communication over the internet, especially for video and audio calls. It's now used for more use cases, including text-based chats, file sharing, and screen sharing. WebRTC is used by products like Microsoft Teams, Skype, Slack, and Google Meet.

What is the difference between WebRTC and HTTP? ›

HTTP-based protocols use Transmission Control Protocol (TCP), whereas WebRTC often uses Transmission Control Protocol (TCP). Both are the two fundamental protocols that reside on the transport layer. The primary difference between TCP and UDP is that TCP needs a three-way handshake to send data.

Does WebRTC require a server? ›

Even a standard browser-based peer-to-peer connection technically utilizes an application server, the same application servers on which browsers rely. Really, there's no way to truly use WebRTC without any server.

Is there any alternative to WebRTC? ›

Additionally, there are expenses related to infrastructure, hosting, maintenance, salaries for personnel, and other factors that contribute to an increase in the overall budget. The top 10 WebRTC Alternatives are VideoSDK, Twilio, MirrorFly, Agora, Jitsi, Vonage, AWS Chime, EnableX, WhereBy, and SignalWire.

Is WebRTC built on WebSockets? ›

WebSocket is a communication protocol for messages, while WebRTC is designed specifically for real-time video and audio communication. Is WebRTC built on WebSockets? No, WebRTC is not built on WebSockets; it uses its own protocols for real-time communication, though they can work together.

Which language is used in WebRTC? ›

WEBRTC is a plugin-free modern real-time communication technology. It doesn't require any additional plugins or applications for audio, video streaming and data sharing. It uses Javascript, application programming interfaces (APIs), and HTML5 to embed the communication technologies within the browser.

What protocol does WebRTC use? ›

Signaling: How peers find each other in WebRTC

Signaling uses an existing, plain-text protocol called SDP (Session Description Protocol). Each SDP message is made up of key/value pairs and contains a list of “media sections”.

What is the WebRTC API? ›

WebRTC (Web Real-Time Communication) is a technology that enables Web applications and sites to capture and optionally stream audio and/or video media, as well as to exchange arbitrary data between browsers without requiring an intermediary.

What are the disadvantages of WebRTC? ›

Disadvantages of WebRTC in Broadcasting

For example, it can be limited by the viewer's Internet connection speed, which can lead to a decrease in the quality of the broadcast. Additionally, WebRTC is not always suitable for streaming large events with high network load.

What is WebRTC vs Web Audio API? ›

A critical part of WebRTC is the transmission of audio. Web Audio API is all about processing and synthesizing audio in web applications. It allows developers to create complex audio processing and synthesis using a set of high-level JavaScript objects and functions.

Is WebRTC only P2P? ›

WebRTC uses the Peer-to-Peer Connection (P2P) protocol to communicate securely between two devices. P2P is a decentralized network protocol that doesn't rely on a central server. This makes it ideal for use in web applications where data needs to be exchanged between two or more devices in real time.

Is WebRTC a server? ›

A WebRTC server is a computer that handles some aspects of establishing peer-to-peer connections, transmitting data, and maintaining connection stability for real-time communication. There are four key WebRTC servers: Media servers. Signaling servers.

Top Articles
What is Polygon? Everything you need to know about MATIC
Pokemon: The 25 Strongest Legendary Pokemon, Ranked According To Their Stats
Mcgeorge Academic Calendar
Asian Feels Login
Comforting Nectar Bee Swarm
Klustron 9
Trade Chart Dave Richard
Corporate Homepage | Publix Super Markets
Ktbs Payroll Login
Richmond Va Craigslist Com
Zürich Stadion Letzigrund detailed interactive seating plan with seat & row numbers | Sitzplan Saalplan with Sitzplatz & Reihen Nummerierung
Enderal:Ausrüstung – Sureai
O'reilly's Auto Parts Closest To My Location
Hartland Liquidation Oconomowoc
6813472639
Dr. med. Uta Krieg-Oehme - Lesen Sie Erfahrungsberichte und vereinbaren Sie einen Termin
SXSW Film & TV Alumni Releases – July & August 2024
Aldi Süd Prospekt ᐅ Aktuelle Angebote online blättern
Boston Gang Map
Inter-Tech IM-2 Expander/SAMA IM01 Pro
Wausau Obits Legacy
FDA Approves Arcutis’ ZORYVE® (roflumilast) Topical Foam, 0.3% for the Treatment of Seborrheic Dermatitis in Individuals Aged 9 Years and Older - Arcutis Biotherapeutics
Bible Gateway passage: Revelation 3 - New Living Translation
Never Give Up Quotes to Keep You Going
Babbychula
yuba-sutter apartments / housing for rent - craigslist
Makemv Splunk
Poochies Liquor Store
800-695-2780
208000 Yen To Usd
Narragansett Bay Cruising - A Complete Guide: Explore Newport, Providence & More
Used Safari Condo Alto R1723 For Sale
Dtlr On 87Th Cottage Grove
Chicago Pd Rotten Tomatoes
Haunted Mansion Showtimes Near Cinemark Tinseltown Usa And Imax
Myhrconnect Kp
Bus Dublin : guide complet, tarifs et infos pratiques en 2024 !
Plato's Closet Mansfield Ohio
Watchdocumentaries Gun Mayhem 2
Lucky Larry's Latina's
D-Day: Learn about the D-Day Invasion
Dr Adj Redist Cadv Prin Amex Charge
877-292-0545
How Many Dogs Can You Have in Idaho | GetJerry.com
Jasgotgass2
Tableaux, mobilier et objets d'art
Royals Yankees Score
Ehome America Coupon Code
Vérificateur De Billet Loto-Québec
Scott Surratt Salary
Makemkv Key April 2023
Ret Paladin Phase 2 Bis Wotlk
Latest Posts
Article information

Author: Jeremiah Abshire

Last Updated:

Views: 6447

Rating: 4.3 / 5 (54 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Jeremiah Abshire

Birthday: 1993-09-14

Address: Apt. 425 92748 Jannie Centers, Port Nikitaville, VT 82110

Phone: +8096210939894

Job: Lead Healthcare Manager

Hobby: Watching movies, Watching movies, Knapping, LARPing, Coffee roasting, Lacemaking, Gaming

Introduction: My name is Jeremiah Abshire, I am a outstanding, kind, clever, hilarious, curious, hilarious, outstanding person who loves writing and wants to share my knowledge and understanding with you.