assets_audio_player_plus 3.2.1 copy "assets_audio_player_plus: ^3.2.1" to clipboard
assets_audio_player_plus: ^3.2.1 copied to clipboard

Play music/audio stored in assets files directly from Flutter & Network, Radio, LiveStream, Local files. Compatible with Android, iOS, and macOS.

3.2.1 #

  • Removed GitHub Actions workflows (ci.yml, publish.yml) and Dependabot config — they will be added back in a future release. Contributors run dart format, flutter analyze, and flutter test manually per CONTRIBUTING.md in the meantime.
  • Restored local dependency_overrides in the root pubspec.yaml for developer convenience (the published artifact still depends on assets_audio_player_plus_web from pub.dev).
  • Documentation cleanup (README "Review gates" section, CONTRIBUTING "Required checks" section).

3.2.0 — assets_audio_player_plus fork (2026-04-14) #

First release of the assets_audio_player_plus continuation fork. Published by Zakria Khan after the upstream assets_audio_player package was discontinued on pub.dev.

Packaging #

  • Renamed assets_audio_playerassets_audio_player_plus.
  • Renamed federated web implementation assets_audio_player_webassets_audio_player_plus_web, with implements: assets_audio_player_plus correctly wired so Flutter's plugin resolver picks it up.
  • Updated pubspec.yaml homepage: URLs and all Dart package:... imports.
  • example/pubspec.yaml: depends on assets_audio_player_plus: ^3.2.0 with a local path: override for development.
  • Native Android/iOS/macOS package paths (com.github.florent37.*) left untouched — they're internal and don't affect pub.dev publishing.

Web platform — restored and modernized #

  • Restored the web plugin (previously deleted upstream because it used the deprecated dart:html API).
  • Migrated dart:htmlpackage:web + dart:js_interop so the plugin compiles to both JavaScript (flutter run -d chrome) and WebAssembly (flutter build web --wasm).
  • WebPlayerHtml.stop() now fully detaches the old <audio> element (clears src, calls load(), nulls the reference). Fixes a bug where rapid open()/replaceAt() calls could leave the previous element still playing, producing overlapping audio on web.
  • findAssetPath() URL-encodes each path segment, so asset filenames with spaces or unicode no longer 404 in the browser.

Core plugin fixes #

  • onAudioAddedAt / onAudioRemovedAt in lib/src/assets_audio_player.dart now read the current isPlaying state and pass it as autoStart, instead of force-starting playback. Previously inserting an item at the current playlist index would always autoplay even if the player was paused.
  • AudioWidget _totalDuration: changed from late Duration to Duration _totalDuration = Duration.zero so the position callback firing before onReadyToPlay no longer throws LateInitializationError.
  • Audio.copyWith now accepts pitch — the field was declared on the private constructor but never surfaced on copyWith.
  • Added analyzer-clean baseline: flutter analyze returns 0 issues across the plugin, web sub-package, and example.

Example app — full rewrite #

  • Removed the flutter_neumorphic_plus dependency and the neumorphic look. Replaced with a clean Material 3 launcher + screens (seeded ColorScheme.fromSeed(Colors.deepPurple), light + dark).
  • Reorganized example/lib/ into main.dart + demos/ + widgets/ + utils/ (snake_case, one demo per file).
  • Dropped outdated flutter_audio_query and flutter_audio_recorder git dependencies (unmaintained, missing AGP 8 namespace).
  • Regenerated the Android scaffold via flutter create --org=com.zakriakhan with the declarative Gradle plugins block (modern AGP 8 requirement). Added POST_NOTIFICATIONS, WAKE_LOCK, FOREGROUND_SERVICE, FOREGROUND_SERVICE_MEDIA_PLAYBACK permissions, plus the custom assets.audio.player.notification.icon metadata and drawables.
  • Added a shared DemoScaffold (AppBar + info banner) so every demo is self-documenting.

Example demo improvements #

  • Playlist player: info banner, empty-state placeholders, error card when open() throws, transport controls rendered unconditionally with stream defaults (no longer invisible before first emission).
  • Streams API / PlayerBuilder helpers: clarified descriptions; tap-to-play now uses autoStart: true and auto-opens the playlist paused.
  • Insert / replace: completely redesigned. Live playlist card with highlight for the current track, loader overlay during buffering or pending mutations, explanation text under every action button, seek slider with mm:ss timestamps.
  • Swap playlist source live (update_playlist): step-by-step UI — "Current source" card with icon + label that flips from "Network stream" to "Local file / blob URL (swapped)", real-time event log, seek progress maintained across the swap.
  • Cache network audio: switched from unreliable cacheDownloadInfos stream to explicit Dio.onReceiveProgress download. Real percentage + MB counters on both web (blob URL) and Android (temp file). Plays from the cached copy on completion.
  • Local file: conditional imports — native path uses dart:io + path_provider, web uses a Dio download into a package:web blob URL.
  • Live stream: replaced the dead BBC HTTP URL with HTTPS SomaFM Groove Salad. Station card with cover, artist, live status indicator. Now-playing card polls somafm.com/songs/groovesalad.json every 20 s with manual refresh button. Graceful fallback on CORS errors.
  • Update live stream metas: visible "Current metadata" card reflects audio.updateMetas() via player.current; play/pause button added.
  • AudioWidget demo: rotating vinyl-style cover, progress bar, explicit "Preparing..." loading card while the browser buffers the asset.
  • Finish-event counters: renamed from "Counters test", now has a track card with progress bar, two color-coded counter cards, last-event log, and reset button.
  • Multiple players: in-code gradient letter tiles (deterministic per track name) replace unreliable network thumbnails that were breaking on some Android emulators with SSL/cert errors.

Asset housekeeping #

  • Renamed assets/audios/2 country.mp3country2.mp3 and pop test.mp3pop.mp3 to remove spaces that tripped the browser's <audio src="">.
  • Used electronic.mp3 and pop.mp3 (≈4 MB each) instead of country.mp3 (11 MB) in the AudioWidget and Insert / replace demos for faster load times.

GitHub / CI / docs #

  • .github/workflows/ci.ymldart format check, flutter analyze on plugin + web + example, flutter test, flutter build web --release and --wasm, flutter build apk --debug. Runs on every PR.
  • .github/dependabot.yml — weekly pub updates across all three packages, monthly Gradle + Actions.
  • .github/CODEOWNERS — reviews routed to @cyclone-pk.
  • .github/pull_request_template.md — checklist covering formatter, analyze, tests, platforms, Flutter version, screenshots.
  • CONTRIBUTING.md — full contributor guide (setup, testing expectations, web-specific DDC + WASM requirements, release process).
  • README.md — added project-status banner, platform test checklist, "Hire me on Fiverr" button, refreshed screenshot strip (s1/s2/s3/s4.png).
  • example/README.md — rewritten with accurate snippets using the real current API and a table mapping each demo to the APIs it exercises.

Platform test status at release #

  • ✅ Web (Chrome JS) — all 14 demos verified
  • ✅ Web (WASM) — flutter build web --wasm succeeds
  • ✅ Android — tested on emulator SDK 36
  • ⏳ iOS, macOS, Linux, Windows — pending

3.1.1 #

  • fix startup crash issue for some Android devices.

3.1.0 #

  • revert back changes

3.0.9 #

  • fix notification package naming and build issue

3.0.8 #

  • fix warnings

3.0.7 #

  • Update dependencies and fix notification issue

3.0.6 #

  • Update kotling version and fix minor issues

3.0.5 #

  • Breaking change, with Flutter 3.0 removed null aware for WidgetsBinding

3.0.4+5 #

  • Fixed null aware

3.0.4+4 #

  • Fix issues and update exoplayer

3.0.4+3 #

  • Fix warnings and abstract issue

3.0.4+2 #

  • Fix flutter 3.0 issues

3.0.4+1 #

  • Fix andorid 12 issues and update exoplayer and gradles

3.0.4 #

  • Fix web open player issue
  • update example app Android 12 compatable

3.0.3+9 #

  • Fix mimType issue mp3 files from urls without extension #630
  • Fix web Null issue

3.0.3+8 #

  • Fix android 12 / api 31 issue.
  • Fix macOs build issue
  • Fix web assets issue for Web

3.0.3+7 #

  • Fix android 12 / api 31 issue.
  • Fix macOs build issue
  • Fix web assets issue for Web

3.0.3+6 #

  • Added DRM supports
  • Fix playSpeed for WEB.

3.0.3+5 #

  • Added pitch controller

3.0.3+4 #

  • Updated dependencies
  • Fix duplicate class issue
  • Fix: assetsAudioPlayer.open playSpeed is not work

3.0.3+3 #

  • fix playlist auto next issue and error message issue

3.0.3+2 #

  • update build number

3.0.3+1 #

  • fixed no function for stopForeground

3.0.3 #

  • Fix notification issue

3.0.2 #

  • Fix version issue

3.0.1 #

  • Fix web player

3.0.0 #

  • Fix some issues
  • Migrate to null safety

2.0.15 #

  • update android 30 and fixed local assets issue
  • should fix android alarm manager issue

2.0.14 #

  • update packages

2.0.13+9 #

  • fix local properties issue

2.0.13+8 #

  • fix opening multiple audio player.

2.0.13+7 #

  • fix version conflicts

2.0.13+6 #

  • fix android crash issue

2.0.13+5 #

  • fix opened multiple instance for android problem.

2.0.13+2 #

  • fixed some issues on ios
  • fix crash issue on android

2.0.13+1 #

  • fixed some innues on macos/ios

2.0.12 #

  • Fixed AudioType.network networkHeaders
  • Improve documentation
  • CustomPrevIcon fixed

2.0.9+2 #

  • Renamed PhoneCallStrategy to AudioFocusStrategy
  • Allow on android to resume native players after focus lost

2.0.8+5 #

  • Added Android HeadPhoneStrategy
  • Fix local path file uri (android)
  • Added open multiple calls protection
  • Open uri content on androids

2.0.6+7 #

  • Cache now use http instead of dio
  • Added live tag on notification for LiveStream play (ios)
  • Added audio session id (android only)

2.0.5+7 #

  • Added custom error handling (beta)
  • Dispose is now a future
  • Fixed playlist insert / replace

2.0.5 #

  • Added Cache management (beta), with Audio.network(url, cached: true)

2.0.4+2 #

  • Added HLS, Dash, SmoothStream support on Android
  • Added laylist.replaceAt method

2.0.3+6 #

  • ExoPlayer network now set allowCrossProtocolRedirect=true by default
  • Fixed notification hide on livestream pause (android)
  • Added custom icons for android from drawable names
  • Fixed notification texts on Samsung devices

2.0.3+1 #

  • Added custom notification icons for Android (in AndroidManifest.xml)
  • Fixed seek and seekBy not working on the web
  • PlayList.startIndex is now mutable
  • Stop player then call play reopen it at playlist.startIndex
  • Increased buffer size on android/exoplayer
  • Added keepLoopMode on prev/next

2.0.2 #

  • Breaking change : loop boolean now enumerate 3 values : none, single and playlist

2.0.1+9 #

  • Added .showNotification = true/false to hide dynamically displayed notification
  • Added custom action on notif click(android)
  • Added isBuffering to RealtimePlayingInfos
  • Added AssetsAudioPlayerGroup (beta)
  • Added Headers in Audio.network & Audio.liveStream

2.0.1 #

  • Added .playerState (play/pause/stop)
  • Stop now ping finish listeners

2.0.0+6 #

  • Added MacOS support
  • Fixed gapeless loop (single audio)
  • Fixed audio file notification

1.7.0 #

  • Fixed bluetooth on android on some devices
  • Fallback to android native MediaPlayer if exoplayer can't read the file
  • Added audio.updateMetas to update notification content after creation
  • Android Seekbar notification is now optional
  • Android usable notification Seekbar
  • Added stop custom notification action

1.6.3 #

  • Custom notification icon (android)
  • Custom notification actions
  • Fixed notification close on android
  • Fixed android auto-focus
  • Added playInBackground mode
  • Added shuffle

1.6.1 #

  • Playlist is now mutable, we can add audios after creation
  • renamed ReadingPlaylist get playlist to ReadingPlaylist get readingPlaylist
  • added Playlist get playlist

1.6.0+4 #

  • Fixed playlist issue on android
  • Fixed issue on bluetooth android play/pause
  • Fixed PlayerBuilder currentPosition
  • Added extra map into audio

1.6.0 #

  • Added some checks on swift code
  • Fixed totalDuration or liveStream
  • Fixed ios notifications
  • Added bluetooth headset actions (play/pause/next/prev/stop)

1.5.0 #

  • Added Audio.liveStream(url)
  • Fixed notification image from assets on android
  • Fixed android notification actions on playlist
  • Added AudioWidget

1.4.7 #

  • added package on assets audios (& notif images)
  • all methods return Future
  • open can throw an exception if the url is not found

1.4.6+1 #

  • fixed android notifications actions
  • refactored package, added src/ and package keyword
  • added player_builders

1.4.5 #

  • fixed implementation of local file play on iOS

1.4.4 #

  • Added notifications on android

1.4+3+6 #

  • Beta fix for audio focus

1.4+3+5 #

  • Beta implementation of local file play on iOS

1.4.3+4 #

  • Moved to last flutter version >=1.12.13+hotfix.6
  • Implemented new android FlutterPlugin
  • Stop all players while getting a phone call
  • Added playspeed as optional parameter on on open()

1.4.2+1 #

  • Moved to android ExoPlayer
  • Added playSpeed (beta)
  • Added forwardRewind (beta)
  • Added seekBy

1.4.0+1 #

  • Bump gradle versions : wrapper=(5.4.1-all) build:gradle=(3.5.3)

1.4.0 #

  • Added respectSilentMode as open optional argument
  • Added showNotification on iOS to map with MPNowPlayingInfoCenter (default: false)
  • Added metas on audios (title, artist, ...) for notifications
  • Use new plugin build format for iOS

1.3.9 #

  • Empty constructor now create a new player
  • Added factory AssetsAudioPlayer.withId()
  • Added playAndForget witch create, open, play & dispose the player on finish
  • Added AssetsAudioPlayer.allPlayers() witch returns a map of all players
  • Reworked the android player

1.3.8+1 #

  • Added seek as optional parameter on open method

1.3.8 #

  • Fully rebased the web support on html.AudioElement (instead of howler)
  • Fully rebases the ios support on AvPlayer (instead of AvAudioPlayer)
  • Added support for network audios with .open(Audio.network(url)) on Android/ios/web

1.3.7+1 #

  • Added RealtimePlayingInfos stream

1.3.6+1 #

  • Added volume as optional parameter on open()

1.3.6 #

  • Extracted web support to assets_audio_player_web: 1.3.6

1.3.5+1 #

  • Volume does not reset anymore on looping audios

1.3.4 #

  • Fixed player on Android

1.3.3 #

  • Fixed build on Android & iOS

1.3.2 #

1.3.1+2 #

  • Upgraded RxDart dependency
  • fixed lint issues
  • lowerCamelCase AssetsAudioPlayer volumes consts

1.3.1 #

  • Fixed build on iOS

1.3.0 #

  • Added web support, works only on debug mode

1.2.8 #

  • Added constructors
  • AssetsAudioPlayer.newPlayer
  • AssetsAudioPlayer(id: "PLAYER_ID")

to create new players and play multiples songs in parallel

the default constructor AssetsAudioPlayer() still works as usual

1.2.7 #

  • Added "volume" property (listen/set)

1.2.6 #

  • Added an "autoPlay" optional attribute to open methods

1.2.5 #

  • Compatible with Swift 5

1.2.4 #

  • Added playlist

1.2.3 #

  • Added playlist (beta)

1.2.1 #

  • Added looping setter/getter

1.2.0 #

  • Upgraded RxDart to 0.23.1
  • Fixed assets playing on iOS
  • Fixed playing location on Android

0.0.1 #

  • initial release.
3
likes
140
points
141
downloads

Documentation

API reference

Publisher

verified publisherzakriakhan.com

Weekly Downloads

Play music/audio stored in assets files directly from Flutter & Network, Radio, LiveStream, Local files. Compatible with Android, iOS, and macOS.

Repository (GitHub)
View/report issues
Contributing

License

Apache-2.0 (license)

Dependencies

assets_audio_player_plus_web, flutter, http, path_provider, rxdart, uuid

More

Packages that depend on assets_audio_player_plus

Packages that implement assets_audio_player_plus