|
@@ -147,7 +147,13 @@ export const toggleMutePlayAudio = (source: IPlayState, muted: boolean) => {
|
|
|
/** 切换节拍器音源 */
|
|
|
export const changeSongSourceByBate = (isDisBate:boolean) => {
|
|
|
// isDisBate 为true 切换到不带节拍的,为false 切换到带节拍的
|
|
|
- const currentTime = audioData.songEle?.currentTime || audioData.backgroundEle?.currentTime || audioData.mingSongEle?.currentTime || audioData.progress || 0
|
|
|
+ let currentTime
|
|
|
+ if(state.playSource === "mingSong"){
|
|
|
+ currentTime = audioData.mingSongEle?.currentTime
|
|
|
+ }else{
|
|
|
+ currentTime = audioData.songEle?.currentTime || audioData.backgroundEle?.currentTime
|
|
|
+ }
|
|
|
+ currentTime || (currentTime = audioData.progress || 0)
|
|
|
if (isDisBate) {
|
|
|
if(state.playType === "play"){
|
|
|
audioData.songEle = audioData.songCollection.songEle
|