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:
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.