JeffLeites
Mar 22 2018, 09:25 PM
I'm working on a page that contains a bunch of mp3 files. Right now I have the page showing a list of them, and using Audio Controls, I put a small player next to each one. I'd like to have the option of having one player that would play them all, from the first tune, through the last. I know I could do it by duplicating everything into one mp3 file, but I don't want to do that. Is there any other (simple) way to make all the mp3s play in sequence?
CharlesEF
Mar 23 2018, 12:47 AM
You would need a server side language like PHP, ASP or etc... to read the directory and build an array of mp3 files. You then pass that array to Javascript. Or, you could hard code the array (all file paths and names) in Javascript, but you have to maintain the array. Now you just loop the array and play each mp3 in the array.
JeffLeites
Mar 23 2018, 05:44 PM
Thanks Charles. It sounds like a bit much for a long retired COBOL programmer, but when I have some time I'll look into it. I think I might be able to handle the Javascript ;-)
CharlesEF
Mar 23 2018, 08:08 PM
Once you start coding just post back if you have any questions.
JeffLeites
Mar 23 2018, 11:22 PM
I found some on-line tutorials on how to do it with JavaScript, but it's going to take me more than half an hour to figure it out :-) TNX again!
pandy
Mar 24 2018, 05:10 PM
There are ready made server sides scripts that do what you want and more.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.