Skip to content

Conversation

@muntaxir4
Copy link
Owner

🚀 Initial PR: WebRTC Video Calling with WebSocket Signaling

📝 Description

This PR lays the groundwork for real-time video calling using WebRTC, integrated with a WebSocket-based signaling server for peer-to-peer connection negotiation. The signaling flow handles offer/answer exchange and ICE candidate distribution between clients. This marks the initial step in adding robust, scalable, and low-latency video communication support to the platform.


🔧 Changes Made

Backend (FastAPI):

  • 🔌 WebSocket endpoint: route for offer, answer, and ICE candidate exchange.
  • 🧠 Connection manager: Maintains in-memory peer sessions and mapping via user IDs or room IDs.
  • 📡 Broadcast logic: Routes signals from caller to callee and vice versa via WebSocket.

Frontend:

  • 🎥 Basic WebRTC logic using RTCPeerConnection.
  • 🖥️ Media capture setup using navigator.mediaDevices.getUserMedia.
  • 🧭 Socket signaling client:
    • Connects to backend WebSocket.
    • Sends offers/answers and ICE candidates.
    • Handles remote stream and peer connection.

📌 Next Steps (Future PRs)

  • Add STUN/TURN server support for better NAT traversal.
  • Improve room management and signaling error handling.
  • UI/UX enhancements for call controls (mute, end call, etc.).
  • Add user presence indication and busy signal logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant