Skip to content

fix: 修 AMLL 组件的一些问题 - #51

Merged
imsyy merged 4 commits into
SPlayer-Dev:devfrom
MoYingJi:pr/fix/amll
Jun 25, 2026
Merged

imsyy merged 4 commits into
SPlayer-Dev:devfrom
MoYingJi:pr/fix/amll

Conversation

@MoYingJi

Copy link
Copy Markdown
Collaborator

还有已知问题没被修复:通过系统媒体事件 seek 时,AMLL 不知道

Copilot AI review requested due to automatic review settings June 24, 2026 19:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
imsyy merged commit a1e214f into SPlayer-Dev:dev Jun 25, 2026
1 check passed
@MoYingJi
MoYingJi deleted the pr/fix/amll branch June 26, 2026 13:02
roarrabbit pushed a commit to roarrabbit/SPlayer-Next that referenced this pull request Aug 27, 2026
fix: 修 AMLL 组件的一些问题
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants