banana_player 0.0.7
banana_player: ^0.0.7 copied to clipboard
A high-performance video player for Flutter using ExoPlayer (Media3) on Android and AVPlayer on iOS with HLS, custom seekbars, and quality selection.
0.0.7 #
- Modular Android Player Architecture: Decomposed
BananaPlayerinto dedicated, single-responsibility collaborators:MediaUriResolver: Handles network, local filesystem (file://), and Flutter asset (asset://) URI resolution.PlayerTrackManager: Encapsulates video quality track parsing, ABR overrides, and closed captions/subtitle selection.PlayerEventNotifier: Dispatches structured, throttled playback and position events to Flutter with diagnostic logging.BananaPlayerInstance: Contract interface enabling mock/fake injection and decoupling.
- Event Synchronization & Lifecycle Robustness:
- Buffered native events emitted during player creation until the Dart controller is registered, preventing dropped initial ready or error events.
- Applied custom playback speed configured prior to initialization immediately upon player creation.
- Cancelled coroutine scopes on
PlayerEventNotifierand player disposal to prevent post-disposal background emissions. - Guaranteed texture surface release if player creation fails during factory instantiation.
- Predictable Error Handling & Cross-Platform Alignment:
- Aligned iOS and Android validation, throwing typed platform exceptions (
player_not_found,invalid_argument,plugin_not_attached) across host API endpoints instead of silently returning default fallback values. - Added strict validation rejecting non-finite control inputs (NaN, infinity), blank media URLs, and out-of-range volume values across Dart, Kotlin, and Swift.
- Validated video quality IDs and guarded against invalid quality indices on both iOS and Android.
- Aligned iOS and Android validation, throwing typed platform exceptions (
- Thread Safety & Engine Teardown:
- Secured player session storage with
ConcurrentHashMapand serialized platform channel calls with engine teardown via lifecycle locks. - Ensured safe cleanup and error isolation across all active players upon Flutter engine detachment.
- Secured player session storage with
- Centralized Dependency Management:
- Added Gradle Version Catalog (
android/gradle/libs.versions.toml) pinning AndroidX Media3 (1.5.1), Coroutines (1.8.1), and Mockito (5.11.0). - Added COMPATIBILITY.md detailing SDK targets, JVM limits, and supported media formats.
- Added Gradle Version Catalog (
- Test Coverage:
- Added Android unit tests for plugin behavior, URI resolution, event delivery, and track management.
- Added Dart unit/widget tests and mocked-channel tests for controller state, event routing, multi-player isolation, and texture widgets.
- Added device integration smoke tests for native player creation, playback error delivery, invalid quality IDs, and disposal.
0.0.6 #
- Upgraded Pigeon bridge code generator to
^30.0.4and regenerated Dart, Kotlin, and Swift communication bindings. - Upgraded Android build toolchain to Android Gradle Plugin
9.3.1, Gradle9.9.1, and Kotlin2.4.21. - Updated dependencies to latest stable versions (
meta: ^1.19.0,cupertino_icons: ^2.0.0). - Verified native Android compilation and test passes.
0.0.5 #
- Decoupled
BananaSeekBarand player views frompackage:flutter/material.dartin favor of corepackage:flutter/widgets.dartfor Flutter 3.50+ compliance (50/50 pub.dev static analysis score). - Hardened
BananaPlayerControllerlifecycle against async initialization race conditions using generation counters and immediate orphaned texture cleanup. - Prevented stream exceptions, listener notifications, and memory leaks on post-disposal native events.
- Added boundary clamping and state synchronization to
seekTo(resettingendedstate when seeking backwards). - Added proper recovery to
idlestate upon native playback errors across Android Media3 and iOS AVPlayer. - Fixed iOS
AVPlayerItemVideoOutputcleanup leak inremoveItemObservers()and added syntheticautotrack option for parity with Android. - Made Android and iOS native player
dispose()calls strictly idempotent. - Aligned Dart and Flutter SDK environment constraints (
sdk: ^3.13.7withflutter: '>=3.47.0'). - Hardened README documentation examples with subtitle track safety guards and clarified consumer design system requirements.
- Added 5 focused regression tests covering boundary seeks, idempotent disposal, post-disposal initialization guards, and stale event rejection.
0.0.4 #
- Added Closed Captions & Subtitles support across Android (Media3 ExoPlayer) and iOS (AVPlayer):
- Query embedded subtitle tracks (
getSubtitleTracks()). - Dynamic track switching and disabling (
setSubtitleTrack(...),disableSubtitles()). - Real-time subtitle cue notifications via
onSubtitleTextChangedandonSubtitleTracksChangedstreams. - Built-in, fully customizable subtitle overlay in
BananaPlayerViewwith typography, decoration, padding, and custom builder support.
- Query embedded subtitle tracks (
- Expanded test coverage with comprehensive unit and widget tests for
BananaPlayerController,BananaPlayerView, andBananaSeekBar. - Documented library, constructors, and event stream getters (zero
dartdocwarnings). - Added GitHub Actions continuous integration (CI) workflow for automated linting, testing, and formatting verification.
- Excluded test coverage and local documentation artifacts in
.pubignore.
0.0.3 #
- Added local storage media playback support (
file://URIs and raw filesystem paths). - Added bundled Flutter asset playback support (
initializeAsset(...),setSourceAsset(...)). - Added
initializeFile(...)andsetSourceFile(...)convenience methods toBananaPlayerController. - Automatic normalization of file paths and asset paths across Android and iOS engines.
- Expanded documentation with local file and asset quickstart examples.
0.0.2 #
- Verified repository, issue tracker, and metadata configuration.
- Added documentation and project links for pub.dev.
0.0.1 #
- Initial release of Banana Player.
- Android native playback engine powered by AndroidX Media3 / ExoPlayer.
- iOS native playback engine powered by AVPlayer.
- Native texture rendering via Flutter
Texturewidget. - Multi-bitrate HLS and adaptive stream support with automatic and manual video track / quality selection.
- Playback speed control (0.25x – 2.0x).
- Highly customizable
BananaSeekBarsupporting custom thumb, track, leading, trailing, and scrub tooltip widgets. - Typed native interop powered by Pigeon.