playing consecutive wav files

They have: 117 posts

Joined: Feb 2000

Hello,

I'd like to be able to play "x" number of wav files consecutively. I can easily set up a javascript function to pick a specific file to play, or even a random file, but I'd like to be able to hit a button, and have a number of wav files play consecutively. Any help would be greatly appreciated. Thanks!

Bob

They have: 383 posts

Joined: Sep 2000

You could use a play list. Many of the streaming platforms support this (Real, Microsoft, QuickTime, etc). However if you want to use WAV's you'll need to be a little more inventive. The only two ways I can think of would be separate HTML pages for each wav with a timed refresh or you could use JavaScript and make it so they get a different WAV file each time the page is loaded (still using the time refresh).

They have: 117 posts

Joined: Feb 2000

Adam,

Thanks for the help. I was able to figure out a way to play the wav files consecutively. I just created to functions, one that plays file x, the other that calls that function consecutively to play file 0,1,2,etc. Each call is in a setTimeout with increasing delay times to account for the playing of the file in front of it, i.e.

setTimeout("playit(0)",1000);
setTimeout("playit(1)",2000);
.
.
.
etc.

Maybe a little archaic, but it works! Thanks again

Bob

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.