My solution to free audio downloads and streaming on wordpress

I love to work with WordPress and I recently had the challenge of adding audio streaming and free downloading to a friend’s website, Shiso Records. Because the site is giving away the music free of charge under a public commons attribution licence I felt that buying a premium plugin to do the job, such as Download Manager Pro, was not justified.

Many of the plugin solutions that I found involved uploading the files to the server.  Again I cannot justify the storage of large audio tracks on my server, so what I needed was a solution to remotely store the music and which would allow audio streaming and also downloading.

Remote hosting of music

I decided to use the public folder on dropbox as the storage device.  There are 2gb free when you sign up.  I discovered that dropbox had deprecated the public folder but that there was a way to re-enable it, if you have this problem visit this link:
https://www.dropbox.com/enable_public_folder.

I converted the tracks from the Apple m4a format to mp3 and uploaded them to dropbox. That actually increased the file size a lot, but I felt that mp3 was more universally compatible than the Apple m4a format.

Streaming audio from the website

I did not like the way that the default wordpress audio player opens in a new window with a black background.  I really wanted to stream the audio within the page. Having trialled a few other plugins I settled on mb.miniAudioPlayer which is compatible with mobiles and looks good within the pages. It supports remotely hosted files. The only disadvantage was that the actual file size is very large, so that I decided to put a one minute extract from the pieces, some of which are over five minutes long. To insert the audio you just add a link to the file in the public dropbox directory and the plugin automatically understands and overrides the built in wordpress audio player.

Downloading audio files hosted remotely

In order to solve the issue of allowing downloads I found a really simple solution. If you suffix the dropbox url with ?dl=1 it automatically turns into a download link. You also have to add class=”map_excuded” to the link to prevent the mb.miniAudioPlayer from attempting to play the file. So that if you use a link written as shown below you have yourself a free download button.
link

This solution is only going to suit those who want to showcase their music free. If you want to see my solution in action visit www.shisorecords.com and enjoy the tunes.

Leave a Reply

Your email address will not be published. Required fields are marked *