You are here


PeerJS provides a simple peer-to-peer data sharing API that functions by wrapping WebRTC. It provides true binary data support and can preconnect to clients for faster connection establishment. Each peer wishing to share data simply provides an identifier that other peers using the same API key can connect to. The PeerJS service deals with WebRTC handshake and handles NAT traversals for the users. PeerJS brokers connections by connecting to PeerServer. Users can choose to run their own PeerServer or use a free version hosted by PeerJS. This hosted server can be accessed programmatically using an indirect API via a JavaScript SDK.