tags:

views:

19

answers:

1

I'm trying to create a mobile ready audio player. However, I'm wondering if it's possible to "mask" the src so that a user couldn't view source and download the mp3. I'm definitely a n00b, so any simple direction would be extremely helpful (IE - use 'x' to do 'y'). I don't necessarily need code examples. Thanks!

Current:

<audio src="unreleased_track01mp3">
...
</audio>

What I'd like:

<audio src="01238134781239871">
...
</audio>
+2  A: 

No.

You could attempt to stream the audio, but if you want to play a specific file, the user will always be able to download it if the user is able to listen to it.

Jani Hartikainen
obfuscation is just obfuscation, if user wants it bad enough they can find it
Chris
obfuscation would probably be good enough. Could this be accomplished in JS?
jordancedartree
Obfuscation would probably be best done either by renaming the files into random names or by using server-side url rewriting (mod_rewrite, PHP, whatever). You could also dynamically create the audio tag with JS which might make it a bit trickier to directly find the code.
Jani Hartikainen
Thanks Jani - that's great!
jordancedartree