This commit is contained in:
parent
f87d56cc1c
commit
92dfbc3411
|
@ -129,7 +129,7 @@ async function radioPlay() {
|
|||
onAudioEnd(playIndex)
|
||||
})
|
||||
audioElements.push(a)
|
||||
if(playing==false) playAudio()
|
||||
if(playIndex==0||playing==false) playAudio(playIndex)
|
||||
}
|
||||
|
||||
// for (let i = 0; i < props.mp3.length; i++) {
|
||||
|
@ -154,9 +154,9 @@ const onAudioEnd = (index: any) => {
|
|||
// 创建音频对象的数组
|
||||
const audioElements = reactive([])
|
||||
// 播放音频
|
||||
const playAudio = () => {
|
||||
const playAudio = (playIndex:any) => {
|
||||
// for (let i = 0; i < audioElements.length; i++)
|
||||
audioElements[0].play()
|
||||
audioElements[playIndex].play()
|
||||
}
|
||||
|
||||
// 暂停音频
|
||||
|
|
Loading…
Reference in New Issue