Prompt
How do I add chat alongside video calling
Latest observation
Nov 2, 2026
OpenAI APIWeb search: off
To add chat alongside video calling, you typically add a real-time messaging layer next to your video-call signaling/media stack.
Common setup
- Video call: WebRTC, Twilio, Agora, Daily, Vonage, etc.
- Chat: WebSocket-based messaging, Firebase, Supabase, Stream, Sendbird, or your own API + realtime updates.
Simple architecture
- User joins a call
- App creates/joins a call room
- Use the same room to attach:
- video stream
- chat messages
- Chat messages are sent through a realtime channel and shown in the call UI
If you’re building it yourself with WebRTC
WebRTC handles audio/video, not chat. You’ll need:
- WebSocket server for text chat
- a room-based message model
- optional message persistence in a database
Example flow
- Client connects to
wss://yourserver.com - Sends:
{ "type": "join", "roomId": "abc123", "userId": "u1" } - When user sends a message:
{ "type": "chat", "roomId": "abc123", "text": "Hello!" } - Server broadcasts it to everyone in that room
Frontend UI idea
Split the screen:
- Left/center: video grid
- Right sidebar: chat panel
Components:
VideoRoomChatPanelMessageListMessageInput
Minimal implementation options
Option 1: WebSocket chat + WebRTC video
Best if you want full control.
Option 2: Use a managed video SDK with built-in chat
Easiest if you want faster development.
Examples:
- Daily: video + data messages
- Twilio: video + Chat product
- Agora: video + RTM for messaging
- Stream: chat + video integrations
- Sendbird: chat plus calling add-ons
Best practice
- Use the same room ID for both video and chat
- Store messages in DB if you need history
- Add typing indicators, unread counts, and message timestamps
- Secure room access with auth tokens
If you want, I can show you:
- a React example with video + chat, or
- a Node.js + WebSocket backend for chat alongside WebRTC.