kaali001 / varta

A online video chat platform which matches two people who are learning same languages.
https://varta-online.vercel.app
5 stars 6 forks source link

feat: Client-Side Implementation for Video Chat #1

Closed kaali001 closed 1 week ago

kaali001 commented 1 week ago

Description

This PR introduces the core client-side logic for the video chat feature, including Room.tsx and ChatPage.tsx components. It establishes the flow of peer-to-peer communication using WebRTC and Socket.io, managing video streams and user interactions efficiently. Below are the key highlights and functionalities included in this PR.

Changes Made

  1. Room.tsx – Core WebRTC logic and event handling:

    • Manages local and remote media streams.
    • Handles ICE candidates and signaling between peers.
    • Implements RTCPeerConnection for WebRTC connections.
    • Displays local and remote videos with auto-play and responsive UI.
    • Adds loading state during the connection process.
  2. ChatPage.tsx– UI to manage user interactions:

    • Contains the Join and End Chat button to control the session.
    • Manages local media permissions (camera/microphone).
    • Creates and destroys media streams based on user actions.
    • Passes video/audio tracks toRoom.tsx for further processing.