https://github.com/helloharendra/agora-video-calling-flutter
Video call functionality using agora
https://github.com/helloharendra/agora-video-calling-flutter
Last synced: about 1 year ago
JSON representation
Video call functionality using agora
- Host: GitHub
- URL: https://github.com/helloharendra/agora-video-calling-flutter
- Owner: helloharendra
- License: mit
- Created: 2024-09-02T18:25:16.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-01T18:23:05.000Z (about 1 year ago)
- Last Synced: 2025-05-18T14:09:29.455Z (about 1 year ago)
- Language: C++
- Size: 271 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 📹 Agora Video Calling - Flutter




A complete, production-ready video calling solution for Flutter using Agora SDK. Supports **1:1 calls, group meetings, screen sharing, and real-time messaging**.
## ✨ Key Features
- 🎥 **High-quality video calls** (720p/1080p)
- 🎙️ **Crystal clear audio** with noise suppression
- 👥 **Multi-user conferences** (up to 17 participants)
- 🖥️ **Screen sharing** (Android/iOS/Web)
- 🔒 **End-to-end encryption** for secure calls
- 🌐 **Cross-platform** (iOS, Android, Web)
- 💬 **In-call chat messaging**
- 🎚️ **Device management** (camera/mic/speaker control)
## 🎥 Demo
## 🚀 Quick Setup
### 1. Add Dependencies
```yaml
dependencies:
agora_rtc_engine: ^6.2.1
permission_handler: ^10.2.0
flutter_local_notifications: ^13.0.0
```
### 2. Platform Configuration
**Android**:
1. Add camera/microphone permissions to `AndroidManifest.xml`
2. Enable Java 8 support in `build.gradle`
**iOS**:
1. Add `NSCameraUsageDescription` and `NSMicrophoneUsageDescription` to `Info.plist`
2. Enable background modes for VoIP
**Web**:
1. Add CSP rules to `index.html`
2. Configure CORS for your domain
### 3. Initialize Agora Engine
```dart
final RtcEngine _engine = await RtcEngine.createWithContext(
RtcEngineContext(
APP_ID, // Your Agora App ID
channelProfile: ChannelProfile.LiveBroadcasting,
)
);
await _engine.enableVideo();
await _engine.setClientRole(ClientRole.Broadcaster);
```
## 💻 Basic Implementation
### Join Channel
```dart
await _engine.joinChannel(
token: TEMP_TOKEN, // Use null for testing
channelId: 'test_channel',
uid: 0, // 0 = auto-assign UID
options: ChannelMediaOptions(),
);
```
### Setup Video View
```dart
// Local view
AgoraVideoView(
controller: VideoViewController(
rtcEngine: _engine,
canvas: VideoCanvas(uid: 0),
),
)
// Remote view
AgoraVideoView(
controller: VideoViewController.remote(
rtcEngine: _engine,
canvas: VideoCanvas(uid: remoteUid),
connection: RtcConnection(channelId: 'test_channel'),
),
)
```
## 🛠️ Advanced Features
### Screen Sharing (Android/iOS)
```dart
await _engine.startScreenCapture(
ScreenCaptureParameters(
captureAudio: true,
videoParams: ScreenVideoParameters(
dimensions: VideoDimensions(width: 1280, height: 720),
frameRate: 15,
),
),
);
```
### In-Call Controls
```dart
// Toggle camera
await _engine.switchCamera();
// Mute/unmute
await _engine.muteLocalAudioStream(true);
// Speaker control
await _engine.setEnableSpeakerphone(true);
```
### Event Handling
```dart
_engine.setEventHandler(RtcEngineEventHandler(
joinChannelSuccess: (channel, uid, elapsed) {
// Handle join success
},
userJoined: (uid, elapsed) {
// Add remote video view
},
userOffline: (uid, reason) {
// Remove remote view
},
));
```
## 🔐 Security Best Practices
1. **Use Tokens** (not App ID alone) in production
2. Implement token generation on your backend
3. Enable encryption with `_engine.setEncryptionSecret()`
4. Use role-based permissions
## 📜 License
MIT License - See [LICENSE](LICENSE) for details.
---
## 💼 Hire Me & Support My Work
### 🤝 Available for Projects
I'm open to **Flutter development**, **API integrations**, and **consulting work**.
📱 **Phone/WhatsApp**: [+91 7991327022](https://wa.me/917991327022)
📧 **Email**: [harendraprajapati72@gmail.com](mailto:harendraprajapati72@gmail.com)
🌐 **Website**: [nayaproyog.com](https://nayaproyog.com)
💻 **Portfolio**: [github.helloharendra.io](https://github.helloharendra.io)
### ☕ Buy Me a Coffee
If you appreciate my work, consider supporting me:
[](https://www.buymeacoffee.com/helloharendra)