Create a Music Playlist

Posted: April 15, 2009 in Computer, Programming, Tutorials
Tags: , ,

Create a Music Playlist

I assume that you already know how to add Music to your website. This is to create music play list by your self and stream on your website. Music playlist is a simple list.

To add music playlist to your website have to do two things,
1.Create a m3u file (your music playlist file)
2.Create your HTML file with your music code (this plays the music on the m3u file)

Step 1 – Create a m3u File
A m3u file is a file that contains a list of songs. Follow these steps to create your m3u file (i.e. your playlist file):

Create a text file
Add a list of the mp3 files you want on your playlist. This can be the full path to the file or a relative path. Place each mp3 file name on a new line
Add any comments by preceeding them with a hash (#) symbol (this step is optional)
Save the file with a .m3u extension. For example, call it music_playlist.m3u
There it is – your music playlist file!

Example m3u File
Below is an example of an m3u file:

#This is my m3u file - it contains a list of songs

Now all you need to do is add your playlist to your music code.

Step 2 – Add Your Playlist to your Music Code
Place the following code within your HTML file and change the values to suit:

Example Music Code

≤ embed name="music_playlist"
</embed ≥

If you’ve ever added music to your website, you are probably familiar with this code.

The only difference between this code and any other (non-playlist) code, is that in this code, the value of the src attribute (i.e. your source file) is your playlist file. If you weren’t using a playlist, this source file would simply be a single .mp3 file or a single .wav file or similar.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s