WebRTC
DocsWebRTC enables peer-to-peer connections between browsers for audio, video, and data channels. The server only handles signaling so peers can find each other and negotiate a direct connection. One line on the server with webrtc(), one hook on the client with useWebRTCCall(). Use WebRTC when you need direct browser-to-browser communication. For server-mediated bidirectional messaging, see WebSocket.
Open this page in two browser tabs with the same room ID to test peer-to-peer data or video connections.
Tip: Switching between the Data Channel and Video Call tabs resets the active peer connection for that browser tab.
Idle
Join the room in two tabs, then use the chat data channel to send messages directly between browsers.
Reference Code
Loading...
Ready
Output will appear here...