P2P Video Call is a lightweight browser-based peer-to-peer video calling application built with HTML, CSS, JavaScript, WebRTC, and PeerJS.
The project allows two users to connect directly using unique Peer IDs and supports real-time video calling, audio communication, and instant messaging without requiring a traditional backend server.
- Features
- Technologies
- Project Structure
- How It Works
- Installation
- Browser Support
- Future Improvements
- Contributing
- License
- Author
- ✅ Peer-to-Peer Video Calling — Direct connection between two users
- ✅ Audio Communication — Real-time voice transmission
- ✅ HD Video Streaming — High-quality video feed
- ✅ Camera & Microphone Support — Full media device access
- ✅ Real-Time Chat — Instant messaging during calls
- ✅ Message History — Chat history within the session
- ✅ Enter Key Support — Quick message sending
- ✅ Unique Peer ID Generation — Each user gets a unique identifier
- ✅ Manual Peer Connection — Connect using any Peer ID
- ✅ Connection Status — Visual feedback for connection state
- ✅ Disconnect Functionality — Cleanly end calls
- ✅ Responsive Design — Works on desktop and mobile
- ✅ Modern UI — Gradient design with smooth animations
- ✅ No Server Storage — All data stays between peers
- ✅ No Account Required — Anonymous connection
- ✅ Direct P2P — No intermediate server for media
- ✅ Browser-Based — No installation needed
# Clone the repository
git clone https://github.com/dhruvpandit46/Video-Call.git
# Navigate to the project
cd Video-Call
# Open in your browser
open index.htmlThat's it! No installation, no build step, no server required.
| Technology | Purpose |
|---|---|
| HTML5 | Semantic structure with media capture APIs |
| CSS3 | Gradient design, responsive layout, animations |
| JavaScript (ES6) | Complete application logic with event handling |
| Technology | Purpose |
|---|---|
| WebRTC | Peer-to-peer media streaming |
| PeerJS | Simplifies WebRTC implementation |
| MediaDevices API | Camera and microphone access (getUserMedia) |
| STUN Servers | NAT traversal for P2P connections |
<!-- PeerJS for WebRTC abstraction -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/peerjs/1.4.7/peerjs.min.js"></script>Video-Call/
│
├── index.html # Complete P2P Video Call application
└── README.md # Project documentation
The entire application is contained in a single HTML file with embedded CSS and JavaScript.
┌─────────────────────────────────────────────────────────────┐
│ Video Call Connection Flow │
├─────────────────────────────────────────────────────────────┤
│ │
│ User A User B │
│ │ │ │
│ ▼ │ │
│ Get Peer ID ──────────────► │ │
│ │ ▼ │
│ │ Get Peer ID │
│ │ │ │
│ │ ▼ │
│ │ Enter Peer ID (A) │
│ │ │ │
│ ▼ │ │
│ Enter Peer ID (B) │ │
│ │ │ │
│ ├─────── Connect ────────►│ │
│ │ │ │
│ ▼ ▼ │
│ Start Video Call Accept Call │
│ │ │ │
│ ├─── Stream Audio/Video ─►│ │
│ │ │ │
│ ├─── Chat Messages ──────►│ │
│ │ │ │
│ ▼ ▼ │
│ Call Active Call Active │
└─────────────────────────────────────────────────────────────┘
- Open the Application — Load
index.htmlin your browser - Get Your ID — Your unique Peer ID is automatically generated and displayed
- Share Your ID — Send your Peer ID to the person you want to call
- Enter Their ID — Paste the other user's Peer ID in the input field
- Grant Permissions — Allow camera and microphone access when prompted
- Connect — Click "Connect Karo" to establish the connection
- Start Chatting — Video, audio, and text chat will begin automatically
| Feature | How to Use |
|---|---|
| Video | Automatically streams both ways |
| Audio | Automatically streams both ways |
| Chat | Type message in chat box and click "Bhejo" or press Enter |
| Disconnect | Click "Disconnect Karo" to end the call |
| Component | Description |
|---|---|
| Header | App title with user's Peer ID display |
| Connection Section | Input field for remote ID, Connect button, Random button |
| Status Display | Shows connection state (waiting, connected, error) |
| Video Section | Two video containers (Local and Remote) |
| Video Labels | "Aap" (You) and "Stranger" labels on video feeds |
| Chat Section | Chat box with message history and input field |
| Disconnect Button | Cleanly ends the call |
- 🌈 Gradient Background — Purple-blue gradient (#667eea to #764ba2)
- 📱 Glassmorphism — Frosted glass effects on ID display
- ✨ Smooth Animations — Button hover and transition effects
- 🎯 Clean Layout — Card-based design with rounded corners
- 📱 Mobile-First — Fully responsive for all screen sizes
--primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%)
--secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%)
--accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)
--status-waiting: #fff3cd (#856404)
--status-connected: #d4edda (#155724)
--status-error: #f8d7da (#721c24)- Google Chrome (Desktop & Mobile)
- Microsoft Edge
- Brave
- Opera
- Firefox (WebRTC may have compatibility issues)
- Safari (WebRTC compatibility may vary)
Note: For the best experience, use Chrome or Edge.
| Feature | Status |
|---|---|
| Video Calling | ✅ Complete |
| Audio Streaming | ✅ Complete |
| Text Chat | ✅ Complete |
| Peer ID Generation | ✅ Complete |
| Manual Connection | ✅ Complete |
| Disconnect | ✅ Complete |
| Status Indicators | ✅ Complete |
| Camera Access | ✅ Complete |
| Microphone Access | ✅ Complete |
| Responsive Design | ✅ Complete |
| Mobile Support | ✅ Complete |
- 🔄 Random Stranger Matching — Connect with random users
- 📺 Screen Sharing — Share your screen during calls
- 👥 Group Video Calls — Multi-user conference calls
- 🎵 Voice Only Mode — Audio-only calls
- 😊 Emoji Support — Rich chat experience
- 📁 File Sharing — Share files during calls
- 🔐 End-to-End Encryption — Enhanced privacy
- 📊 Call Timer — Track call duration
- 📝 Chat History — Persistent message history
- 👤 User Profiles — Custom display names
- 🌐 Firebase Signaling — Improved connection reliability
- 🟢 Online User List — See who's available
Contributions, issues, and feature requests are welcome!
- Fork the repository
git fork https://github.com/dhruvpandit46/Video-Call.git- Create a feature branch
git checkout -b feature/your-feature-
Make your changes and test thoroughly
-
Commit your changes
git commit -m "Add your feature"- Push to your branch
git push origin feature/your-feature- Open a Pull Request
This project is licensed under the MIT License.
MIT © 2026 Dhruv Pandit
See the LICENSE file for full license details.
Dhruv Pandit
- GitHub: @dhruvpandit46
- LinkedIn: Dhruv Pandit
- Instagram: @dhruv_pandit2007
| Repository | Description |
|---|---|
| 🎥 VideoCall Pro | Enhanced P2P Video Calling App |
| 🤖 Anique AI | Rule-Based AI Chatbot |
| 🎤 Anique AI Voice | Text-to-Speech API |
| 🏠 Home Automation V2 | ESP32 Browser Firmware Installer |
| 📚 DDCET | AI-Powered Engineering Preparation Platform |
If you found P2P Video Call useful, please consider giving it a ⭐ on GitHub!
It helps others discover the project and supports future development.
Connect with anyone, anywhere - instantly! 🚀