multimedia_player 0.1.0
multimedia_player: ^0.1.0 copied to clipboard
A production-grade, cross-platform Flutter video player package supporting network URLs, local files, assets, RTSP, HLS, DASH with customizable controls and memory-efficient playback.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.1.0 - 2025-11-20 #
Added #
-
Initial release of multimedia_player package
-
Video Source Support:
- Network URLs (HTTP/HTTPS) with custom headers
- Local files from device storage
- Asset videos bundled with app
- RTSP streams
- HLS (.m3u8) adaptive streaming
- DASH adaptive streaming
-
Core Features:
MultimediaVideoController- Main controller with lifecycle managementMultimediaVideoPlayer- Primary widget for video playbackDefaultVideoControls- Built-in beautiful control UIVideoSource- Type-safe video source definitionsVideoPlayerConfig- Comprehensive configuration optionsPlaybackState- Rich playback state information
-
Controls & UI:
- Play/pause controls
- Seek bar with drag support
- Volume control with slider
- Playback speed adjustment (0.5x-2.0x)
- Fullscreen mode toggle
- Auto-hiding controls with configurable timeout
- Loading and buffering indicators
- Error state with retry button
- Customizable control UI via
controlsBuilder
-
Memory Management:
- Automatic resource disposal
- Visibility-based auto-pause for lists
- Memory-efficient player reuse
- Concurrent player limit warnings
VisibilityManagerfor smart lifecycle handling
-
Event System:
onPlaycallbackonPausecallbackonBufferingcallbackonCompletedcallbackonErrorcallback with error messagesonPositionChangedcallback for tracking progressonBufferChangedcallback
-
Advanced Features:
- Double-tap to seek forward/backward
- Remember playback position
- Custom aspect ratio override
- Custom fit modes (contain, cover, fill, etc.)
- Configurable seek duration
- Looping support
- Mute/unmute functionality
- State stream for reactive updates
-
Utilities:
FormatHelper- Duration and playback speed formattingMemoryHelper- Memory tracking and debounce/throttle utilitiesVisibilityAwareVideoPlayer- Automatic visibility detection
-
Configuration Presets:
VideoPlayerConfig.forList()- Optimized for ListView/GridViewVideoPlayerConfig.minimal()- Minimal UI configuration
-
Example App:
- Basic network video example
- Custom controls example
- Video list with auto-pause
- HLS streaming example
- Advanced features demonstration
Platform Support #
- Android (ExoPlayer)
- iOS (AVPlayer)
- Web (HTML5 Video)
- macOS (AVPlayer)
- Windows (Media Foundation)
- Linux (GStreamer)
Documentation #
- Comprehensive README with usage examples
- API documentation with inline comments
- Performance best practices
- Troubleshooting guide
- Known limitations documented
Notes #
- Built on top of the official
video_playerpackage - Full null safety support
- Supports Flutter 3.10.0 and above
- Dart SDK 3.10.0 and above