assets_audio_player_plus 3.2.1
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 rundart format,flutter analyze, andflutter testmanually perCONTRIBUTING.mdin the meantime. - Restored local
dependency_overridesin the rootpubspec.yamlfor developer convenience (the published artifact still depends onassets_audio_player_plus_webfrom 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_player→assets_audio_player_plus. - Renamed federated web implementation
assets_audio_player_web→assets_audio_player_plus_web, withimplements: assets_audio_player_pluscorrectly wired so Flutter's plugin resolver picks it up. - Updated
pubspec.yamlhomepage:URLs and all Dartpackage:...imports. example/pubspec.yaml: depends onassets_audio_player_plus: ^3.2.0with a localpath: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:htmlAPI). - Migrated
dart:html→package:web+dart:js_interopso 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 (clearssrc, callsload(), nulls the reference). Fixes a bug where rapidopen()/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/onAudioRemovedAtinlib/src/assets_audio_player.dartnow read the currentisPlayingstate and pass it asautoStart, 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 fromlate DurationtoDuration _totalDuration = Duration.zeroso the position callback firing beforeonReadyToPlayno longer throwsLateInitializationError.Audio.copyWithnow acceptspitch— the field was declared on the private constructor but never surfaced oncopyWith.- Added analyzer-clean baseline:
flutter analyzereturns 0 issues across the plugin, web sub-package, and example.
Example app — full rewrite #
- Removed the
flutter_neumorphic_plusdependency and the neumorphic look. Replaced with a clean Material 3 launcher + screens (seededColorScheme.fromSeed(Colors.deepPurple), light + dark). - Reorganized
example/lib/intomain.dart+demos/+widgets/+utils/(snake_case, one demo per file). - Dropped outdated
flutter_audio_queryandflutter_audio_recordergit dependencies (unmaintained, missing AGP 8 namespace). - Regenerated the Android scaffold via
flutter create --org=com.zakriakhanwith the declarative Gradle plugins block (modern AGP 8 requirement). AddedPOST_NOTIFICATIONS,WAKE_LOCK,FOREGROUND_SERVICE,FOREGROUND_SERVICE_MEDIA_PLAYBACKpermissions, plus the customassets.audio.player.notification.iconmetadata 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: trueand 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:sstimestamps. - 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
cacheDownloadInfosstream to explicitDio.onReceiveProgressdownload. 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 aDiodownload into apackage:webblob 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.jsonevery 20 s with manual refresh button. Graceful fallback on CORS errors. - Update live stream metas: visible "Current metadata" card reflects
audio.updateMetas()viaplayer.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.mp3→country2.mp3andpop test.mp3→pop.mp3to remove spaces that tripped the browser's<audio src="">. - Used
electronic.mp3andpop.mp3(≈4 MB each) instead ofcountry.mp3(11 MB) in theAudioWidgetandInsert / replacedemos for faster load times.
GitHub / CI / docs #
.github/workflows/ci.yml—dart formatcheck,flutter analyzeon plugin + web + example,flutter test,flutter build web --releaseand--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 --wasmsucceeds - ✅ 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
httpinstead ofdio - 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.replaceAtmethod
2.0.3+6 #
- ExoPlayer network now set
allowCrossProtocolRedirect=trueby 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
seekandseekBynot working on the web PlayList.startIndexis now mutable- Stop player then call
playreopen it atplaylist.startIndex - Increased buffer size on android/exoplayer
- Added keepLoopMode on prev/next
2.0.2 #
- Breaking change :
loopboolean now enumerate 3 values :none,singleandplaylist
2.0.1+9 #
- Added
.showNotification = true/falseto hide dynamically displayed notification - Added custom action on notif click(android)
- Added
isBufferingtoRealtimePlayingInfos - 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.updateMetasto 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 playlisttoReadingPlaylist 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
packageon 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/andpackagekeyword - added player_builders
1.4.5 #
- fixed implementation of local file play on iOS
1.4.4 #
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
playspeedas 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
respectSilentModeas open optional argument - Added
showNotificationon iOS to map with MPNowPlayingInfoCenter (default: false) - Added
metason 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
playAndForgetwitch 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
seekas optional parameter onopenmethod
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
RealtimePlayingInfosstream
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 #
- Rewritten the web support, using now https://github.com/florent37/flutter_web_howl
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.