1

Alright so I'm making a website for my friends band, and they want to have a music player to play their MP3's. One of the things I'm concerned about though, is the security of the MP3 files. Their albums are on iTunes to buy, so I'm looking for what the best option to have the MP3s be played but not be able to be downloaded and saved.

Any good ideas? The best thing I can think of is embedding the MP3's inside a Flash music player, but that would be more work than it's worth it seems.

Chiggins
  • 8,197
  • 22
  • 56
  • 81
  • possible duplicate of [Good mp3 player for music website to sell songs?](http://stackoverflow.com/questions/1487637/good-mp3-player-for-music-website-to-sell-songs) – Matt Ball May 12 '11 at 02:09
  • Anything that you do here can be circumvented through the analog hole. http://en.wikipedia.org/wiki/Analog_hole -- anyone who wants the tracks for free will get them. It's like trying to keep squirrels off of birdfeeders; the most you can really hope to do is amuse and annoy them. – bgporter May 13 '11 at 14:23

2 Answers2

1

The best way would be to stream the MP3 from a media server. Other than that, if you're going to old progressive download way, the MP3 will end up in the browser's cache.

Eric
  • 9,870
  • 14
  • 66
  • 102
  • I was thinking of some sort of Flash player, but those usually use some sort of XML file for settings, and through the XML file, someone could see the URL of the MP3, which isn't all that ideal. :\ – Chiggins May 12 '11 at 02:18
0

If you embed the files in the swf, they'll be available to anyone that cracks open the swf (media files are kept separately from the code).

Streaming the files will help, but once they're fully downloaded, they'll be available in the temp file directory of your browser (you might need to rename the extension, but they're there).

You could possibly try splitting up the mp3 into chunks and playing them one after the other - i think that's what some online stations and video players do - but it's a pain in the ass to set up and get working etc.

You could also maybe try doing some byte magic on the mp3, load it as a ByteArray, then reverse it in the SWF - that way even if they find the file in the temp directory of their browser, it'll be useless - but you lose streaming ability (you need to wait for the full song to download) and you'll need to protect your code to stop the deobfustication being picked apart.

The simplest is probably streaming it, with the swf requesting the urls from php or something.

divillysausages
  • 7,883
  • 3
  • 25
  • 39