Skip to content

About

Our very own personal video chat application to connect seamlessly with family and friends

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real-Time Video Chat Application

This is a full-stack, real-time video and audio chat application built with modern web technologies. It allows multiple users to join a room and communicate via peer-to-peer connections, facilitated by a central signaling server.

Live Demo

A live version of the application is deployed here: https://krishan-video-call-app.netlify.app

Features

  • Real-Time Communication: High-quality, low-latency video and audio streaming using WebRTC.
  • Room-Based System: Users can create new, unique rooms or join existing ones using a room ID or a direct link.
  • Dynamic Video Grid: The layout automatically adjusts to the number of participants in the call for an optimal viewing experience.
  • Media Controls: Users can mute/unmute their microphone and enable/disable their camera at any time.
  • Active Speaker Detection: The participant who is currently speaking is highlighted with a visual indicator.
  • Connection Status: A clear indicator shows the current connection status to the signaling server.
  • Video-Off Avatars: When a user's video is turned off, an avatar is displayed with their status.
  • Responsive Design: The UI is fully responsive and works seamlessly on both desktop and mobile devices.

Tech Stack

The project is a monorepo divided into a Client (frontend) and a Server (backend).

Client (Frontend)

Server (Backend)

Project Structure

Video-Call-Application/
├── Client/
│   ├── public/
│   ├── src/
│   │   ├── Pages/
│   │   │   ├── LandingPage.jsx
│   │   │   ├── Room.css
│   │   │   └── Room.jsx
│   │   ├── App.jsx
│   │   └── main.jsx
│   ├── .env
│   ├── netlify.toml
│   ├── package.json
│   └── vite.config.js
│
└── Server/
    ├── .env
    ├── package.json
    ├── server.js
    └── socket.js

Getting Started

Follow these instructions to set up and run the project on your local machine.

Prerequisites

  • Node.js (v18 or later recommended)
  • npm (comes with Node.js)

Installation & Setup

  1. Clone the repository:

    git clone https://github.com/krishangoyal12/Video-Chat-Application
    cd Video-Call-Application
  2. Set up the Backend Server:

    cd Server
    npm install
    

    Create a .env file in the Server directory and add the following variables:

    # Server port
    PORT=8000
    # The URL of your running frontend client
    FRONTEND_URL=http://localhost:5173

    Now, start the server:

    npm start
    

    The server should now be running at http://localhost:8000.

  3. Set up the Frontend Client: Open a new terminal window.

    cd Client
    npm install

    Create a .env file in the Client directory and add the following:

    # The URL of your running backend server
    VITE_BACKEND_URL=http://localhost:8000

    Now, start the client development server:

    npm run dev

    The application should now be running at http://localhost:5173.

How It Works

The application leverages WebRTC for peer-to-peer media streaming, with a Node.js server acting as a signaling server to coordinate connections.

  1. Joining a Room: When a user joins a room, the client connects to the Socket.IO server and emits a join-room event.
  2. Signaling: The server adds the user to a room and notifies them of existing participants. For each existing participant, a new RTCPeerConnection is created.
  3. Peer Connection: The new user exchanges signaling messages (SDP offers/answers and ICE candidates) with other users in the room via the Socket.IO server. This process, known as the "handshake," establishes a direct peer-to-peer connection.
  4. Media Streaming: Once the connection is established, video and audio data are streamed directly between the users' browsers, minimizing latency and server load.
  5. Disconnection: When a user leaves, a disconnect event is fired, and the server notifies all other room participants to close the corresponding peer connection.

Deployment

  • Client: The frontend is deployed on Netlify.
  • Server: The backend server is deployed to Render.

About

Our very own personal video chat application to connect seamlessly with family and friends

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages