Repository navigation
fix: 修 AMLL 组件的一些问题 - #51
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
该 PR 主要针对 AMLL(AppleMusic-like-lyrics)歌词组件的播放/暂停与时间同步行为做修复,并在全屏播放器里把「是否正在 seek」信息透传给歌词引擎,以改善歌词在 seek 场景下的表现。
Changes:
- AMLL 歌词组件在页面可见性变化、播放状态变化时,改为显式区分
resume()/pause()的调用路径,并扩展setCurrentTime(time, isSeek?)以支持 seek 语义。 - 全屏播放器在高频时间驱动中向歌词组件传入
player.isSeeking(),并调整歌词点击 seek 的处理函数。
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/components/player/Lyrics/AMLLLyrics.vue | 调整 AMLL Core 实例在可见性/播放态下的 pause/resume 与时间同步接口签名,支持可选 isSeek。 |
| src/components/player/FullPlayer/index.vue | 将 isSeeking() 透传到歌词时间同步;引入 handleLyricSeek 统一处理歌词点击触发的 seek。 |
Comment on lines
50
to
54
| /** 精确播放时间(毫秒) */ | ||
| const { start: startTick, stop: stopTick } = usePlaybackTime((currentMs) => { | ||
| if (!status.trackLoading && !media.lyricLoading) { | ||
| lyricRef.value?.setCurrentTime(currentMs + status.lyricOffsetMs); | ||
| lyricRef.value?.setCurrentTime(currentMs + status.lyricOffsetMs, player.isSeeking()); | ||
| } |
Comment on lines
+110
to
+113
| const handleLyricSeek = async (timeMs: number): Promise<void> => { | ||
| await player.seek(timeMs); | ||
| if (!isPlaying.value) await player.play(); | ||
| }; |
Comment on lines
+105
to
112
| } else if (!isFrozen.value) { | ||
| if (props.playing) { | ||
| playerRef.value?.resume(); | ||
| } else { | ||
| playerRef.value?.pause(); | ||
| } | ||
| resumeRaf(); | ||
| } |
Comment on lines
+163
to
168
| if (props.playing) { | ||
| player.resume(); | ||
| } else { | ||
| player.pause(); | ||
| } | ||
| resumeRaf(); |
imsyy
approved these changes
Jun 25, 2026
roarrabbit
pushed a commit
to roarrabbit/SPlayer-Next
that referenced
this pull request
Aug 27, 2026
fix: 修 AMLL 组件的一些问题
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.
还有已知问题没被修复:通过系统媒体事件 seek 时,AMLL 不知道