Overview
A production-ready WebRTC learning platform demonstrating real-time audio/video communication with progressive complexity from basic peer-to-peer calls to advanced multi-party Mesh architecture.
Core Features
1. WebSocket Signaling
- Room-based peer discovery and management
- SDP offer/answer exchange via server relay
- ICE candidate relay
- Heartbeat mechanism (ping/pong)
2. Multi-party Mesh Communication
- Up to 50 participants per room
- Up to 1000 concurrent rooms
- Automatic peer connection management
- Grid video layout for multiple participants
- Mute/unmute audio
- Camera toggle on/off
- Screen sharing (getDisplayMedia)
- Local video recording with MediaRecorder (WebM export)
4. DataChannel Chat
- Peer-to-peer text messaging without server relay
- Real-time message delivery
5. Security
- Origin validation (WS_ALLOWED_ORIGINS)
- Identity binding (one ID per WebSocket)
- Resource limits enforcement
User Roles
| Role |
Capabilities |
| User |
Join room, start/stop calls, control media, chat, record |
| Admin |
Deploy, configure TURN/ICE servers, set limits |
Acceptance Criteria
Room Management
Call Establishment
DataChannel
Security
State Machine
1
2
3
4
5
| idle ──[connect]──▶ connecting ──[join]──▶ joined
▲ │
│ [call start]
│ ▼
└──[disconnect]── reconnecting ◀──[disconnect]── calling
|
Non-Functional Requirements
| Requirement |
Target |
| Message latency |
< 50ms |
| Concurrent connections |
100+ |
| Concurrent rooms |
1000 |
| Clients per room |
50 |
| Browser support |
Chrome 90+, Firefox 88+, Safari 14+ |