better_player_enhanced 1.0.1
better_player_enhanced: ^1.0.1 copied to clipboard
Advanced video player based on video_player and Chewie. Supports HLS, DASH, DRM, cache, subtitles, PiP, and much more. AndroidX Media3 powered.
Better Player Enhanced ๐ฌ #
๐ฏ The Most Advanced Flutter Video Player #
Better Player Enhanced is a production-ready, feature-rich video player for Flutter applications. Built upon the foundation of the original Better Player by jhomlala, this enhanced version brings critical updates, modern architecture, and enterprise-grade features.
๐ก Why Choose Better Player Enhanced?
This is the actively maintained fork that keeps your app compatible with the latest Flutter versions and Android ecosystem changes, while preserving all the powerful features you love.
โจ What's New in Enhanced Version #
๐ฅ Latest Updates #
- โ AndroidX Media3 Migration - Upgraded from deprecated ExoPlayer2 to Google's latest Media3 (1.5.0)
- โ
Flutter 3.27+ Compatible - Fixed deprecated
hashValuesโObject.hash - โ Modern Android Build - AGP 8.6.0, Kotlin 2.1.0, Gradle 8.9.0
- โ Improved Stability - Fixed Jetifier warnings and build compatibility issues
- โ Active Maintenance - Regular updates to keep pace with Flutter ecosystem
๐ Credits & Acknowledgments #
Original Creator: jhomlala
This package builds upon the excellent foundation created by jhomlala. All credit for the original architecture, design, and feature set goes to the original author. We're committed to maintaining and enhancing this package while honoring the original vision.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
๐ Why Better Player Enhanced? #
The Problem with Other Video Players #
Most Flutter video players are either:
- ๐ฆ Too Basic - Missing essential features for production apps
- ๐ Unmaintained - Breaking with new Flutter releases
- ๐ง Hard to Customize - Limited configuration options
- ๐ฑ Platform-Specific Issues - Poor Android/iOS parity
The Better Player Enhanced Solution #
Built on the proven Chewie foundation and enhanced far beyond, this plugin solves real-world video playback challenges with enterprise-grade features.
๐ฏ Feature Highlights #
๐ฌ Core Playback Features #
| Feature | Description |
|---|---|
| ๐ฅ Multiple Format Support | HLS, DASH, MP4, and more |
| ๐ Quick Start
Installation #
Add to your pubspec.yaml:
dependencies:
better_player_enhanced: ^1.0.0
Basic Usage #
import 'package:better_player_enhanced/better_player.dart';
// Simple video player
BetterPlayerController controller = BetterPlayerController(
BetterPlayerConfiguration(),
);
@override
Widget build(BuildContext context) {
return BetterPlayer(
controller: controller,
betterPlayerDataSource: BetterPlayerDataSource(
BetterPlayerDataSourceType.network,
"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
),
);
}
Advanced Example with All Features #
BetterPlayerController controller = BetterPlayerController(
BetterPlayerConfiguration(
autoPlay: true,
looping: false,
fullScreenByDefault: false,
aspectRatio: 16 / 9,
// Subtitle configuration
subtitlesConfiguration: BetterPlayerSubtitlesConfiguration(
fontSize: 20,
fontColor: Colors.white,
),
// Control bar configuration
controlsConfiguration: BetterPlayerControlsConfiguration(
enablePlayPause: true,
enableMute: true,
enableFullscreen: true,
enableProgressBar: true,
enableSubtitles: true,
),
),
);
BetterPlayerDataSource dataSource = BetterPlayerDataSource(
BetterPlayerDataSourceType.network,
"https://your-video-url.com/video.m3u8",
// HTTP Headers
headers: {"Custom-Header": "value"},
// Subtitles
subtitles: [
BetterPlayerSubtitlesSource(
type: BetterPlayerSubtitlesSourceType.network,
name: "English",
urls: ["https://example.com/subtitles_en.srt"],
),
BetterPlayerSubtitlesSource(
type: BetterPlayerSubtitlesSourceType.network,
name: "Spanish",
urls: ["https://example.com/subtitles_es.srt"],
),
],
// Caching
useAsmsCache: true,
cacheConfiguration: BetterPlayerCacheConfiguration(
maxCacheSize: 100 * 1024 * 1024, // 100MB
maxCacheFileSize: 50 * 1024 * 1024, // 50MB
),
// DRM
drmConfiguration: BetterPlayerDrmConfiguration(
drmType: BetterPlayerDrmType.widevine,
licenseUrl: "https://your-license-server.com",
),
// Notifications
notificationConfiguration: BetterPlayerNotificationConfiguration(
showNotification: true,
title: "My Video Title",
author: "Author Name",
),
);
controller.setupDataSource(dataSource);
๐ Documentation & Resources #
๐ Learn More #
- Official Documentation - Comprehensive guides and tutorials
- API Reference - Complete API documentation
- Example Application - 15+ working examples
๐ Detailed Guides #
- Getting Started
- Basic Player Usage
- List Player
- Playlist Player
- Configuration Guide
- Subtitles Setup
- DRM Implementation
- Caching Strategy
- PiP Setup
๐ค Contributing #
We welcome contributions! Whether it's:
- ๐ Bug fixes
- โจ New features
- ๐ Documentation improvements
- ๐งช Test coverage
Please feel free to submit pull requests. For major changes, please open an issue first to discuss what you would like to change.
Development Setup #
# Clone the repository
git clone https://github.com/yourusername/better_player_enhanced.git
# Install dependencies
flutter pub get
# Run example app
cd example
flutter run
๐ License #
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
๐ Support #
- ๐ง Issues: GitHub Issues
- ๐ฌ Discussions: GitHub Discussions
- โญ Star: If this project helped you, please give it a star!
๐ Migration from Original Better Player #
Switching from better_player to better_player_enhanced is seamless:
# Before
dependencies:
better_player: ^0.0.83
# After
dependencies:
better_player_enhanced: ^1.0.0
No code changes required! All APIs remain compatible.
โ ๏ธ Important Notes #
- Active Development: This package is actively maintained and updated
- Breaking Changes: Minor versions may include breaking changes - always check the changelog
- Platform Support: Android 21+, iOS 11+
- Flutter Version: Requires Flutter 3.0.0 or higher
๐ Show Your Support #
If Better Player Enhanced makes your video playback easier, please:
- โญ Star this repository
- ๐ฆ Share with the Flutter community
- ๐ Consider sponsoring the project
- ๐ Link back to this repo in your app
Made with โค๏ธ by the Flutter community
Building upon the excellent work of jhomlala
๐ต Audio & Video Tracks #
| Feature | Description |
|---|---|
| ๐ Multi-Audio Support | Select from multiple audio tracks |
| ๐ฌ Quality Selection | Switch between different video quality levels |
| ๐ HLS Track Selection | Full control over HLS variant streams |
| ๐๏ธ DASH Adaptation | Dynamic adaptive streaming over HTTP |
๐ Security & DRM #
| Feature | Description |
|---|---|
| ๐ Widevine DRM | Android DRM support |
| ๐ FairPlay DRM | iOS DRM support via EZDRM |
| ๐ซ Token Authentication | Custom token-based DRM |
| ๐ ClearKey Support | Open standard DRM solution |
| ๐ HTTP Headers | Custom headers for authenticated requests |
๐พ Advanced Caching #
| Feature | Description |
|---|---|
| ๐ฆ Smart Caching | Intelligent video caching system |
| โ๏ธ Configurable Size | Set max cache size and file limits |
| ๐๏ธ Cache Management | Programmatic cache control |
| ๐ Offline Playback | Pre-cache for offline viewing |
๐ฑ Mobile Experience #
| Feature | Description |
|---|---|
| ๐บ Picture-in-Picture | Android & iOS PiP support |
| ๐ Media Notifications | System-level playback controls |
| ๐ ListView Support | Optimized for scrollable video lists |
| ๐ฏ Auto-Start/Stop | Visibility-based playback control |
| ๐ Orientation Handling | Seamless rotation support |
| ๐จ Custom UI | Build your own controls from scratch |
๐๏ธ Developer Features #
| Feature | Description |
|---|---|
| ๐ Event System | Rich event callbacks (play, pause, error, etc.) |
| ๐ Error Handling | Comprehensive error reporting |
| โ๏ธ Configuration API | Fine-grained control over all aspects |
| ๐ง Debug Options | Built-in debugging capabilities |
| ๐ Well Documented | Extensive documentation and examples |
๐ Comparison with Other Players #
| Feature | Better Player Enhanced | video_player | chewie | flick_video_player |
|---|---|---|---|---|
| HLS Support | โ | โ | โ | โ |
| DASH Support | โ | โ | โ | โ |
| DRM Support | โ | โ | โ | โ |
| Subtitles (Advanced) | โ | โ | โ ๏ธ | โ ๏ธ |
| Caching | โ | โ | โ | โ |
| Notifications | โ | โ | โ | โ |
| Picture-in-Picture | โ | โ | โ ๏ธ | โ |
| Playlist | โ | โ | โ | โ |
| ListView Support | โ | โ | โ ๏ธ | โ ๏ธ |
| Active Maintenance | โ | โ | โ | โ |
| AndroidX Media3 | โ | โ | โ | โ |
Documentation #
Important information #
This plugin development is in progress. You may encounter breaking changes each version. This plugin is developed part-time for free. If you need some feature which is supported by other players available in pub dev, then feel free to create PR. All valuable contributions are welcome!