Video & Audio Calling Setup

Enable real-time video and audio calls between users with Agora integration. This guide walks you through creating an Agora account, configuring your project, and setting up video calling in ChatNet.

Navigate to Video Calling

About Agora

Agora provides real-time voice and video communication APIs. ChatNet uses Agora for 1-on-1 video and audio calls between users in private messages.

Agora Pricing

For most small to medium communities, the free tier is sufficient.


Step 1: Create Agora Account

  1. Go to agora.io
  2. Click "Sign Up" or "Get Started Free"
  3. Complete registration with your email
  4. Verify your email address

Step 2: Create a Project

  1. Log in to the Agora Console
  2. Click "Create New Project"
  3. Enter a project name (e.g., "ChatNet")
  4. Select "Secured mode: APP ID + Token" for authentication
  5. Click "Submit"

Important: Always use "Secured mode" (APP ID + Token) for production. This ensures calls are authenticated and secure.


Step 3: Get Credentials

  1. In the Agora Console, go to your project
  2. Copy the App ID
  3. Click on the key icon to view the App Certificate
  4. Copy the App Certificate (keep this secret!)

Step 4: Configure ChatNet

Navigate to Video Calling in the admin panel and enter your credentials:

SettingDescription
Enable Video CallingTurn on the video calling feature
Video Calling ProviderSelect Agora
Agora App IDYour Agora project App ID
Agora App CertificateYour Agora project App Certificate
Maximum Call Length (minutes)Limit call duration (0 for unlimited)
Frame RateVideo frame rate (default: 30)
Min Bit RateMinimum video bitrate (default: 500)
Max Bit RateMaximum video bitrate (default: 1000)

How Video Calling Works

  1. User A opens a private conversation with User B
  2. User A clicks the video or audio call button
  3. User B receives an incoming call notification
  4. User B accepts the call
  5. ChatNet generates secure tokens for both users
  6. Video/audio stream is established through Agora

ChatNet automatically handles token generation for each call session, ensuring secure communication.


Quality Settings

Adjust video quality based on your users' typical internet connections:

QualityFrame RateBit Rate
Low (save bandwidth)15 fps200-400 kbps
Medium (balanced)24 fps400-800 kbps
High (best quality)30 fps800-1500 kbps

Troubleshooting

IssueSolution
Call button not showingEnsure video calling is enabled and credentials are entered
Call fails to connectVerify App ID and Certificate are correct
No video/audioCheck browser permissions for camera/microphone
Poor qualityAdjust bit rate settings or check internet connection
Token errorsEnsure App Certificate is correct (not App ID)
Calls work on some browsers onlyWebRTC support varies - Chrome/Firefox work best

Browser Support

Video calling requires WebRTC support:

HTTPS Required: Browsers only allow camera/microphone access on secure (HTTPS) sites.

Monitoring Usage

Track your Agora usage in the Agora Console: