mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-07-04 05:02:11 +08:00
修复首次加载歌词的显示问题
This commit is contained in:
parent
db1cc3874b
commit
fc8f49b351
@ -120,6 +120,29 @@ const handlePlayMusic = async({ getState, dispatch, playMusicInfo, musicInfo, is
|
|||||||
track.id += track.id + '//restorePlay'
|
track.id += track.id + '//restorePlay'
|
||||||
playMusicId = playMusicId + '//restorePlay'
|
playMusicId = playMusicId + '//restorePlay'
|
||||||
msPlayMusic([track])
|
msPlayMusic([track])
|
||||||
|
if (!isRefresh && state.common.setting.player.togglePlayMethod == 'random') dispatch({ type: TYPES.addMusicToPlayedList, payload: playMusicInfo })
|
||||||
|
|
||||||
|
// console.log(musicInfo.img)
|
||||||
|
if (!musicInfo.img) {
|
||||||
|
dispatch(getPic(musicInfo)).then(async() => {
|
||||||
|
const musicUrl = await getMusicUrl(musicInfo, type)
|
||||||
|
if (musicUrl) {
|
||||||
|
// console.log('+++updateMusicInfo+++')
|
||||||
|
// setTimeout(() => {
|
||||||
|
updateMusicInfo(buildTrack(musicInfo, type, musicUrl))
|
||||||
|
// }, 1000)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
dispatch(getLrc(musicInfo)).then(({ lyric, tlyric }) => {
|
||||||
|
setLyric(lyric)
|
||||||
|
const player = getState().player
|
||||||
|
if (player.status == STATUS.playing && !player.isGettingUrl) {
|
||||||
|
getPosition().then(position => {
|
||||||
|
lrcPlay(position * 1000)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user