How adrianhajdin/project_video_chat works
This is a React video-chat application with a Socket.IO signaling server. A caller enters a peer ID in the sidebar; shared context creates a WebRTC peer and signals the server, which relays call offers and answers. The recipient sees a notification and can answer; the video player displays local and remote streams. The browser supplies camera and microphone media. The server also exposes a health-check route. The client and server excerpts show their respective event handling, though the client’s configured signaling URL is not the local server URL.
Main entry points: Context.js Call context · App.js Chat interface · Sidebar.jsx Call controls · Notifications.jsx Incoming call prompt
Components 10
React client
- Chat interface
client/src/App.js - Call controls
client/src/components/Sidebar.jsx - Incoming call prompt
client/src/components/Notifications.jsx - Video display
client/src/components/VideoPlayer.jsx
Call coordination
- Call context
client/src/Context.js - WebRTC peer
client/src/Context.js
Signaling server
- Socket.IO event relay
index.js - Health endpoint
index.js
Browser media
- Camera and microphone
Other components
- Caller or recipient
Connections 14
- Caller or recipient → Call controls: enters call details
client/src/components/Sidebar.jsx - Chat interface → Video display: renders
client/src/App.js - Chat interface → Call controls: renders
client/src/App.js - Chat interface → Incoming call prompt: renders
client/src/App.js - Call controls → Call context: calls actions
client/src/components/Sidebar.jsx - Incoming call prompt → Call context: answers call
client/src/components/Notifications.jsx - Call context → Video display: shares call state
client/src/components/VideoPlayer.jsx - Call context → Camera and microphone: requests stream
client/src/Context.js - Call context → WebRTC peer: creates peer
client/src/Context.js - Call context → Socket.IO event relay: signals call
- Socket.IO event relay → Call context: relays call events
- Caller or recipient → Incoming call prompt: receives prompt
client/src/components/Notifications.jsx - Caller or recipient → Video display: views streams
client/src/components/VideoPlayer.jsx - Caller or recipient → Health endpoint: checks status
index.js