Skip to main content
Jhon Carlo
Inspiring
January 18, 2019
Answered

Play a sound one after another from array

  • January 18, 2019
  • 1 reply
  • 342 views

Hello,

I need to play one sound after another from list,

something like that:

var audio1 = new Audio("MySound.mp3");

var audio2 = new Audio("MySound.mp3");

etc.

var MyList = [audio1, audio2, etc...];

function PlayMyList(){   

MyList[0, 1, etc].play();

}   

Can you help me?

Thank you very much.

    This topic has been closed for replies.
    Correct answer Nancy OShea

    See if this helps

    Edit fiddle - JSFiddle

    1 reply

    Nancy OShea
    Community Expert
    Nancy OSheaCommunity ExpertCorrect answer
    Community Expert
    January 18, 2019

    See if this helps

    Edit fiddle - JSFiddle

    Nancy O'Shea— Product User & Community Expert