Reputation: 1952
I want to play mp3 file (using HTML, JS, jQuery, PHP) but without the possibility that the visitor in the website will be able to get the address of the file and could therefore download it.
What can I do?
Thanks
Upvotes: 0
Views: 884
Reputation: 4872
If you're only using those technologies, the link will probably always have to be visible, so this isn't really possible.
Jplayer is one option you have that I can think of off the top of my head, if the user has a minimal knowledge about stuff like viewing source, he'll still be able to find the mp3 link, But It'll still keep the majority of people at bay though as they won't know where to look.
If you REALLY want to keep it hidden from the user, you could even go as far as embedding the mp3 file in a flash application. This is particularly nasty though, but it would get you what sounds like your desired result.
Upvotes: 1
Reputation: 5540
You could store them in a Flash file or something else, or even stream them from an Icecast server, if you just want them to play back
Upvotes: 0
Reputation: 7688
In short: You can't. Somehow you have to submit the files URL and a user with some background knowledge will use extensions like Firebug to view all made HTTP requests.
Thinking this further: As long as the user is able to listen to the sound file, it somehow has to be sent over the wire. And once it has arrived on the client side you have literally now control what the user does with it.
Upvotes: 3