Simple Music Player

Contents

1. What are the requirements?

2. How do i install the software?

3. How do i update the software?

4. How do i setup?

1. What are the requirements?

Server: PHP 5.6+

2. How do i install the software?

1) unzip codecanyon_XXXXXXXX.zip
2) copy all files and directories into your hosting server
3) copy all your mp3 files to songs directory

3. How do i update the software?

1) backup songs directory
2) upload new file versions into your hosting server root directory
P.S. if directory(1) missing or empty, restore from your backup copy

4. How do i setup?

QUICK START

In HTML, include jquery if not already present

In HTML, include thescript:

Create a container with a custom id where the music player is to appear:

Add it to your stylesheet to define size of the player:
#smp_container {
width:100%;
height:100vh;
}

Finally call in your javascript this function with the id of the previous container to init the player:
init_smp('smp_container', 'songs');

If you want to initialize the player with a different folder just pass the relative position as second
parameter

OPTIONS

init_smp('smp_container','songs',{
waveform_width: 3
});

waveform_width: 0-10 (default 3)
0 hide the waveforms
1 more accurate, 10 less accurate

ADD LIVE STREAMS

1) create a file called name_live_file.live

2) inside the file created put this content (replace url name and artist)
{
"url":"https://icecast.omroep.nl/radio1-bb-mp3",
"type":"direct",
"name":"Radio 1 bb",
"artist":"Icecast"
}

2b) For old shoutcast 1 servers try to put type value as shoutcast_v1

3) if you want to add a cover image create a jpg file 500x500 and name it name_live_file.jpg

4) upload .live and .jpg files to songs directory