Socket-WebRTC
WebRTC + Sockets for a lovely P2P
Warning: under heavy development, this will go kaboom 💥
- Peer roles
- Rooms support
- Server-side network configuration and security
- P2P stream support
Getting started
npm run examples
to run examples on http://localhost:1222
The following example connects multiple peers and sends a video stream
const io = httpServer; // Here goes your express or http server const SocketWebRTCRoom = ; const socketWebRTCRoom = io; socketWebRTCRoom; httpServer;
server.js
const stream = await navigatormediaDevices; const socketWebRTCClient = ; socketWebRTCClient;socketWebRTCClient;
client.js
Check examples folder for more working examples