"Play All" mp3 files |
"Play All" mp3 files |
JeffLeites |
Mar 22 2018, 09:25 PM
Post
#1
|
Group: Members Posts: 9 Joined: 21-September 13 Member No.: 19,767 |
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
Post
#2
|
Programming Fanatic Group: Members Posts: 1,981 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
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
Post
#3
|
Group: Members Posts: 9 Joined: 21-September 13 Member No.: 19,767 |
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
Post
#4
|
Programming Fanatic Group: Members Posts: 1,981 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
Once you start coding just post back if you have any questions.
|
JeffLeites |
Mar 23 2018, 11:22 PM
Post
#5
|
Group: Members Posts: 9 Joined: 21-September 13 Member No.: 19,767 |
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
Post
#6
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
There are ready made server sides scripts that do what you want and more.
|
Lo-Fi Version | Time is now: 24th April 2024 - 06:12 AM |