Home / Web Design / How to embed your playlist into your website

How to embed your playlist into your website

Mp3 playlist in a player
Yesterday, we learned how to create m3u playlists to stream your mp3 files over your server ondemand. Anytime users open the playlists, the mp3 files will be played for them. But what if you want to skip this step and have the media play directly from the website? It will require your users to have some time of player plugin, and most will. It is a good idea to still provide a download option with a direct link to the m3u file.

To setup an embedded player, type a code snippet such as this into your html file:

<embed name="music_playlist"
src="music_playlist.m3u"
width="300"
height="90"
loop="false"
hidden="false"
autostart="true">

Replace “music-playlist.m3u” with the name of your playlist. Save the file and then try it out in your browser. Users should now be able to stream mp3 files directly from your website without downloading anything. Since this method still requires a player plugin, you might also consider a Flash player alternative. In the future, HTML 5 audio will also be an option.

Photo: Flickr

Check Also

sitemaker

Website Builder

In the world today, a website is the first weapon that individuals possess when dealing …