修复后台播放因Audio无法处理降级策略的问题,增加预载窗口#43
Merged
Merged
Conversation
详细修改内容: - 新增disableAiAudio配置项,用于屏蔽AI增强音质 - 重构音质获取逻辑,支持自动降级可用音质 - 优化Android端播放上下文同步流程 - 移动端播放器新增音质快速选择弹窗 - 修复音质切换失败后的回滚逻辑 - 调整预加载策略,优化切歌体验 - 优化播放错误处理逻辑
- 新增无权限歌曲过滤机制,无权限时自动跳过曲目 - 新增 Android 端音频 URL 本地缓存,切歌时优先命中已缓存资源 - 新增 isPromotedAudioReady 接口,检测预载音频是否已完整缓存 - 优化 syncApiContext 调用顺序,确保上下文同步后再并发请求 - 优化 AudioPrefetchTtlIndex 清理逻辑,避免未过期条目被误删 - 优化 sweep 使用 peekSimpleCache 替代 getOrCreate,避免不必要的缓存初始化 - 优化 getPromotedAudioFile 使用 getOrCreate 保证缓存实例可用 - 播放无权限歌曲时给出明确提示并自动跳至下一首 - syncApiContext 去重键新增 playSongDemo 维度
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.
📌 变更类型
📝 变更说明
本 PR 主要修复 Android 原生播放在后台 / 锁屏场景下的在线歌曲 URL 解析、预载和自动切歌稳定性问题,并优化高音质播放的缓存预热策略。
核心改动:
disableAiAudio与 Android 原生播放上下文同步逻辑,确保音质开关变化后 Java 端能拿到一致的音质过滤与降级策略。apiBaseUrl / cookie / songLevel,避免updateQueueContext先到达导致 URL 解析跳过。512KB提升到2MB,降低音频在开头数秒跨过缓存边界后发生阻塞的概率。🔗 关联 Issue
Closes #
📱 影响范围
✅ 自检清单
devpnpm lint且无 warningpnpm typecheck且无报错