|
@@ -119,9 +119,11 @@ export const setAudioCurrentTime = (time: number, index = 0) => {
|
|
|
setMidiCurrentTime(index);
|
|
|
return;
|
|
|
}
|
|
|
+ if(state.playSource === "mingSong") {
|
|
|
+ audioData.mingSongEle && (audioData.mingSongEle.currentTime = time);
|
|
|
+ }
|
|
|
audioData.songEle && (audioData.songEle.currentTime = time);
|
|
|
audioData.backgroundEle && (audioData.backgroundEle.currentTime = time);
|
|
|
- audioData.mingSongEle && (audioData.mingSongEle.currentTime = time);
|
|
|
audioData.progress = time;
|
|
|
};
|
|
|
|
|
@@ -168,7 +170,10 @@ export const changeSongSourceByBate = (isDisBate:boolean) => {
|
|
|
}
|
|
|
audioData.songEle && (audioData.songEle.currentTime = currentTime)
|
|
|
audioData.backgroundEle && (audioData.backgroundEle.currentTime = currentTime)
|
|
|
- audioData.mingSongEle && (audioData.mingSongEle.currentTime = currentTime)
|
|
|
+ // 当前是唱名才设置时间
|
|
|
+ if(state.playSource === "mingSong") {
|
|
|
+ audioData.mingSongEle && (audioData.mingSongEle.currentTime = currentTime)
|
|
|
+ }
|
|
|
// 设置静音与取消静音
|
|
|
if (state.playSource === "music") {
|
|
|
audioData.songEle && (audioData.songEle.muted = false);
|