WE is a real-time video chat and messaging application built using WebRTC, JavaScript, HTML, and CSS. This project allows users to connect with others through video calls, share their screens, and engage in text-based chatting. Users can either connect with someone directly using a personal code or talk to a stranger by enabling the random chat feature. Additionally, the app includes the functionality to record video calls and chat sessions for later reference.
The key technologies used in this project include WebRTC for peer-to-peer (P2P) communication, Socket.IO for managing connections between users, and vanilla JavaScript for managing the UI.
-
Video Calling with Personal Code
Users can make video calls by sharing a unique code with each other. Both parties enter the code to establish a connection, ensuring a private and direct line of communication. -
Screen Sharing
During a video call, users can share their screen with the other party. This feature is ideal for presentations, remote collaboration, or helping someone with technical issues. -
Text Chatting
In addition to video calls, users can send text messages during their conversation, allowing for both verbal and written communication. -
Connect with Strangers
If a user prefers to meet new people, they can enable the "Talk to a Stranger" feature by checking a checkbox and clicking on the video or chat button. The system will attempt to pair them with a random available user for either a video call or text chat. -
Recording
Users can record their video calls or screen-sharing sessions, capturing both video and audio. This can be useful for saving important conversations or sharing the recording with others.
-
WebRTC Implementation
WebRTC (Web Real-Time Communication) enables real-time, peer-to-peer video, audio, and data communication directly between web browsers. This is the backbone of the WE application, allowing users to connect without the need for a central server. -
Peer-to-Peer (P2P) Connection
Establishing direct connections between users ensures fast, secure communication without the need for large server infrastructures. -
Working with Media Streams
The application captures video and audio streams from the user's webcam and microphone using WebRTC and shares them during the video call. -
WebRTC Data Channels
Data channels are used for sending text messages and other forms of data between peers, ensuring that both media and data communication are seamlessly integrated. -
Socket.IO Server
The application uses Socket.IO to handle the signaling process that establishes peer-to-peer connections. This includes exchanging information about available media streams, codecs, and network configurations. -
Real-Time Communication
WebRTC combined with Socket.IO enables real-time audio, video, and text communication, ensuring a smooth and responsive experience. -
Front-End with Vanilla JavaScript
The entire user interface (UI) is built using vanilla JavaScript, HTML, and CSS. This includes handling media streams, displaying video feeds, managing chat functionality, and enabling dynamic interaction without the need for any external frameworks. -
Stream Recording
Users have the ability to record ongoing streams, whether it's a video call or screen sharing. This ensures that important conversations or demonstrations can be saved for later use.
To run this project on your local machine, follow these steps:
- Clone the repository:
git clone https://github.com/anukulpr1me/we.git
- To start the server, use the following command:
npm start
- Open the Application in Your Browser:
http://localhost:7001/
- Each user is provided with a unique personal code.
- They can share this code with the person they want to communicate with.
- Once both users enter each other's code, a direct video connection is established.
- Users can enable the 'Talk to a Stranger' feature by checking a checkbox.
- The system will automatically match them with another random user, if available.
- Users can record their entire video session, including any shared screens or chat logs.
- Group Video Calls: Support for multiple users in the same call.
- Chatroom Creation: Ability to create chatrooms for group discussions.
- Improved UI: Further refinements to the user interface for better usability.
WE is a fully functional, real-time video chat and messaging platform powered by WebRTC, JavaScript, HTML, and CSS. With features like screen sharing, random user pairing, and recording, it provides a complete communication solution for personal or professional use.