A lightweight peer-to-peer video chat application without servers in the middle.
P2P Video Chat is a WebRTC-powered application that enables direct browser-to-browser video communication. The application allows users to create and join chat rooms for real-time video conferencing without relying on traditional server-based infrastructure for media transfer.
- 🎥 Real-time Video Chat: Connect with peers via high-quality video and audio
- 🔗 Shareable Room Links: Generate unique room links to invite others
- 🔄 P2P Connection: Direct browser-to-browser communication for better privacy
- 🎚️ Media Controls: Easily toggle audio and video during calls
- 🌓 Dark Mode: Switch between light and dark themes for comfortable viewing
- ⚡ Efficient: Built with modern web technologies for optimal performance
-
Clone the repository:
git clone https://github.com/sargentina/p2p-video-chat.git cd p2p-video-chat -
Install dependencies:
pnpm install
-
Start the development server:
pnpm dev
-
Open the app in your browser at
http://localhost:3002 -
(Requires backend to do the signaling.)
- Create a Room: Enter a room name (optional) and click "Create Room"
- Invite Others: Share the generated room link with others to join your video chat
- Manage Settings: Use the control buttons to toggle your microphone and camera
- Dark Mode: Toggle dark mode using the checkbox in the sidebar
This application uses WebRTC for establishing peer connections and transferring audio/video streams directly between browsers. Socket.IO is used for the initial signaling process to establish connections.
Note: This application primarily relies on direct peer-to-peer connections. It uses STUN servers to establish connections but does not use TURN servers for relayed connections. If you have a restrictive firewall or NAT setup, you may experience connectivity issues.
To build the application for production:
pnpm buildThe built files will be in the dist directory and can be deployed to any static web hosting service.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.
Start video chatting directly with your peers today!