better_player_enhanced 1.0.1 copy "better_player_enhanced: ^1.0.1" to clipboard
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 ๐ŸŽฌ #

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.

๐Ÿ’ก 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 #

๐ŸŽ“ 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
  • 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!

22
likes
150
points
1.3k
downloads

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

Documentation

Documentation
API reference

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