@vandeurenglenn/wrtc
v0.7.2
Published
Standards-compliant WebRTC implementation for Node
Readme
node-webrtc is a Node.js Native Addon that provides bindings to WebRTC M154, branch-heads/8037. This project aims for spec-compliance and is tested using the W3C's web-platform-tests project. A number of nonstandard APIs for testing are also included.
Modern source builds are continuously tested with Node.js 24 and 26 on Linux,
macOS, and Windows. WebRTC uses its Chromium Clang toolchain on Linux, Chromium
clang-cl on Windows, and its pinned toolchain on macOS. The addon and WebRTC
share each platform's standard C++ library ABI.
Node.js 24.15 or newer is required. The package uses the platform-provided
DOMException instead of the deprecated userland polyfill.
Windows source builds use Visual Studio 2022 and Windows SDK 10.0.28000 for
CMake and the Node addon; WebRTC itself is compiled with its bundled
clang-cl.
Install
npm install @vandeurenglenn/wrtcThe package manager selects a small optional native package for the current operating system and architecture. Installation does not execute a downloader or build script.
You can also build from source.
Supported Platforms
Release v0.7.1 provides N-API v3 binaries for Linux x64, macOS
x64/arm64, and Windows x64. N-API keeps those binaries ABI-compatible across
supported Node.js versions. Other platform and architecture combinations can
use the source build.
The next release also provides Linux ARM64 binaries for native ARM servers, containers, and single-board computers.
Migration to v0.7
The callback-based legacy RTCPeerConnection#getStats(success, failure) API
has been removed. Use the standards-based Promise API instead:
const stats = await peerConnection.getStats();Examples
See node-webrtc/node-webrtc-examples.
Contributing
Contributions are welcome. See CONTRIBUTING.md for the local build, test, and pull-request workflow.
Benchmarking
A repeatable benchmark harness is available to detect performance regressions while improving the library.
See docs/benchmarking.md for usage and workflow.
