houseoftech_video_player
A modern, reels-ready, customizable network video player for Flutter.
houseoftech_video_player is built for real-world performance. It provides
automatic lifecycle handling, route awareness, visibility-based playback
control, and optimized support for vertical reel-style feeds like
Instagram or TikTok.
https://github.com/user-attachments/assets/f1f8e44a-3425-4870-aa0e-35beab325ad8
β¨ Features
- π₯ Network video playback (mp4, m3u8, etc.)
- π Reels mode (auto play/pause based on visibility)
- π Route-aware auto pause
- π± App lifecycle handling (background/foreground safety)
- π External controller support
- β‘ Optimized for
PageViewreels - π§ Safe async initialization (prevents ghost audio issues)
- π§Ή Proper resource disposal to prevent memory leaks
- π¨ Custom top & bottom overlay support
- π₯ Download video with overlays rendered
- π¬ Animated overlay support with multiple animation types
- π Built-in Text-to-Speech (TTS) audio generation
- π΅ Custom external audio merging support
- π€ Built-in share functionality
- π§© Custom download & share callbacks
- π Download/share status callbacks with progress tracking
- π Customizable overlay animation positions
- πΌ Aspect ratio customization (9/16, 16/9, 1:1, etc.)
- π Auto-play & loop control options
- π¨ Customizable download & share button styles
- π Custom folder saving support
- π― Configurable overlay control positioning
- π§± Even-dimension scaling for FFmpeg compatibility
- π Faststart MP4 optimization for smooth playback
- π‘ Null-safe & production-ready architecture
π¦ Installation
Add the dependency to your pubspec.yaml:
dependencies:
houseoftech_video_player: ^1.2.1
Then run:
flutter pub get
π Some important permissions
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<!-- Internet (required for downloading video) -->
<uses-permission android:name="android.permission.INTERNET"/>
<!-- Android 13+ (API 33+) -->
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
<!-- Android 12 and below -->
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
π Overlay Jar Video Player
import 'package:flutter/material.dart';
import 'package:houseoftech_video_player/houseoftech_video_player.dart';
final controller = HouseOfTechController();
///
// this must be true
// for downloading and sharing the video with or without overlay
// downloadWithOverlay: true,
///
HouseOfTechVideoPlayerOverlay(
url: videoUrl,
aspectRatio: 9 / 16,
reelsMode: true,
/// Enable download with overlays
downloadWithOverlay: true,
/// π This will generate TTS and merge as audio
ttsText: "Hello Sagar",
/// Bottom overlay widget
bottomStripe: Container(
color: Colors.red,
width: double.infinity,
height: 70,
alignment: Alignment.center,
child: const Text(
"Hello Sagar",
style: TextStyle(
color: Colors.white,
fontSize: 18,
fontWeight: FontWeight.bold,
),
),
),
/// Optional top overlay
// topStripe: Container(
// color: Colors.green,
// height: 50,
// alignment: Alignment.center,
// child: const Text("Hello leaders"),
// ),
/// Optional animation overlay
// animatedOverlay: Image.asset("assets/anim.png"),
// animationType: OverlayAnimationType.centerToBottom,
/// Optional custom folder
// folderName: "SanatanVideos",
/// Optional callbacks
// onDownloadComplete: (success) {
// print("Download completed: $success");
// },
// onShareComplete: (success) {
// print("Share completed: $success");
// },
);
///types of Overlay Animations
enum OverlayAnimationType {
none, /// defauls to 'top left'
// Basic
topToCenter,
rightToCenter,
leftToCenter,
bottomToCenter,
leftToRight,
rightToLeft,
// Diagonal
diagonalTopLeftToBottomRight,
diagonalTopRightToBottomLeft,
diagonalBottomLeftToTopRight,
diagonalBottomRightToTopLeft,
}
π¬ Reels Mode
Reels mode automatically plays the video when it becomes visible and pauses it when it goes out of view.
HouseOfTechVideoPlayer(
controller: controller,
url: videoUrl,
reelsMode: true,
);
Recommended Usage with PageView
PageView.builder(
scrollDirection: Axis.vertical,
itemCount: videoList.length,
itemBuilder: (context, index) {
final controller = HouseOfTechController();
return HouseOfTechVideoPlayer(
controller: controller,
url: videoList[index],
reelsMode: true,
);
},
);
π Controller API
You can control playback manually using the controller:
controller.play();
controller.pause();
controller.seekTo(Duration(seconds: 10));
controller.dispose();
π Lifecycle & Route Handling
houseoftech_video_player automatically:
- Pauses when navigating to a new route
- Pauses when app goes to background
- Resumes safely when returning
- Prevents audio leaks during fast scroll
π§© Best Practices
- Dispose controllers properly when no longer needed.
- Use
reelsMode: trueinsidePageViewfor best performance. - Avoid initializing multiple heavy videos simultaneously on low-end devices.
π Example
A complete working example is available inside the example/ folder of
this package.
π Requirements
- Flutter 3.10+
- Dart >=3.0.0 <4.0.0
π License
MIT License
Copyright (c) 2026 House Of Tech
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish the Software.
Libraries
- helper/animation_widget
- helper/blur_image
- helper/houseoftech_video_player_controller
- helper/overlay_animation_type
- helper/utils
- helper/video_export_service
- houseoftech_video_player
- A modern, customizable network video player for Flutter.