better_native_video_player 0.2.2
better_native_video_player: ^0.2.2 copied to clipboard
Native video player using AVPlayerViewController (iOS) and ExoPlayer (Android) with HLS, Picture-in-Picture, AirPlay, and fullscreen support.
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.2.2 - 2025-10-21 #
Added #
- WASM compatibility: Package now supports Web Assembly (WASM) runtime
- Implemented conditional imports using
dart:ioonly on native platforms - Added
PlatformUtilsclass for platform detection without directdart:iodependency - Exported
PlatformUtilsfor users who need platform-agnostic code
- Implemented conditional imports using
Changed #
- Replaced direct
Platformchecks withPlatformUtilsin fullscreen manager and controller - Code formatting improvements across all files
0.2.0 - 2025-10-21 #
Added #
-
AirPlay Support (iOS): Complete AirPlay integration for streaming to Apple TV and AirPlay-enabled devices
isAirPlayAvailable()method to check for available AirPlay devicesshowAirPlayPicker()method to display native AirPlay device pickeraddAirPlayAvailabilityListener()to monitor when AirPlay devices become available/unavailableaddAirPlayConnectionListener()to track AirPlay connection state changes- Automatic detection of AirPlay-enabled devices on the network
- Support for streaming video to multiple AirPlay receivers
-
Custom Overlay Controls: Build your own video player UI on top of the native player
- New
overlayBuilderparameter inNativeVideoPlayerwidget - Full access to controller state for custom UI implementations
- Allows building custom controls while maintaining native video decoding performance
- Example implementation in
example/lib/widgets/custom_video_overlay.dartwith:- Play/pause control
- Progress slider with buffered position indicator
- Speed controls (0.25x - 2.0x)
- Quality selector for HLS streams
- Fullscreen toggle
- Volume control
- AirPlay button (iOS)
- Auto-hide functionality
- New
-
Dart-side Fullscreen Management: New
FullscreenManagerclass for Flutter-based fullscreenFullscreenVideoPlayerwidget for fullscreen video playback in a Flutter overlayenterFullscreen()andexitFullscreen()methods- System UI management (hide/show status bar and navigation bar)
- Device orientation locking options
- Fullscreen dialog helper for easy integration
- Works alongside native fullscreen for maximum flexibility
-
Buffered Position Tracking: Real-time buffered position updates
- New
bufferedPositionproperty in controller - Included in
timeUpdatedcontrol events - Enables showing how much video has been preloaded
- Perfect for showing secondary progress indicator in custom overlays
- New
Improved #
- Enhanced controller state management with better activity and control state tracking
- Improved fullscreen state synchronization between native and Dart layers
- Better event listener management with separate activity and control listeners
- Enhanced example app with new
video_with_overlay_screen.dartdemonstrating custom controls - Improved documentation with comprehensive AirPlay and custom overlay usage examples
- Better error handling and state validation throughout the player lifecycle
Documentation #
- Updated README with comprehensive sections on AirPlay and custom overlays
- Added example code for all new features
0.1.4 - 2025-10-20 #
Fixed #
- Fixed Dart SDK constraint to use proper version range (>=3.9.0 <4.0.0) instead of exact version, allowing compatibility with all Dart 3.9.x and 3.x versions
0.1.3 - 2025-10-20 #
Fixed #
- Fixed fullscreen exit handling on iOS when user dismisses by swiping down or tapping Done button
- Fixed iOS playback state preservation when exiting fullscreen (video now resumes playing if it was playing before)
- Fixed Android fullscreen button icon synchronization when fullscreen is toggled from Flutter code
- Fixed fullscreen event parsing to properly distinguish between entering and exiting fullscreen states
- Fixed shared player state synchronization by sending current playback state when new views attach
Improved #
- Standardized event naming by renaming
videoLoadedtoloadedacross all platforms for consistency - Enhanced Android fullscreen button to detect and correct icon desynchronization
- Improved shared player initial state callback mechanism to properly communicate loaded state with duration
- Better fullscreen state event notifications on Android with proper
isFullscreendata - Enhanced iOS fullscreen delegate handling with playback state restoration
0.1.2 - 2025-01-16 #
Fixed #
- Fixed iOS player state tracking by observing
timeControlStatusinstead of relying only on item observers - Fixed shared player initialization to properly handle existing players vs new players
- Fixed Android PiP event channel setup to only initialize on Android platform (prevents iOS errors)
- Fixed playback state synchronization when connecting to shared players
- Fixed unnecessary buffering/loading events for shared players during reattachment
Improved #
- Enhanced iOS player observer to distinguish between play/pause and buffering states
- Improved shared player management with better state tracking and event handling
- Enhanced Android player controls by hiding unnecessary buttons (next, previous, settings)
- Better error handling and logging throughout the player lifecycle
0.1.1 - 2025-10-20 #
Fixed #
- Fixed Android package name to match plugin name (com.huddlecommunity.better_native_video_player)
- Fixed plugin registration in Android
0.1.0 - 2025-10-20 #
Changed #
- Updated Flutter SDK constraint to 3.9.2
- Updated flutter_lints to 6.0.0
0.0.1 - 2025-01-16 #
Added #
- Initial release of native_video_player plugin
- Native video playback using AVPlayerViewController (iOS) and ExoPlayer/Media3 (Android)
- HLS streaming support with adaptive quality selection
- Picture-in-Picture (PiP) mode on both platforms
- Native fullscreen playback
- Now Playing integration (Control Center on iOS, lock screen on Android)
- Background playback with media notifications
- Comprehensive playback controls:
- Play/pause
- Seek to position
- Volume control
- Playback speed adjustment (0.5x to 2.0x)
- Quality selection for HLS streams
- Event streaming for player state changes
- Support for custom media info (title, subtitle, album, artwork)
- Configurable PiP behavior
- Native player controls toggle
- Example app demonstrating all features
- Comprehensive documentation and API reference
Platform Support #
- iOS 12.0+
- Android API 24+ (Android 7.0+)
Dependencies #
- Flutter SDK ^3.9.2
- iOS: AVFoundation framework
- Android: androidx.media3 1.5.0 (ExoPlayer, HLS, Session)