simple_audio_kit 1.2.0 copy "simple_audio_kit: ^1.2.0" to clipboard
simple_audio_kit: ^1.2.0 copied to clipboard

A concise audio playback library for Flutter with playlists, caching, background controls, audio focus, and typed errors.

1.2.0 #

Fixed #

  • Replacing a queue with an empty or wholly invalid playlist now stops stale playback before clearing public queue state.
  • Audio.init(cacheManager: ...) now configures both playback caching and the static preload/cache-management helpers.
  • Repeated Audio.init calls now apply updated session and cache settings.
  • Standalone controllers can no longer capture the process-wide audio_service handler by initializing before the global Audio facade.
  • Background-service and audio-session setup failures are now categorized as SimpleAudioErrorCode.initFailed.
  • Playback no longer dies permanently after the app detaches. The teardown on AppLifecycleState.detached disposed the player without awaiting the stop and left the controller marked as initialized, so every later call silently no-opped. Teardown now resets the controller so a later call rebuilds the engine.
  • Removed the leaked WidgetsBindingObserver — it was registered on init and never removed.
  • Removed a leaked player-state subscription in the error-recovery path that dispose() never cancelled.
  • Ducking no longer clobbers the caller's volume. An interruption used to restore volume to 1.0 regardless of the level set through Audio.setVolume. The pre-duck level is now captured and restored.
  • Dispose-time failures are no longer swallowed. The error stream was closed before the player was released, so any failure disappeared.

Added #

  • Bundled asset and Android content URI playback. asset: (both asset:///a.mp3 and the asset:a.mp3 shorthand) and content: URLs are now accepted alongside http, https, and file.
  • Audio.queue, Audio.currentItemNow, and Audio.currentItemStream for building playlist UIs that highlight the active track.
  • Audio.dispose() to release the engine explicitly.
  • SimpleAudioException and SimpleAudioErrorCode are now exported. Audio.errorStream is typed as Stream<SimpleAudioException>, but the type was unreachable without importing from src/.
  • Debug asserts on invalid seek, setSpeed, and setVolume arguments, which previously only surfaced on errorStream.

Removed #

  • Five empty placeholder libraries (simple_audio_core, audio_track, playback_event_handler, audio_format_utils, platform_audio) that were exported publicly while containing no code.

1.1.2 #

  • Analysis Optimization: Synchronized project with standard Dart formatter for 100/100 analysis score.
  • Dependency Update: Upgraded rxdart to 0.28.0 stable.

1.1.1 #

  • Stability Update: Fixed pub.dev "downgrade" analysis failures by adding explicit rxdart dependency constraints.
  • Metadata: Updated all dependencies to their latest verified stables based on pana analysis.

1.1.0 #

  • Pub.dev Optimization: Upgraded core dependencies and resolved static analysis lints.
  • API Migration: Updated core playback engine to just_audio 0.10.x stable API.
  • Platform Support: Enhanced platform-aware initialization to gracefully handle Desktop (Windows/Linux) headless playback when audio_service is unsupported.

1.0.0 #

  • Initial Production Release.
  • High-level Audio static facade for absolute simplicity.
  • Playlist Support: Queue management through just_audio playlists.
  • Background Integration: Bindings for iOS Control Center and Android notifications after the required host-app setup.
  • Advanced Controls: Support for seeking, custom playback speeds (0.5x - 2.0x), and internal volume control.
  • Error Handling: Descriptive SimpleAudioException events and queue failover when a track cannot be played.
  • Reactive Core: Exposed streams for playback state, position, duration, and errors.
  • App Lifecycle Aware: Graceful resource cleanup when the app is detached.
2
likes
160
points
95
downloads

Documentation

API reference

Publisher

verified publisherwebcode.codes

Weekly Downloads

A concise audio playback library for Flutter with playlists, caching, background controls, audio focus, and typed errors.

Repository (GitHub)
View/report issues

Topics

#audio #music #player #playback

License

MIT (license)

Dependencies

audio_service, audio_session, equatable, flutter, just_audio, rxdart

More

Packages that depend on simple_audio_kit