NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev
A flutter plugin for music playback, including notification handling.
Last release 1 months ago
15 Aug 2026
Ships unpredictably
gaps range from 8 days to 4.9 years
Some releases are documented
notes for 26 of 44 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
44 releases · first in 2020
One column per quarter.
包地址: https://pub.dev/packages/audio_manager
>=3.0.0 <4.0.0>=1.20.0audio_manager 从移动端音频播放插件升级为跨平台音频播放插件,正式支持 iOS、Android、macOS、Windows、Linux 和 Web 六类平台。
1.0.0 保持原有核心 API 和单例使用方式,同时补齐桌面端原生播放、系统媒体控制、Web/WASM 兼容性、静态分析质量和示例文档。
| 平台 | 播放后端 | 系统集成 |
|---|---|---|
| iOS | AVPlayer | 锁屏控制、Control Center、通知栏 |
| Android | MediaPlayer | MediaSession、通知栏、锁屏控制 |
| macOS | AVFoundation | Now Playing、Control Center、媒体键 |
| Windows | Windows.Media.Playback | SMTC、任务栏媒体浮层 |
| Linux | GStreamer | MPRIS、桌面媒体键 |
| Web | HTMLAudioElement | 浏览器内播放 |
package:web 和 HTMLAudioElement,并移除顶层 dart:io 依赖,兼容 Web/WASMSwiftAudioManagerPluginios/audio_manager/Sources/audio_manager/Windows.Media.Playback 播放,接入 SMTC 和任务栏媒体浮层gst_player 播放,接入 MPRIS 桌面媒体控制package:web 替代已废弃的 dart:htmldart:io 导入,file() 使用条件导入的本地文件实现package:lints/recommended 并修复静态分析问题repository 和 issue_tracker 元数据原有核心 API 保持不变:
final audio = AudioManager.instance;
await audio.start(
'assets/audio.mp3',
'Title',
desc: 'Artist',
cover: 'assets/ic_launcher.png',
);
audio.onEvents((event, args) {
print('$event $args');
});
await audio.playOrPause();
await audio.updateInfo(title: 'New title', desc: 'New artist');
final state = await audio.currentState();从 0.9.x 升级到 1.0.0 时,业务代码通常无需修改。需要关注的迁移点:
flutter pub getpod install,或让 Flutter 3.24+ 自动集成 SPMcom.apple.security.network.client entitlementUIBackgroundModes -> audioPendingIntent flagsPOST_NOTIFICATIONSandroid:usesCleartextTraffic="true"Publisher 仍显示为 unverified uploader,需要在 pub.dev 创建并验证 Publisher 后转移包本地(macOS 开发机 + 容器 / Parallels Win11):
flutter build macos --debug 通过flutter build windows --debug 通过flutter build linux --debug 通过flutter build web 与 WASM dry run 通过flutter analyze 无问题,flutter test 全部通过发布后 pub.dev 静态分析、SPM 与 WASM 兼容性扣分项均已在代码层面消除,评分以发布后的刷新结果为准。
pubspec.yaml 中升级依赖:dependencies:
audio_manager: ^1.0.0flutter pub get
flutter testWindows.Media.Playback and SMTC (taskbar media controls)SwiftAudioManagerPluginios/audio_manager/Sources/audio_manager/) and align the podspec deployment target with iOS 13.0package:lints/recommended and resolve all static-analysis findings (type annotations, file naming, web doc comments, example dependency placement) to pass the pub.dev analysis checkdart:io import (file() now uses a conditional local_file.File, with a path-only stub on web)Rebuilt web support on package:web — migrated from deprecated dart:html to package:web ( HTMLAudioElement ); fixed the web runtime crash, added full e…
package:web — migrated from deprecated dart:html to package:web (HTMLAudioElement); fixed the web runtime crash, added full event forwarding (progress, play status, auto-advance on track end, errors), and resolved bundled assets through ui_web.assetManager so local audio plays correctly in release buildsPOST_NOTIFICATIONS before playback and re-posts the playback card once the user grants itMap<Object?, Object?> arguments, and correct the seekTo ms/seconds conversion and setVolume argument-key contractprint debug output from the web pluginandroidx.test, and add data-backup rulespackage:web (HTMLAudioElement), fixing the runtime crash, adding event forwarding, and resolving local assets in release buildsPOST_NOTIFICATIONS permission at runtime and re-post the playback card once grantedUIScene lifecyclestop leaking through release builds on Androidtimeupdate clearing the error state and clamp setVolume argumentsWeb support rebuilt — migrated from deprecated dart:html to package:web ( HTMLAudioElement ); fixed the web runtime crash, added full event forwarding…
Major playback, notification, and platform-compatibility improvements across Android, iOS, and Web.
dart:html to package:web (HTMLAudioElement); fixed the web runtime crash, added full event forwarding (progress, play status, auto-advance on track end), and resolved local assets through ui_web.assetManager so bundled audio plays in release buildsPendingIntent flags, foreground service type, and MediaSession/MediaStyle-based notification & lock-screen controlsPOST_NOTIFICATIONS before playback and re-posts the playback card once grantedupdateInfo — update title, description, and cover while playing without restartingcurrentState — query native playback state from any contextAVURLAsset with a User-Agent for stream URLs on iOSUIScene lifecyclestop leaking through release buildstimeupdate clearing the error state and clamp setVolume argumentsAVPlayer state#98, #99, #84, #75, #97, #93, #85, #58, #60, #62, #63, #73, #86, #87, #92, #77, #78
PendingIntent flags and foreground service typeMediaSession / MediaStyle for Android notification and lock-screen controlsupdateInfo to update title, description, and cover while playingcurrentState for native playback state queriesAdd support for loading covers from the app's data dir on Android
playOrPause method error- update to flutter 2.0 - fix to null safety
update android notification text to english
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fix Crush while playing androin audio in offline #28
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
setRate method to fix num conversion double
setRate method to fix num conversion doublefix ios remote control of pre/next play event
- Fix loading local file crash
- fix iOS stuck - add toPlay and toPause method - add interrupt pause
toPlay and toPause methodNothing published for this version
Nothing published for this version
fix repeated problem of notification service
Nothing published for this version
remove AndroidManifast.xml redundant configuration
AndroidManifast.xml redundant configurationAdd internal playlist management
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Supports playing local directory media files
Add auto attribute whether to play automatically, default is true
auto attribute whether to play automatically, default is true- Fix iOS remote command error
- Add cache hint - Fix start and stop error - List loop playback
Nothing published for this version
Nothing published for this version
- Fix iOS loop playback
- Optimization error prompt.
Add method to get playback info.
- Fix Initialize before playing.
Customize the style of the slider of the demo
- update change log
update seekTo, rate, onEvents callback handle.
seekTo, rate, onEvents callback handle.Initial version, created by Jerome Xiong
Your coding agent can read these notes before it upgrades. Set up the MCP server →