Skip to content

Commit fe0f7a0

Browse files
committed
fix(Lyric): 点击歌词跳转进度未应用偏移
1 parent 8529663 commit fe0f7a0

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/components/Player/MainAMLyric.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ const amLyricsData = computed<LyricLine[]>(() => {
8585
const jumpSeek = (line: any) => {
8686
if (!line?.line?.lyricLine?.startTime) return;
8787
const time = msToS(line.line.lyricLine.startTime);
88-
player.setSeek(time);
88+
const offsetSeconds = statusStore.getSongOffset(musicStore.playSong?.id)
89+
player.setSeek(time - offsetSeconds);
8990
player.play();
9091
};
9192

src/components/Player/MainLyric.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@ const getYrcStyle = (wordData: LyricContentType, lyricIndex: number) => {
276276
const jumpSeek = (time: number) => {
277277
if (!time) return;
278278
lrcMouseStatus.value = false;
279-
player.setSeek(time);
279+
const offsetSeconds = statusStore.getSongOffset(musicStore.playSong?.id)
280+
player.setSeek(time - offsetSeconds);
280281
player.play();
281282
};
282283

0 commit comments

Comments
 (0)