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!
Libraries
- omni_video_player
- omni_video_player/controllers/global_playback_controller
- omni_video_player/controllers/omni_playback_controller
- omni_video_player/models/custom_overlay_layer
- omni_video_player/models/custom_player_widgets
- omni_video_player/models/omni_video_quality
- omni_video_player/models/player_ui_visibility_options
- omni_video_player/models/video_player_callbacks
- omni_video_player/models/video_player_configuration
- omni_video_player/models/video_source_configuration
- omni_video_player/models/video_source_type
- omni_video_player/theme/omni_video_player_theme
- omni_video_player/widgets/omni_video_player



