WebRTC has come a long way. It was introduced by Google in 2011 and it had its first cross-browser implementation in 2013. Our team started specializing in it in 2015. Still, it wasn’t even until 2021 that WebRTC 1.0 was published, making it officially a standard!
On the technical side, WebRTC started as a solution for one-to-one communication, but innovators quickly found ways to expand it to support multiparty communication. This opened a world of possibilities for enabling groups of people to come together online in real-time for conversation, meetings, learning, gaming, concerts, and more.
Under the hood, there are multiple protocols that are essential for enabling real-time communication. These protocols enable developers to create applications that can establish connections, exchange data, and provide users with a consistent, reliable, and secure experience across diverse platforms and network conditions.
Let’s take a look at the protocols associated with WebRTC and why they matter.
Session Description Protocol (SDP)
SDP is a format for describing multimedia communication sessions, including audio, video, and other data. In WebRTC, SDP is used to negotiate the capabilities and parameters of a connection between two peers. You can find more information about the SDP anatomy in this WebRTCHacks post: Anatomy of a WebRTC SDP – webrtcHacks
Why does it matter? SDP is what lets the peer or participant of the video stream know what type of codecs and other media configurations will be used.
Interactive Connectivity Establishment (ICE)
ICE is a framework that enables real-time communication across networks with Network Address Translators (NAT) devices and firewalls. It helps in discovering the best communication path by gathering each peer (candidate) transport addresses and testing connectivity.
Why does it matter? ICE is a check process that identifies IP addresses and ports to allow direct media communication using UDP and TCP. Without it, most of the media streams wouldn’t reach the destination.
Session Traversal Utilities for NAT (STUN)
STUN is a protocol used to assist in establishing communication between peers located behind NATs or firewalls. It allows devices to discover their public IP address, as well as determine the type of NAT they are behind, which aids in establishing direct peer-to-peer connections.
Why does it matter? STUN is essential for WebRTC to determine network topology and establish direct communication paths, thereby enabling efficient real-time communication without relying on relay servers.
Traversal Using Relays around NAT (TURN)
TURN is a protocol that allows a device behind a NAT or firewall to receive incoming data over TCP or UDP. It is often used in conjunction with ICE to establish a communication path when direct peer-to-peer connections are not possible.
Why does it matter? TURN also allows us to circumvent restrictive firewalls or proxies as the one found in enterprise networks.
Datagram Transport Layer Security (DTLS)
DTLS is a protocol used to secure the transport layer of WebRTC connections. It provides encryption and message integrity to ensure the security of the communication.
Why does it matter? Enforcing end-to-end (E2E) encryption for all the apps protects our media stream from being eavesdropped. Even if you wanted, you can’t send unencrypted traffic via WebRTC in a production application.
Real-Time Transport Control Protocol (RTP)
Real-time Transport Protocol, or RTP, is a fundamental element in the realm of WebRTC. As per the RFC 3550 standard, RTP plays a vital role in delivering real-time audio and video content over IP networks by employing sequence numbering, timestamps, and payload type identification to facilitate synchronization and reconstruction of multimedia streams at the receiver’s end. It focuses on the actual transmission of multimedia, working hand-in-hand with its counterpart, RTCP.
Why does it matter? RTP is your go-to protocol for ensuring a smooth and uninterrupted flow of audio and video in real-time communications. By adhering to established standards, RTP excels at adapting to dynamic network conditions, making it a linchpin in delivering high-quality content even when the network environment is less than ideal.
Real-Time Transport Control Protocol (RTCP)
RTCP may not be the newest acronym on the block, but it’s a cornerstone in WebRTC’s toolkit. Part of the RFC 4585 standard, RTCP feedback is crucial for adapting to network changes and optimizing codec performance in real-time communications.
Why does it matter? It ensures your audio and video remain top-notch despite unpredictable network conditions. RTCP sends feedback and other types of call metadata back so we can adapt to the network conditions to keep connection seamless.
SCTP (WebRTC Data Channel)
WebRTC SCTP is a protocol that allows secure and reliable data exchange between peers using WebRTC data channels. WebRTC data channels are abstractions over SCTP streams, which can be configured independently and support different types of data. WebRTC SCTP runs over a DTLS connection, which provides encryption and authentication for the data.
Why does it matter? SCTP allows us to exchange data over WebRTC. While it is less frequently used it has been traditionally used for executing commands, file transfer or forwarding stats between peers securely.
While not exclusive to WebRTC, WebSocket is often used as a signaling protocol to establish and manage connections between peers. It facilitates the exchange of signaling information such as SDP and ICE candidates.
Why does it matter? WebSockets allow us to manage communication between participants or peers. It is our way to let the other participants know when someone is online, wants to join a video call or wants to reach out to a specific participant or peer.
Lean on the Experts
These protocols work together to establish and maintain real-time communication sessions between browsers or applications. Keep in mind that the WebRTC standards and protocols evolve over time, so it’s important to work with an expert development team like ours at WebRTC.ventures that specializes in WebRTC. Contact us today!