I have a database with MAMP and I have created a music table which contains musicId and musicUrl columns. Now in my websiteI created an HTML player that gets its sources from "src" syntax. The player is fixed at the bottom just like soundcloud player. I want to display musics on the page and when the user clicks on a music, I want this music Url to be taken from database and to be played with the audioplayer. Just like Deezer, Spotify or Soundcloud does. Please reply with details. Thanks

Recommended Answers

All 2 Replies

I won't give you exact code. But I will tell you commands that you need and how. If you click links, you will learn how to operate it yourself.

First of all you would need to connect your PHP configuration file to database, I call it mostly config.php. Then of course you would need another file which would ask database for links in your table. When you have your entire music table in your variable. You can output every single record you had in your database. When you do it in right position, you can add soundtracks to the list, and links assigned to them.

Give it a sincere try on creating it. Try your best, and I'd be more than glad to help you if you encounter errors or problems.

i dont know if it is good or not that u can use also skylink api. it is webrtc.. and u can use video player or audio player or any real time app with this api.. and its easy

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.