PeerJS wraps the browser's WebRTC implementation to provide a complete, configurable, and easy-to-use peer-to-peer connection API. Equipped with nothing but an ID, a peer can create a P2P data or media stream connection to a remote peer. To broker connections, PeerJS connects to a PeerServer. Note that no peer-to-peer data goes through the server. The server acts only as a connection broker. If you don't want to run your own PeerServer, we offer a free cloud-hosted version of PeerServer. PeerServer is open source and is written in node.js. You can easily run your own. PeerJS simplifies peer-to-peer data, video, and audio calls. Add the PeerJS client library to your webpage. The Peer object is where we create and receive connections. PeerJS uses PeerServer for session metadata and candidate signaling. Every Peer object is assigned a random, unique ID when it's created.

Features

  • PeerJS has the BinaryPack serialization format built-in
  • You can send any JSON type as well as binary Blobs and ArrayBuffers
  • Simply send arbitrary data and you'll get it out the other side
  • For client identification, we provide you the ability to pass in your own peer IDs
  • Anytime another peer attempts to connect to your peer ID, you'll receive a connection event
  • PeerJS uses PeerServer for session metadata and candidate signaling

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow PeerJS

PeerJS Web Site

Other Useful Business Software
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

Build gen AI apps with an all-in-one modern database: MongoDB Atlas

MongoDB Atlas provides built-in vector search and a flexible document model so developers can build, scale, and run gen AI apps without stitching together multiple databases. From LLM integration to semantic search, Atlas simplifies your AI architecture—and it’s free to get started.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of PeerJS!

Additional Project Details

Programming Language

TypeScript

Related Categories

TypeScript Communications Software, TypeScript JSON Serialization Libraries

Registered

2021-06-22