fix: 修复失败 CL 续播崩溃 + 随机播放全部 - #2
Merged
Merged
Conversation
- PlayerService: 增加 prepared 状态机,未准备时走 playAt 准备而非直接 start(),彻底修复 restoreQueue 恢复后点播放的 IllegalStateException 崩溃 (PR#1 只修了队列被覆盖,未修此崩溃,续播依旧不可用) - 续播位置在 ACTION_PLAY 与 ACTION_PLAY_PAUSE 两条路径均正确应用 - 播放中每约 15s 持久化进度,避免系统强杀导致续播位置丢失 - 首曲 onPrepared 时若可视化未初始化则补建(与均衡器兜底对称) - LibraryFragment: 顶栏「随机」按钮一键打乱全部歌曲播放(借鉴 Auxio) - 同步更新 README
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#1 的「失败 CL」修复,本次彻底解决续播不可用问题并借鉴 Auxio 增加随机播放入口。
修复:续播崩溃(失败 CL 的真正症状)
PlayerService增加prepared状态机:应用重启经restoreQueue恢复队列后,MediaPlayer 尚未 prepare,此时点迷你播放器播放会直接start()抛IllegalStateException崩溃。改为未准备时走playAt准备,准备完成后再 seek 到续播位置。ACTION_PLAY与ACTION_PLAY_PAUSE两条路径均正确应用。pause()/seekTo()增加prepared守卫,避免非法状态崩溃。改进:续播更可靠
onPrepared时若可视化未初始化则补建(与均衡器兜底对称)。新功能:随机播放全部(借鉴 Auxio)
约束