优化歌词播放机制

This commit is contained in:
lyswhut
2022-03-18 11:27:31 +08:00
parent 8453ad0fb4
commit 64eea42092
2 changed files with 8 additions and 4 deletions
@@ -44,9 +44,11 @@ export default ({ setting }) => {
setDesktopLyricInfo('lyric', { lrc: musicInfo.lrc, tlrc: musicInfo.tlrc, lxlrc: musicInfo.lxlrc })
if (isPlay.value && (musicInfo.url || playMusicInfo.listId == 'download')) {
const time = getCurrentTime() * 1000
setDesktopLyricInfo('play', time)
lrc.play(time)
setTimeout(() => {
const time = getCurrentTime() * 1000
setDesktopLyricInfo('play', time)
lrc.play(time)
})
}
}