better_player_enhanced 1.0.4 copy "better_player_enhanced: ^1.0.4" to clipboard
better_player_enhanced: ^1.0.4 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 🎬 #

pub package License Platform Flutter AndroidX Media3

ko-fi

🎯 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.

The project is updated regularly, and the community around it continues to grow, so you can expect more improvements and releases over time.

πŸ’‘ 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.4

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 #

πŸŽ“ Detailed Guides #


🀝 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 #


πŸ”„ 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
  • Regular Releases: The package is updated regularly as the community grows and new fixes land
  • 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

| 🌐 **Format Support** | SRT, WEBVTT with full HTML tags support | | πŸ“‘ **HLS Subtitles** | Native support for HLS embedded subtitles (including segmented) | | 🌍 **Multiple Tracks** | Switch between multiple subtitle languages | | 🎨 **Customizable Styling** | Full control over subtitle appearance | | βš™οΈ **Subtitle Configuration** | Position, size, color, background customization |

🎡 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!

32
likes
140
points
979
downloads

Documentation

Documentation
API reference

Publisher

verified publishersarthakparajuli.com.np

Weekly Downloads

Advanced video player based on video_player and Chewie. Supports HLS, DASH, DRM, cache, subtitles, PiP, and much more. AndroidX Media3 powered.

Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

collection, cupertino_icons, flutter, flutter_widget_from_html_core, meta, path_provider, visibility_detector, wakelock_plus, xml

More

Packages that depend on better_player_enhanced

Packages that implement better_player_enhanced