|
|
@ -256,7 +256,8 @@ const toggleVoiceForUser = (index) => { |
|
|
|
!chatStore.messages[index].audioArray[0] || |
|
|
|
!chatStore.messages[index].audioArray[1] || |
|
|
|
!chatStore.messages[index].audioArray[2] || |
|
|
|
!chatStore.messages[index].audioArray[3] |
|
|
|
!chatStore.messages[index].audioArray[3] || |
|
|
|
!chatStore.messages[index].audioArray[4] |
|
|
|
) { |
|
|
|
return; |
|
|
|
} |
|
|
@ -300,6 +301,10 @@ const toggleVoiceForUser = (index) => { |
|
|
|
audioPreloadStatus.four.loaded = true; |
|
|
|
audioPreloadStatus.four.url = chatStore.messages[index].audioArray[3]; |
|
|
|
} |
|
|
|
if (chatStore.messages[index].audioArray[4]) { |
|
|
|
audioPreloadStatus.five.loaded = true; |
|
|
|
audioPreloadStatus.five.url = chatStore.messages[index].audioArray[4]; |
|
|
|
} |
|
|
|
chatStore.currentUserIndex = index; |
|
|
|
audioQueue.value = []; |
|
|
|
isPlayingAudio.value = false; |
|
|
@ -311,6 +316,7 @@ const toggleVoiceForUser = (index) => { |
|
|
|
addToAudioQueue(chatStore.messages[index].audioArray[1], "API2-第二个"); |
|
|
|
addToAudioQueue(chatStore.messages[index].audioArray[2], "API3-第三个"); |
|
|
|
addToAudioQueue(chatStore.messages[index].audioArray[3], "API4-第四个"); |
|
|
|
addToAudioQueue(chatStore.messages[index].audioArray[4], "API5-第五个"); |
|
|
|
|
|
|
|
if (!audioStore.isVoiceEnabled) { |
|
|
|
audioStore.toggleVoice(); |
|
|
|