omni_video_player 3.5.3
omni_video_player: ^3.5.3 copied to clipboard
A Flutter widget for playing videos from YouTube, Vimeo, assets, and network sources — fully customizable and easy to integrate.
The ultimate All-in-One Flutter video solution. Stream YouTube, Vimeo, HLS, and local files with a single, unified controller.
🚀 Why Omni Video Player? #
Stop juggling multiple packages for different video sources. omni_video_player wraps the complexity of specialized extractors and webviews into a single, powerful widget.
- Smart YouTube Handling: Direct extraction via
youtube_explode_dartwith an automatic WebView fallback. The player seamlessly switches to WebView if the primary method fails, ensuring uninterrupted playback and no black screens for your users. - Vimeo Ready: Stable playback using optimized WebViews.
- Adaptive Streaming: Native support for HLS (.m3u8) with built-in quality selection UI.
- Unified Controller: One controller to rule them all. Manage state, volume, and seeking regardless of the source.
📊 Compatibility Matrix #
| Source / Format | Android | iOS | WebView (alt/fallback) | Web | Notes |
|---|---|---|---|---|---|
| YouTube | ✅ | ✅ | ✅ | ✅ | Auto-fallback to WebView on primary method fails. |
| Vimeo | - | - | ✅ | ❌ | High stability via WebView. |
| HLS (.m3u8) | ✅ | ✅ | - | ✅ | Multi-quality switching supported. |
| Network (.mp4/etc) | ✅ | ✅ | - | ✅ | Standard streaming. |
| Assets/Files | ✅ | ✅ | - | ✅ | Local storage & bundle support. |
| AVI | ✅ | ❌ | - | ✅ | Not supported on iOS (OS limitation). |
| WebM | ✅ | ❌ | ✅ | ✅ | Requires WebView on iOS (no native support). |
| Twitch | - | - | - | - | 🔜 Coming Soon. |
✨ Key Features #
- 📦 Universal Sources: YouTube (Live/VOD), Vimeo, Network, Assets, and Local Files.
- ⚙️ Quality Selector: Built-in UI to switch resolutions for YouTube and HLS streams.
- 🎨 Fully Skinnable: Customize the UI, overlays, and controls to match your brand.
- ⏩ Advanced UX: Double-tap to seek, playback speed control (0.5x to 2.0x), and swipe gestures.
- 🔊 Global Sync: Synchronize volume and mute states across multiple player instances.
- ⛶ Native Fullscreen: Smooth transition to fullscreen mode on mobile.
🧪 Preview #
| YouTube | YouTube Live |
![]() |
![]() |
| M3U8 Network Link | Vimeo |
![]() |
![]() |
🛠️ Quick Start #
1. Installation #
Add this to your pubspec.yaml:
dependencies:
omni_video_player: ^latest_version
2. Platform Setup (Optional) #
Configure these only if your use case requires it:
Android (AndroidManifest.xml)
- INTERNET: Required for any online stream (YouTube, Vimeo, Web).
- Cleartext: Required only for insecure
httplinks.
<manifest>
<uses-permission android:name="android.permission.INTERNET"/> <application android:usesCleartextTraffic="true"> ...
</application>
</manifest>
iOS (Info.plist)
- Arbitrary Loads: Required only for insecure
httplinks.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key><true/> </dict>
Note: If you use only
https(standard for YouTube/Vimeo) and local assets, you can skip the Cleartext/Arbitrary Loads settings.
📦 Code Examples #
Standard Implementation #
OmniVideoPlayer(
sourceConfiguration: VideoSourceConfiguration.youtube(
videoUrl: Uri.parse('https://www.youtube.com/watch?v=dQw4w9WgXcQ'),
preferredQualities: [OmniVideoQuality.high720],
),
)
🕹️ Full Live Demo #
Want to see the player in action with all its features? We have provided a comprehensive example project.
- Download/Clone this repository.
- Navigate to the
example/folder. - Run
lib/main.darton your device or emulator.
This demo showcases everything the library supports: quality switching, source transitions, custom controls, and more. It is the best way to understand the full potential of omni_video_player.
Reactive UI with Controller #
Control the player from anywhere in your widget tree:
OmniPlaybackController? _controller;
// Listen to state changes (play/pause, buffering, etc.)
void _onUpdate() => setState(() {});
OmniVideoPlayer(
callbacks: VideoPlayerCallbacks(
onControllerCreated: (controller) {
_controller = controller..addListener(_onUpdate);
},
),
);
@override
void dispose() {
_controller?.removeListener(_onUpdate);
super.dispose();
}
🔮 Roadmap #
| Feature | Description | Status |
|---|---|---|
| Picture-in-Picture | Play in floating overlay (OS level). | 🏗️ Researching |
| Playlist Support | Queue system for multiple videos. | 🔜 Planned |
| Download Mode | Cache management for offline viewing. | 🔜 Planned |
| Cast Support | Google Cast & AirPlay integration. | 🔜 Planned |
📄 License #
Released under the BSD 3-Clause License. See LICENSE for details.
Built with ❤️ by Leonard Matasel Found a bug? Open an issue or submit a PR!




