StreamGate is an open-source cross-platform Flutter application designed as a technical showcase for capturing and uploading video content directly to the cloud. Built purely for developers, it demonstrates how to handle complex mobile media workflows — such as camera capture, resumable direct-to-cloud uploads, and HLS playback using FastPix infrastructure.
Once an upload completes, StreamGate generates an instant, shareable playback link.
StreamGate is built using a modern Flutter tech stack (Dart, Flutter, camera, video_player, chewie) and focuses on the following core capabilities:
- Camera Capture: Integrates the
cameraFlutter plugin (CameraController) for native video recording directly within the app on both Android and iOS. - Direct Cloud Uploading: Utilizes the
fastpix_resumable_uploaderpackage to push large media files securely to the cloud in resumable chunks — without routing them through an intermediary backend server. - Upload Progress Tracking: Streams real-time upload progress back to the UI via a
ChangeNotifier-basedUploadViewModelfollowing the MVVM pattern. - HLS Playback: Integrates
video_playerandchewieto stream the processed video directly from FastPix's CDN using the generated HLS playback URL (stream.fastpix.io/{playbackId}.m3u8). - Share Playback Link: Uses
share_plusto instantly share the FastPix playback link once upload and processing completes.
- Language: Dart
- UI Framework: Flutter (Material 3)
- Camera:
cameraplugin (CameraController,ResolutionPreset) - Networking:
dio(HTTP client for upload session creation and status polling) - Uploading:
fastpix_resumable_uploader— resumable chunked uploads via FastPix - Playback:
video_player+chewie(HLS stream viastream.fastpix.io) - Sharing:
share_plus - Architecture: MVVM (
ChangeNotifierViewModels, repository pattern, manual DI viaAppDI) - Build Constraints: Flutter 3.x+, Dart 3.x+, iOS 13.0+, Android minSdk per Flutter default
Before building the project, ensure you have:
- Flutter 3.x+ and Dart 3.x+ (run
flutter doctorto verify) - Xcode 15+ (for iOS builds)
- Android Studio / Android SDK (for Android builds)
- Physical device recommended for camera recording
- FastPix API credentials
git clone https://github.com/FastPix/flutter-StreamGate.git
cd flutter-StreamGate
flutter pub getStreamGate uses the fastpix_resumable_uploader package for resumable chunked uploads.
Add it to your pubspec.yaml:
dependencies:
fastpix_resumable_uploader: ^latestThen run:
flutter pub getFor full SDK setup instructions refer to the official guide: Set up Resumable Uploads for Flutter
Add your FastPix credentials in lib/core/constants/fastpix_constants.dart:
class FastPixConstants {
static const String tokenId = "YOUR_TOKEN_ID_HERE";
static const String secretKey = "YOUR_SECRET_KEY_HERE";
static const String uploadApi = "https://api.fastpix.io/v1/on-demand/upload";
}For production builds, store credentials securely using environment variables or a secrets manager. Never commit credentials to version control.
To get your FastPix API credentials visit: Activate Your Account
Add the following keys to ios/Runner/Info.plist:
<key>NSCameraUsageDescription</key>
<string>Used to record videos.</string>
<key>NSMicrophoneUsageDescription</key>
<string>Used to record audio.</string>Add the following permissions to android/app/src/main/AndroidManifest.xml:
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>iOS
cd ios && pod install && cd ..
flutter runAndroid
flutter runUsing an IDE
- Open the project root in Android Studio or VS Code
- Select your target device (physical device recommended for camera)
- Run via Run → Run 'main.dart'
Clean build if needed:
flutter clean
flutter pub get
flutter run- FastPix Platform: fastpix.io
- FastPix Access Token Guide: Activate Your Account
- FastPix VOD Upload API Docs: Direct Upload Video Media
- FastPix Resumable Uploader: fastpix_resumable_uploader — pub.dev
- Flutter Camera Plugin: camera — pub.dev
- Flutter Video Player: video_player — pub.dev
MIT License.