A comprehensive video chat application built with VideoSDK, featuring both Python and web interfaces for real-time video communication.
- ๐ Python Application: Command-line video chat client
- ๐ Web Interface: Beautiful, responsive web-based video chat
- ๐ JWT Authentication: Automatic token generation from API credentials
- ๐๏ธ Media Controls: Toggle camera and microphone on/off
- ๐ฅ Multi-participant: Support for multiple users in the same room
- ๐ฑ Responsive Design: Works on desktop and mobile browsers
- ๐ง Easy Setup: Simple configuration with environment variables
- Python 3.12+
- VideoSDK account and API credentials
- Modern web browser (for web interface)
-
Clone the repository
git clone https://github.com/ammar-hup/videosdk-chat-app.git cd videosdk-chat-app -
Create virtual environment
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Get VideoSDK credentials
- Visit VideoSDK Dashboard
- Create an account and get your API Key and Secret
-
Configure environment
cp .env.example .env
Edit
.envand add your credentials:VIDEOSDK_API_KEY=your-api-key-here VIDEOSDK_SECRET=your-secret-here VIDEOSDK_MEETING_ID=test-room-123 VIDEOSDK_NAME=Your Name
python videochat.py-
Start the web server
python server.py
-
Open your browser Go to
http://localhost:8000 -
Join the meeting Click "Join Meeting" and allow camera/microphone access
- Start the Python app:
python videochat.py - Start the web server:
python server.py - Open the web interface and join the same room
- Both participants will be in the same meeting!
python generate_token.pypython test_credentials.pyvideosdk-chat-app/
โโโ videochat.py # Main Python video chat application
โโโ index.html # Web-based video chat interface
โโโ server.py # HTTP server for web interface
โโโ generate_token.py # JWT token generation utility
โโโ test_credentials.py # API credential testing tool
โโโ requirements.txt # Python dependencies
โโโ .env.example # Environment variables template
โโโ .gitignore # Git ignore file
โโโ README.md # This file
| Variable | Description | Example |
|---|---|---|
VIDEOSDK_API_KEY |
Your VideoSDK API Key | 07ab89f3-150b-442d-8c0b-711133e64753 |
VIDEOSDK_SECRET |
Your VideoSDK Secret | 885c58a5977234a60f629... |
VIDEOSDK_MEETING_ID |
Room ID to join | test-room-123 |
VIDEOSDK_NAME |
Your display name | Your Name |
The application automatically generates JWT tokens from your API key and secret. Tokens are valid for 24 hours by default.
- Modern UI: Clean, responsive design with gradient backgrounds
- Real-time Video: Live video streaming with WebRTC
- Media Controls: Mute/unmute microphone and camera
- Status Indicators: Connection status and participant count
- Cross-browser: Works on Chrome, Firefox, Safari, and Edge
-
"Token is invalid" error
- Generate a fresh token with
python generate_token.py - Check that your API key and secret are correct
- Generate a fresh token with
-
Camera/microphone not working
- Allow browser permissions for camera and microphone
- Check that no other application is using the camera
-
Connection fails
- Verify your internet connection
- Check that the meeting ID is correct
Add debug logging by setting the log level in your Python scripts:
import logging
logging.basicConfig(level=logging.DEBUG)- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- VideoSDK for providing the excellent video communication platform
- WebRTC for real-time communication standards
- The open-source community for inspiration and tools
Made with โค๏ธ by [Your Name]