server.js: simple Express + Socket.IO signaling serverpublic/index.html: client UIpublic/client.js: client logic building RTCPeerConnections (mesh topology)
npm installnpm start- Open
http://localhost:3000in multiple browser windows or devices and use the same room name to connect.
- This demo uses a mesh topology: every participant creates a PeerConnection to every other participant. Works well for small groups (<=4). For larger groups, use an SFU (mediasoup, Janus, Jitsi, or commercial SFUs) to reduce upstream bandwidth and CPU.
- You can add a TURN server in
RTCPeerConnectioniceServers for better NAT traversal. - This is a minimal demo. For production, add auth, HTTPS, TURN, reconnection logic, proper UI and bandwidth controls.