qmetrics.net

PeerJS

Browser WebRTC library for peer data and media connections

PeerJS screenshot

PeerJS wraps WebRTC with a simple JavaScript API for encrypted peer-to-peer data channels and video or audio calls between browsers.

Overview

PeerJS builds on the browser WebRTC stack to offer a configurable peer-to-peer API for both data and media. Developers create a peer identity, connect to remote peers, send serializable payloads, and place calls without hand-rolling signaling and ICE wiring for common cases.

Data connections can carry strings, JSON, ArrayBuffers, and Blobs, which suits files, game state, or structured messages. Media APIs support streaming audio and video for chat-style applications or screen sharing scenarios described in the project examples.

Connections use WebRTC encryption with DTLS by default so payload traffic stays direct between peers rather than through application servers. You can tune ICE servers, debug levels, and serialization formats, and rely on the project cloud signaling server or operate a separate PeerServer.

The library installs via npm or yarn and is tested against recent Chrome, Edge, Firefox, and Safari versions. Beta support exists for Node.js, Bun, and Deno beyond the browser targets.

Key features

  • Event-driven peer connection API
  • Data channels for multiple payload types
  • Video and audio media calls
  • DTLS-encrypted WebRTC transport
  • Configurable ICE and serialization
  • Optional self-hosted PeerServer
  • npm and yarn package distribution
  • Cross-browser compatibility testing

Use cases

  • Browser-to-browser file or data transfer
  • Simple video chat prototypes
  • Real-time multiplayer game state sync
  • P2P apps without relaying payload data

Tags

Similar software

Netty

Event-driven Java framework for protocol servers and clients

Netty is an asynchronous, event-driven network stack for building maintainable high-performance protocol servers and clients in Java.

★ 35.1k⟳ todayApache-2.0

Tokio

Rust runtime for reliable asynchronous network applications

Tokio is an event-driven, non-blocking I/O platform for asynchronous Rust programs. It supplies scheduling, timers, async TCP and UDP, and building blocks for network services.

★ 33.8k⟳ todayMIT
Frameworks & PlatformsDesktop/CLI app

libuv

Cross-platform asynchronous I/O support library

libuv is a multi-platform library centered on non-blocking I/O. Node.js and several other runtimes embed it for networking and event handling.

★ 27.4k⟳ 3 days agoMIT
Frameworks & PlatformsDesktop/CLI app

Ws

Node.js WebSocket client and server library

The ws package implements WebSocket client and server roles for Node.js. It is not for browser runtimes; front ends should use the native WebSocket API or an isomorphic wrapper.

★ 22.8k⟳ todayMIT
Frameworks & PlatformsDesktop/CLI app

WebRTC

Pure Go WebRTC stack for real-time media

Pion WebRTC implements the WebRTC API in Go without cgo, enabling peer connections, media, data channels, and ICE across servers, desktops, mobile, and WebAssembly targets.

★ 16.9k⟳ 3 days agoMIT
Frameworks & PlatformsDesktop/CLI app

Workflow

C++ async networking and parallel workflow engine

Sogou C++ Workflow is an enterprise-style C++ engine for HTTP servers, async clients, DAG workflows, and parallel compute used in Sogou’s online backends.

★ 14.4k⟳ 2 days agoApache-2.0