Skip to content
CAI
Software that uses CAICheck a score

elixir-webrtc/ex_webrtc

74.6

Strong · 3 October 2026

11.2k

lines of production code

Elixir

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

ExWebRTC is an Elixir library that implements a complete WebRTC stack, handling peer connections, media transmission, and data channels. It provides core capabilities for negotiating sessions via SDP/ICE, managing secure DTLS/SCTP transport, and processing RTP streams with support for multiple codecs, jitter buffering, and congestion control. The system also includes utilities for recording media to local files and broadcasting via WHIP/WHEP protocols.

How it got here

2023 — Initial ExWebRTC library release

12 changes.

This period marks the initial release of the ExWebRTC library, introducing core WebRTC components such as PeerConnection, DataChannels, and RTP transceivers with support for TWCC and simulcast. Comprehensive test suites and SDP fixtures were added to validate signaling, media handling, and connection states across different browser implementations. The release also included the creation of example applications for echo, file streaming, and media recording to demonstrate the library's capabilities.

2024–2025 — media reliability and codec expansion

16 changes.

This period focused on enhancing WebRTC media reliability and expanding codec support by implementing NACK-based retransmission, RTCP reporting, and simulcast demuxing. It introduced native handling for AV1, DTMF, and jitter buffering, alongside new features for recording media to IVF and Ogg containers. The work was complemented by comprehensive test coverage and a suite of new example applications demonstrating broadcasting, chat, and file streaming capabilities.

Features

Add DTMF tone reception example

The \examples/dtmf\ directory now includes a complete example application that demonstrates receiving DTMF tones from a browser. It features an Elixir server using Bandit and ExWebRTC to handle WebRTC connections, process RTP packets through a jitter buffer and depayloader to detect DTMF events, and log them to the console. A corresponding HTML/JavaScript frontend provides a dial pad interface to send tones over a WebSocket connection.

examples/dtmf · high confidence

Add Echo WebRTC example

Introduces a new Echo example application that receives audio and video from a browser and sends it back. The example includes a WebRTC peer handler that manages connection state, processes SDP offers/answers and ICE candidates, and handles incoming RTP streams. It also implements RTCP feedback handling, specifically sending Picture Loss Indication (PLI) packets in response to keyframe requests, and supports simulcast by filtering incoming video layers based on the 'rid' parameter.

examples/echo · high confidence

Add Send From File example with WebRTC video streaming

A new example demonstrating how to stream video from a file via WebRTC has been added. This includes an HTML page (\index.html\) that displays a video player and a JavaScript client (\script.js\) that establishes a WebSocket connection to negotiate the WebRTC session, handling SDP offers/answers and ICE candidates to render the incoming video stream.

_examples/send\_from\file/priv · high confidence

Add WHIP/WHEP broadcasting example

Introduces a new example application in \examples/whip\_whep\ that implements a WHIP (WebRTC-HTTP Ingestion Protocol) and WHEP (WebRTC-HTTP Egress Protocol) broadcasting server. The example includes a Plug-based router handling ingestion and playback endpoints, a forwarder for relaying RTP/RTCP streams between input and output peer connections, and a static HTML/JS player for testing WHEP playback. It demonstrates how to configure and run a live streaming setup using OBS for ingestion and a browser for viewing.

_examples/whip\whep · high confidence

Add configuration files for echo and send\_from\_file examples

Added config.exs files for the echo and send\_from\_file example applications, setting the logger level to info and binding the services to 127.0.0.1 on port 8829.

_examples/echo/config, examples/send\_from\file/config · high confidence

Add save\_to\_file example for recording WebRTC media

A new example application is introduced that allows users to receive audio and video streams from a browser and save them to local files. The example runs an Elixir server (using Bandit) that handles WebRTC peer connections via WebSocket, utilizing jitter buffers and depayloaders to process VP8 video and Opus audio tracks. Users can start and stop recording through a simple HTML interface, resulting in saved \video.ivf\ and \audio.ogg\ files that can be played with tools like ffplay.

_examples/save\_to\file · high confidence

Add support for recording media to IVF and Ogg containers

New modules have been added to the \ExWebRTC.Media\ namespace to enable recording video and audio streams to local files. The \ExWebRTC.Media.IVF\ module provides readers and writers for the IVF container format (typically used with VP8 video), handling frame headers, timestamps, and codec metadata. The \ExWebRTC.Media.Ogg\ module provides readers and writers for the Ogg container format with Opus audio, implementing page structure, checksums, and Opus packet duration calculation according to RFC 7845. These components allow users to capture and persist WebRTC media sessions in standard container formats.

_lib/ex\webrtc/media · high confidence

Added RTCP sender report generation and NACK-based retransmission support

The RTP sender now includes internal modules to generate RTCP Sender Reports based on recorded packet statistics and to handle Negative Acknowledgement (NACK) requests by retransmitting lost packets using RTX (Retransmission). This enables the library to provide standard RTCP feedback and improve reliability for outbound media streams.

_lib/ex\_webrtc/rtp\sender · high confidence

Initial release of the ExWebRTC WebRTC library

This commit introduces the initial implementation of the ExWebRTC library, providing a complete Elixir-based WebRTC stack. It includes core components such as PeerConnection, DataChannels, and RTP transceivers, along with supporting modules for ICE, DTLS, SCTP, and SDP handling. This release establishes the foundational API for establishing peer connections, exchanging media, and transmitting data.

_lib/ex\webrtc · high confidence

New 'Send From File' example for streaming local media via WebRTC

A new example application has been added that demonstrates sending video (IVF) and audio (Ogg/Opus) from local files to a browser over WebRTC. The example includes a Plug-based router serving a static HTML page and upgrading WebSocket connections to a handler that reads media files, payloads them into RTP packets, and streams them to the client. It also provides a README with instructions for generating test media files using FFmpeg and running the application.

_examples/send\_from\file · high confidence

New AV1, DTMF, and Jitter Buffer support with refactored RTP codec handling

This update introduces native support for AV1 video, including full RTP packetization and depacketization logic, and adds the ability to receive DTMF tones. A new jitter buffer has been implemented to reorder and buffer incoming RTP packets, improving resilience against network jitter. The underlying RTP codec architecture has been refactored to use a modular, behavior-based dispatch system, separating payloader and depayloader implementations for each codec (H.264, VP8, Opus, G.711) into dedicated modules.

_lib/ex\webrtc/rtp · high confidence

New WebRTC Echo example with simulcast support

The echo example now includes a browser-based client (index.html and script.js) that establishes a WebRTC connection to demonstrate echo functionality. The client captures local video and audio, sending the video stream with simulcast encodings (high, medium, and low quality) to optimize bandwidth usage, and exchanges SDP offers/answers and ICE candidates over a WebSocket to complete the peer connection.

examples/echo/priv · high confidence

New WebRTC chat example with DataChannels

Added a new chat example application in the \examples/chat\ directory that demonstrates real-time text messaging using WebRTC DataChannels. The example includes a backend (Elixir/Bandit) handling WebSocket upgrades and PeerConnection logic, and a frontend (HTML/JS) that establishes a peer connection, negotiates via SDP/ICE, and sends/receives chat messages through the data channel. Users can run the example locally and interact with it via a browser at http://127.0.0.1:8829.

examples/chat · high confidence

New configuration, demuxing, and TWCC logging modules for PeerConnection

This change introduces several new internal modules to enhance the PeerConnection's capabilities and configurability. A new \Configuration\ module centralizes settings for codecs (including AV1 support), RTP header extensions, RTCP feedbacks, and ICE options like aggressive nomination and port ranges. A \Demuxer\ module is added to route incoming RTP packets to the correct media stream using MID extensions and payload types. Additionally, \TWCCRecvLog\ and \TWCCSendLog\ modules are introduced to record packet arrival and departure timestamps, enabling Transport-Wide Congestion Control (TWCC) feedback generation and correlation. A specific \FlyIpFilter\ module is also added to support Fly.io deployments by filtering ICE host candidates.

_lib/ex\_webrtc/peer\connection · high confidence

Removals

Removal of ExWebRTC module stub

The empty ExWebRTC module stub has been removed from the library. This cleanup eliminates a placeholder that previously served no functional purpose, streamlining the codebase as the actual PeerConnection implementation is developed in separate files.

lib · high confidence

Behavioural changes

Enhanced RTP receiver capabilities with NACK, RTCP reports, and simulcast support

The RTP receiver now includes a NACK generator to request retransmission of lost packets, a report recorder to track jitter and packet loss metrics for RTCP receiver reports, and a simulcast demuxer to route incoming streams based on RID extensions. These additions improve reliability through automatic retransmission requests, provide detailed inbound quality statistics, and enable support for simulcast video streams.

_lib/ex\_webrtc/rtp\receiver · high confidence

Fixes

Support for padded DataChannelAck messages in SCTP DCEP parsing

The SCTP Data Channel Endpoint Protocol (DCEP) parser now accepts DataChannelAck messages that are padded to 4 bytes, a behavior observed in implementations like Pion. Previously, such padded acknowledgments would cause a parsing error, potentially leading to connection issues or failure to close data channels correctly. This fix ensures compatibility with non-standard but common peer implementations by treating 3-byte and 4-byte empty ack payloads as valid.

_lib/ex\_webrtc/sctp\transport · high confidence

Test coverage

Added comprehensive test suite for ExWebRTC core components; Added test coverage for AV1, H.264, VP8, DTMF, and Jitter Buffer RTP components; Added test coverage for IVF and Ogg media modules; Added test fixtures for IVF, Ogg, and SDP formats; Added test support utilities for WebRTC testing; Added tests for PeerConnection configuration, demuxing, and TWCC logging; Added tests for RTP receiver components; Added tests for RTP sender NACK responder and report recorder; Updated test configuration for ExUnit.

Dependencies

Add dependency manifests for new and updated example applications

The \examples/chat\, \examples/dtmf\, \examples/echo\, \examples/save\_to\_file\, and \examples/send\_from\_file\ directories now include \mix.exs\ and \mix.lock\ files, establishing the dependency graph for these examples. These manifests pin the \ex\_webrtc\ library to the local path and specify runtime dependencies including \plug\ (1.15.0), \bandit\ (1.2.0), \websock\_adapter\ (0.5.0), and \jason\ (1.4.0), ensuring consistent and reproducible builds for the chat, DTMF, echo, file save, and file send demo applications.

(dependencies) · high confidence

Housekeeping

Project branding, documentation, and configuration updates

The repository has been updated with new branding assets, including \logo.svg\ and \logo\_text.svg\, and the \README.md\ has been significantly expanded to include installation instructions for version 0.17.0, optional DataChannel support via \ex\sctp\, and links to tutorials and examples. Configuration files have also been adjusted: \.credo.exs\ now ignores \TagFIXME\ warnings, \.formatter.exs\ includes \examples/\\ in its formatting scope, and \.gitignore\ excludes local dialyzer artifacts and macOS \.DS\_Store\ files.

(repo-wide) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 74 → 75 (+0.2)
  • Rubric changed (rubric-2026.09.15 → rubric-2026.10.1) — scores are not directly comparable.

Lenses

  • Code Health 95 → 95 (-0.1)
  • Architecture 93 → 84 (-8.3)
  • Maturity 67 → 67 (+0.3)
  • Readiness 68 → 70 (+2.2)
  • Security 95 → 96 (+1.0)
  • Performance 100 (new)

Resolved (2)

  • Hotspot: lib/ex_webrtc/peer_connection.ex (lib/ex_webrtc/peer_connection.ex)
  • Off-boarding risk: anonymized user #1

New (9)

  • Documentation: no architecture or design documentation (README.md)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no project overview (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (6 lines × 2) (lib/ex_webrtc/rtp/g711/depayloader.ex)
  • Duplicated block (7 lines × 5) (examples/chat/lib/chat/peer_handler.ex)
  • Off-boarding risk: anonymized user #1
  • Outdated: crc
  • Projects may be oversized for their cohesion

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

elixir-webrtc/ex_webrtc was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 3 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit c813ac2fc8f3632c03fe1cbb7447f43d71d2f977 — the exact code this score is about.
  • Scored under rubric-2026.10.1 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-8fe32cd45d00.