Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更类型
变更说明
本次改动将 Android 环境下的默认音频播放实现从
HTMLAudioElement切换为AndroidNativeAudioPlayer,并围绕原生播放链路补齐了一系列兼容与稳定性修复,确保应用能够正常构建、启动并完成核心播放流程。主要包括以下内容:
Android 播放引擎切换
将
AudioManager在 Android 环境下的默认引擎切换为AndroidNativeAudioPlayer,使播放、通知栏控制、原生 MediaSession 与 ExoPlayer 链路保持一致。修复 Android 启动闪退
排查并修复了
nodejs-mobile相关原生库未正确打包的问题。补充了jniLibs源目录配置,关闭了会导致libnode.so丢失的 ABI 拆分打包,并增加构建前清理逻辑,避免libnode.so.gz干扰 JNI 合并,最终解决应用启动即崩溃的问题。修复拖动进度条后异常恢复播放
在
AndroidNativeAudioPlayer中补充 seek 状态保护,避免原生 seek 回调将暂停状态错误恢复为播放状态,修复拖动进度条后音乐重新播放的问题。修复系统通知栏切歌后元数据落后一首
调整 Android 原生通知栏与 MediaSession 元数据同步时机,在切歌时更早推送最新歌曲元数据,并将新的
MediaMetadata回写到当前MediaItem,修复通知栏标题、歌手、封面落后一首的问题。保留 HarmonyOS Connect 兼容基础代码
虽然当前不再继续针对 HarmonyOS Connect 的进度条问题深挖,但本次已保留通知文本进度显示与
MediaMetadata.durationMs的兼容代码,便于后续继续适配。构建链路兼容性修复
为适配当前 Android 构建环境,调整了 Gradle / AGP / JDK 相关配置,并修复了
nodejs-mobile-cordova在新构建链路下的兼容问题,保证调试 APK 可稳定产出。关联 Issue
无关联Issue
影响范围
自检清单
masterpnpm lint且无 warningpnpm typecheck且无报错截图 / 录屏 (UI 类 PR 必填)
测试方式
libnode.so缺失崩溃。AndroidNativeAudioPlayer。pnpm lint可通过,确认本次修改未引入新的 Lint 问题。其他说明 (选填)