Have an MP3 play in the player but block file access?

greyhat

English Gent
Nov 30, 2009
853
8
0
UK
Hey WF!


I could do with some help. I am building a simple MP3 download store. The MP3 files are stored in root/files and direct access is blocked (via permissions) so you cant access them.


I need to be able to access these files to play in a player with a popup window launched from the product landing page.



Can someone tell me what is the best way to do this please?



Thanks.


FRONT-wallpaper-kitty-lea-1920x1200-640x400.jpg
 


You've got a catch 22, you don't want people to download the music without paying for it, but you can't let people listen to it with them downloading it.

There are two ways I have seen other MP3 site deal with this, first is to give a sample, 30 seconds of the MP3, then if they want the full version they have to buy. Works well.

The seconds is DRM which works well, but has the drawback of being harder to implement and its not really designed to be cross platform compatible.

Flash has some sort of DRM I believe, haven't looked at it, but then trying to play the mp3 that has Flash DRM or any DRM on a regular MP3 player is not going to work.

Personally I would just give a 30 seconds sample, they get a taste but still have to buy if they want the whole thing.
 
From easiest to hardest for users to download:

- Vanilla progressive download. The media is saved to the user's computer in all progressive downloads. The only non-progressive download is the last bullet point.
- Loading the file from an external file so it's not just sitting in the html.
- Obfuscating asset paths with javascript callbacks that bounce between a few files. Even though in the end it makes a static path, it's not in plain text and the user now needs to know javascript.
- Use Flash and pack the media in SWF objects.
- Invoke a content signing policy along with the obfuscation. Check out the RTMPe protocol.
- Forget about progressive downloads and set up a streaming server. Instead of a file being sent, you just spew a stream of data that the player will interpret. User now needs to read the http stream to a file, start and stop it for that track, and add the meta data himself.

In other words, a streaming server is what you want.