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