This commit is contained in:
weipengfei 2023-10-12 19:24:02 +08:00
parent f87d56cc1c
commit 92dfbc3411
1 changed files with 3 additions and 3 deletions

View File

@ -129,7 +129,7 @@ async function radioPlay() {
onAudioEnd(playIndex) onAudioEnd(playIndex)
}) })
audioElements.push(a) audioElements.push(a)
if(playing==false) playAudio() if(playIndex==0||playing==false) playAudio(playIndex)
} }
// for (let i = 0; i < props.mp3.length; i++) { // for (let i = 0; i < props.mp3.length; i++) {
@ -154,9 +154,9 @@ const onAudioEnd = (index: any) => {
// //
const audioElements = reactive([]) const audioElements = reactive([])
// //
const playAudio = () => { const playAudio = (playIndex:any) => {
// for (let i = 0; i < audioElements.length; i++) // for (let i = 0; i < audioElements.length; i++)
audioElements[0].play() audioElements[playIndex].play()
} }
// //