添加debug日志
parent
7ac638c52c
commit
b436497555
|
@ -259,17 +259,20 @@ const handleToggleStop = () => {
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const playNext = async(isAutoToggle = false): Promise<void> => {
|
export const playNext = async(isAutoToggle = false): Promise<void> => {
|
||||||
|
console.log('skip next', isAutoToggle)
|
||||||
if (tempPlayList.length) { // 如果稍后播放列表存在歌曲则直接播放改列表的歌曲
|
if (tempPlayList.length) { // 如果稍后播放列表存在歌曲则直接播放改列表的歌曲
|
||||||
const playMusicInfo = tempPlayList[0]
|
const playMusicInfo = tempPlayList[0]
|
||||||
removeTempPlayList(0)
|
removeTempPlayList(0)
|
||||||
pause()
|
pause()
|
||||||
setPlayMusicInfo(playMusicInfo.listId, playMusicInfo.musicInfo, playMusicInfo.isTempPlay)
|
setPlayMusicInfo(playMusicInfo.listId, playMusicInfo.musicInfo, playMusicInfo.isTempPlay)
|
||||||
handlePlay()
|
handlePlay()
|
||||||
|
console.log('play temp list')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playMusicInfo.musicInfo == null) {
|
if (playMusicInfo.musicInfo == null) {
|
||||||
handleToggleStop()
|
handleToggleStop()
|
||||||
|
console.log('musicInfo empty')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,6 +280,7 @@ export const playNext = async(isAutoToggle = false): Promise<void> => {
|
||||||
const currentListId = playInfo.playerListId
|
const currentListId = playInfo.playerListId
|
||||||
if (!currentListId) {
|
if (!currentListId) {
|
||||||
handleToggleStop()
|
handleToggleStop()
|
||||||
|
console.log('currentListId empty')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const currentList = getList(currentListId)
|
const currentList = getList(currentListId)
|
||||||
|
@ -306,6 +310,7 @@ export const playNext = async(isAutoToggle = false): Promise<void> => {
|
||||||
pause()
|
pause()
|
||||||
setPlayMusicInfo(playMusicInfo.listId, playMusicInfo.musicInfo, playMusicInfo.isTempPlay)
|
setPlayMusicInfo(playMusicInfo.listId, playMusicInfo.musicInfo, playMusicInfo.isTempPlay)
|
||||||
handlePlay()
|
handlePlay()
|
||||||
|
console.log('play played list')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -320,6 +325,7 @@ export const playNext = async(isAutoToggle = false): Promise<void> => {
|
||||||
|
|
||||||
if (!filteredList.length) {
|
if (!filteredList.length) {
|
||||||
handleToggleStop()
|
handleToggleStop()
|
||||||
|
console.log('filtered list empty')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// let currentIndex: number = filteredList.indexOf(currentList[playInfo.playerPlayIndex])
|
// let currentIndex: number = filteredList.indexOf(currentList[playInfo.playerPlayIndex])
|
||||||
|
@ -349,9 +355,13 @@ export const playNext = async(isAutoToggle = false): Promise<void> => {
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
nextIndex = -1
|
nextIndex = -1
|
||||||
|
console.log('stop toggle play', togglePlayMethod, isAutoToggle)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (nextIndex < 0) {
|
||||||
|
console.log('next index empty')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (nextIndex < 0) return
|
|
||||||
|
|
||||||
const nextPlayMusicInfo = {
|
const nextPlayMusicInfo = {
|
||||||
musicInfo: filteredList[nextIndex],
|
musicInfo: filteredList[nextIndex],
|
||||||
|
|
|
@ -85,6 +85,7 @@ export default () => {
|
||||||
// setTimeout(() => {
|
// setTimeout(() => {
|
||||||
if (window.lx.isPlayedStop) {
|
if (window.lx.isPlayedStop) {
|
||||||
setAllStatus(t('player__end'))
|
setAllStatus(t('player__end'))
|
||||||
|
console.log('played stop')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// resetPlayerMusicInfo()
|
// resetPlayerMusicInfo()
|
||||||
|
|
Loading…
Reference in New Issue