A comprehensive Flutter plugin for EZVIZ camera integration with support for device management, live streaming, PTZ control, audio/intercom, recording, Wi-Fi configuration, and more. This plugin provides both native Android/iOS SDK integration and HTTP API access.
Looking for a example on how to use this,check out this repo which implements api auth,devvice list getting and display of camera stream https://github.com/akshaynexus/ezviz_flutter_example_app
- 🎥 Live Video Streaming - Real-time video playback with native performance
- 🎮 PTZ Control - Pan, tilt, zoom camera control with circular touch panel
- 📱 Device Management - Add, remove, and manage EZVIZ devices
- 🔐 Authentication - Secure login and access token management
- 📹 Video Playback - Replay recorded videos with enhanced controls
- 🔧 Video Quality Control - Adjust streaming quality (smooth, balanced, HD, UHD)
- 🌐 Network Device Support - Connect to local network cameras
- 🎤 Audio & Intercom - Two-way audio communication (half/full-duplex)
- 📸 Recording & Screenshots - Capture video recordings and screenshots
- 📶 Wi-Fi Configuration - Configure device network settings (Wi-Fi, AP, Sound Wave)
- 🎛️ Enhanced UI Controls - Professional video player interface with full-screen support
- 🔑 Authentication - Login, logout, refresh tokens
- 📋 Device Management - List, add, remove devices
- 🎯 PTZ Control - Camera movement and zoom
- 🚨 Alarm Management - Handle device alarms and notifications
- ☁️ Cloud Storage - Manage cloud recordings
- 👥 Sub-Account Management - RAM account operations
- 🔍 Detector Management - Motion detection settings
Run this command in the root of your flutter project
flutter pub add ezviz_flutter- Add the following to your
android/app/build.gradle:
android {
compileSdkVersion 34
defaultConfig {
minSdkVersion 21
targetSdkVersion 34
ndk {
abiFilters "armeabi-v7a", "arm64-v8a"
}
}
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
}- Add network permissions to
android/app/src/main/AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />- Add the following to your
ios/Runner/Info.plist:
<key>NSCameraUsageDescription</key>
<string>This app needs camera access to view EZVIZ cameras</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app needs microphone access for audio streaming and intercom</string>
<key>NSLocalNetworkUsageDescription</key>
<string>This app needs local network access to connect to EZVIZ cameras</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>This app needs access to save screenshots and recordings</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This app needs access to the photo library</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>This app needs location access for Wi-Fi configuration</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app needs location access for Wi-Fi configuration</string>- Set minimum iOS version to 12.0 in
ios/Runner.xcodeproj/project.pbxproj:
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
- In Xcode, add capabilities:
- Access WiFi Information
- Hotspot Configuration
All example code has been organized into comprehensive documentation. See the docs folder for detailed examples:
| Feature | Example | Description |
|---|---|---|
| Simple Integration | Simple Player Examples | EzvizSimplePlayer - 3 lines to get started |
| Complete SDK | Comprehensive SDK Integration | Full device management with authentication |
| Multi-Region | Global SDK Support | Multi-region deployment and area selection |
| Advanced Playback | Advanced Playback Controls | Enhanced video playback with all features |
| Camera Control | PTZ Control Examples | Pan-Tilt-Zoom camera control |
| Audio/Intercom | Audio & Intercom Examples | Two-way audio communication |
| WiFi Setup | WiFi Configuration | Device network configuration |
| Recording | Recording & Screenshots | Video recording and image capture |
| Professional UI | Enhanced Video Playback | Professional video player interface |
| Live Streaming | Live Streaming Examples | Real-time streaming with controls |
- Documentation Index - Complete overview of all examples and guides
- Implementation Levels - From 3-line simple integration to professional implementations
- Best Practices - Error handling, performance optimization, and resource management
- Troubleshooting - Common issues and solutions for each feature
Perfect for getting started quickly:
EzvizSimplePlayer(
deviceSerial: 'YOUR_DEVICE_SERIAL',
channelNo: 1,
config: EzvizPlayerConfig(
appKey: 'YOUR_APP_KEY',
appSecret: 'YOUR_APP_SECRET',
accessToken: 'YOUR_ACCESS_TOKEN',
),
)🎯 View Complete Simple Player Examples →
Full-featured implementation with state management:
EzvizSimplePlayer(
deviceSerial: 'YOUR_DEVICE_SERIAL',
channelNo: 1,
config: EzvizPlayerConfig(/* full config */),
onStateChanged: (state) => handleStateChange(state),
onError: (error) => handleError(error),
onPasswordRequired: () => showPasswordDialog(),
)🎯 View Comprehensive SDK Integration →
Professional implementations with custom UI and advanced features:
🎯 View All Advanced Examples →
- New to EZVIZ? Start with Simple Player Examples
- Need full device management? See Comprehensive SDK Integration
- Building professional app? Browse Advanced Examples for your specific needs
- EzvizSimplePlayer: Auto-handles SDK initialization, authentication, and streaming
- Native SDK Integration: Complete device lifecycle management
- Multi-Region Support: Global deployment with area selection
- Advanced Controls: PTZ, audio, recording, WiFi configuration
- Professional UI: Enhanced player controls and fullscreen support
The EZVIZ API endpoints vary by region. Configure the region using the convenient enum-based approach:
import 'package:ezviz_flutter/ezviz_flutter.dart';
void main() {
// Set region globally at app startup
EzvizConstants.setRegion(EzvizRegion.europe);
// Or use a custom URL for private deployments
EzvizConstants.setBaseUrl('https://custom.ezvizlife.com');
runApp(MyApp());
}// Using region enum (recommended)
final client = EzvizClient(
appKey: 'YOUR_APP_KEY',
appSecret: 'YOUR_APP_SECRET',
region: EzvizRegion.usa,
);
// Or using custom URL
final client = EzvizClient(
appKey: 'YOUR_APP_KEY',
appSecret: 'YOUR_APP_SECRET',
baseUrl: 'https://custom.ezvizlife.com',
);EzvizSimplePlayer(
deviceSerial: 'YOUR_DEVICE_SERIAL',
channelNo: 1,
config: EzvizPlayerConfig(
appKey: 'YOUR_APP_KEY',
appSecret: 'YOUR_APP_SECRET',
region: EzvizRegion.europe, // Simply specify the region
// or use baseUrl for custom endpoints
),
)| Region | Enum Value | Base URL | Coverage |
|---|---|---|---|
| India | EzvizRegion.india |
https://iindiaopen.ezvizlife.com |
India, South Asia |
| China | EzvizRegion.china |
https://open.ys7.com |
Mainland China |
| Europe | EzvizRegion.europe |
https://open.ezvizlife.com |
European regions |
| USA/North America | EzvizRegion.usa |
https://apius.ezvizlife.com |
United States, Canada |
| Singapore | EzvizRegion.singapore |
https://apiisgp.ezvizlife.com |
Singapore, Southeast Asia |
| Americas General | EzvizRegion.americas |
https://isgpopen.ezviz.com |
General Americas coverage |
| Russia | EzvizRegion.russia |
https://iruopen.ezvizlife.com |
Russia, CIS (legacy) |
| Custom | EzvizRegion.custom |
Use with baseUrl parameter |
Private deployments |
Note: If no region is configured, the library defaults to the Global region endpoint.
Comprehensive authentication and global SDK management:
EzvizAuthManager.getAccessToken()- Get current access tokenEzvizAuthManager.openLoginPage()- Open native login pageEzvizAuthManager.logout()- Logout and clear tokensEzvizAuthManager.getAreaList()- Get available global regions/areasEzvizAuthManager.initGlobalSDK()- Initialize global SDK with area
Complete device lifecycle management:
EzvizDeviceManager.getDeviceList()- Get paginated device listEzvizDeviceManager.addDevice()- Add device by serial numberEzvizDeviceManager.deleteDevice()- Remove device from accountEzvizDeviceManager.probeDeviceInfo()- Check if device exists and statusEzvizDeviceManager.searchCloudRecordFiles()- Search cloud recordingsEzvizDeviceManager.searchDeviceRecordFiles()- Search device recordingsEzvizDeviceManager.getDeviceInfo()- Get detailed device information
Enhanced playback control with extensions:
controller.pausePlayback()- Pause recorded video playbackcontroller.resumePlayback()- Resume paused playbackcontroller.seekPlayback()- Seek to specific timecontroller.getOSDTime()- Get current playback timecontroller.setPlaySpeed()- Set playback speed (0.25x to 4x)controller.startLocalRecord()- Start local recordingcontroller.stopLocalRecord()- Stop local recordingcontroller.captureImage()- Capture current framecontroller.scalePlayWindow()- Scale playback window
Playback utilities and helpers:
EzvizPlaybackUtils.formatPlaybackTime()- Format time displayEzvizPlaybackUtils.calculateProgress()- Calculate progress percentageEzvizPlaybackUtils.progressToTime()- Convert progress to timeEzvizPlaybackUtils.getPlaybackSpeeds()- Get available speed options
Audio and intercom functionality:
EzvizAudio.openSound()- Enable audioEzvizAudio.closeSound()- Disable audioEzvizAudio.startVoiceTalk()- Start intercom (half/full-duplex)EzvizAudio.stopVoiceTalk()- Stop intercom
Recording and screenshot features:
EzvizRecording.startRecording()- Start video recordingEzvizRecording.stopRecording()- Stop video recordingEzvizRecording.capturePicture()- Take screenshotEzvizRecording.isRecording()- Check recording status
Wi-Fi configuration management:
EzvizWifiConfig.startWifiConfig()- Wi-Fi configurationEzvizWifiConfig.startAPConfig()- AP mode configurationEzvizWifiConfig.stopConfig()- Stop configurationEzvizWifiConfig.setConfigEventHandler()- Handle configuration events
EzvizDeviceInfo- Complete device informationEzvizProbeDeviceInfo- Device probe resultEzvizCameraInfo- Camera channel information
EzvizAccessToken- Access token with expirationEzvizAreaInfo- Global region/area information
EzvizCloudRecordFile- Cloud recording file informationEzvizDeviceRecordFile- Device recording file informationPlaybackSpeed- Playback speed optionRecordingType- Recording type enumeration (All, Timing, Alarm, Manual)
The easiest way to integrate EZVIZ cameras with automatic handling of all functionality:
EzvizSimplePlayer(
deviceSerial: 'DEVICE_SERIAL',
channelNo: 1,
config: EzvizPlayerConfig(
appKey: 'APP_KEY',
appSecret: 'APP_SECRET',
accessToken: 'ACCESS_TOKEN',
autoPlay: true,
enableAudio: true,
enableEncryptionDialog: true,
),
onStateChanged: (state) => print('State: $state'),
onError: (error) => print('Error: $error'),
)Circular touch control panel for intuitive PTZ control:
PTZControlPanel(
size: 250,
onDirectionStart: (direction) => print('Start $direction'),
onDirectionStop: (direction) => print('Stop $direction'),
onCenterTap: () => print('Center tapped'),
)Professional video player controls:
EnhancedPlayerControls(
isPlaying: true,
isRecording: false,
soundEnabled: true,
onPlayPause: () => print('Play/Pause'),
onRecord: () => print('Record'),
onScreenshot: () => print('Screenshot'),
)| Feature | HTTP API | Native SDK |
|---|---|---|
| Device Management | ✅ | ✅ |
| Live Streaming | 🔗 URLs only | ✅ Native player |
| PTZ Control | ✅ | ✅ Enhanced |
| Video Playback | 🔗 URLs only | ✅ Native player |
| Audio/Intercom | ❌ | ✅ |
| Recording | ❌ | ✅ |
| Screenshots | ❌ | ✅ |
| Wi-Fi Config | ❌ | ✅ |
| Real-time Events | ❌ | ✅ |
The new features are fully backward compatible. To use enhanced features:
- Update your
pubspec.yamlto version^1.0.4 - Import new components:
import 'package:ezviz_flutter/ezviz_flutter.dart'; - Use new widgets and APIs as needed
For common issues, troubleshooting steps, and frequently asked questions, see our comprehensive FAQ & Troubleshooting Guide.
- Authentication Issues → FAQ: Authentication Problems
- Device Management → FAQ: Device Management Issues
- Video Playback → FAQ: Playback Issues
- Audio Problems → FAQ: Audio Issues
- Region Configuration → FAQ: Region Configuration
- Performance Issues → FAQ: Performance Issues
10001,10002→ Authentication/Token issues20008→ Device offline20020-20023→ Device add/verification issues30001,30003→ Network/Server issues
👉 View Complete FAQ & Troubleshooting Guide
This library integrates and builds upon code from several sources:
- flutter_ezviz: Native Android and iOS SDK implementation for EZVIZ cameras
- Original native SDK wrapper and player components
- Device management and PTZ control functionality
- Core platform channel communication
- ezviz_flutter_cam by thanhdang198
- Audio and intercom functionality
- Recording and screenshot capabilities
- Wi-Fi configuration features
- Enhanced UI components and controls
- Advanced playback controls (pause/resume)
We extend our gratitude to the original authors and contributors of these repositories for their excellent work in EZVIZ SDK integration. This library combines the best features from both implementations to provide a comprehensive Flutter plugin for EZVIZ camera integration.
- 🔗 ezviz_flutter_cam - Enhanced camera features and UI components
- 📁 flutter_ezviz - Core native SDK implementation (local source)
EzvizManager- Main SDK manager (singleton)EzvizAuthManager- Authentication and global SDK management ⭐EzvizDeviceManager- Complete device lifecycle management ⭐EzvizPlayer- Low-level video player widgetEzvizSimplePlayer- High-level easy-to-use player widget ⭐EzvizPlayerController- Enhanced player control interface with extensions ⭐EzvizPlaybackUtils- Playback utilities and helpers ⭐EzvizAudio- Audio and intercom managementEzvizRecording- Recording and screenshot featuresEzvizWifiConfig- Wi-Fi configuration management
EzvizSimplePlayer- Complete player solution with auto-handling ⭐PTZControlPanel- Circular PTZ control interfaceEnhancedPlayerControls- Advanced video player controls
EzvizDeviceInfo- Complete device information with status, capabilities, and camera detailsEzvizAccessToken- Authentication token with expiration trackingEzvizAreaInfo- Global region/area information for multi-region supportEzvizProbeDeviceInfo- Device probe result with availability statusEzvizCameraInfo- Individual camera channel information
EzvizCloudRecordFile- Cloud recording file with metadataEzvizDeviceRecordFile- Device storage recording filePlaybackSpeed- Playback speed option (0.25x to 4x)RecordingType- Enumeration: All, Timing, Alarm, Manual
EzvizWifiConfigResult- Wi-Fi configuration result with statusEzvizWifiConfigMode- Configuration mode: wifi, wave, AP
Contributions are welcome! Please read our Contributing Guide for details.
This project is licensed under the MIT License - see the LICENSE file for details.
- 📧 Email: support@example.com
- 🐛 Issues: GitHub Issues
- 📖 Documentation: API Docs
See CHANGELOG.md for a detailed list of changes.