Highlighted

Play a sound one after another from array

Contributor ,
Jan 18, 2019

Copy link to clipboard

Copied

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.

Adobe Community Professional
Correct answer by Nancy OShea | Adobe Community Professional

See if this helps

Edit fiddle - JSFiddle

Views

106

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Play a sound one after another from array

Contributor ,
Jan 18, 2019

Copy link to clipboard

Copied

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.

Adobe Community Professional
Correct answer by Nancy OShea | Adobe Community Professional

See if this helps

Edit fiddle - JSFiddle

Views

107

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jan 18, 2019 0
Adobe Community Professional ,
Jan 18, 2019

Copy link to clipboard

Copied

See if this helps

Edit fiddle - JSFiddle

Nancy O'Shea, ACP
Alt-Web.com

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 18, 2019 1