tags:

views:

169

answers:

4

Hi all,

I'm looking to build a jukebox and I am wondering how one would secure songs that are in <audio> tags with HTML 5. I don't want people to be able to download the song, but I'd like to stream it via those <audio> tags. Any suggestions?

+3  A: 

Whatever you give people to listen via a stream can be saved to disk too.

Joey
It's harder to do in flash. You can't just look at the source and find the mp3 file in the URL.
Matt
You can still record it, though. As long as anything DRM'ed can be played back it can be saved without the restrictions too. Fact of life (and of technology).
Joey
Yah my goal is to defer like 95% of people from trying it.. that's all.
Matt
I don't think it's any harder in Flash. Switch to program that records audio being played back (there's a million free ones), hit "record" button. Actually I think that's even easier than digging through an HTML for a URL. :-)
Ken
+3  A: 

you could check referer, use some hashing mechanism (unique ID) to verify the streaming player is your jukebox, not the stream saver etc.

BUT: whatever you do, some people will figure it out (or using the last resort - catching the whole stream, following on what kind of data your jukebox sends etc.)

dusoft
This is a great idea! Yah. I'm not looking to make it more secure than like youtube or anything. I just want to defer like 95% of people from downloading the music.
Matt
yup, so come up with some hashing unique ID mechanism that both your server and your jukebox player would understand. maybe use mp3 song hash + some secret data.
dusoft
Do you know how you would implement this? I'm trying to think.. the jukebox would be loaded on the client's side - so he'll see the UID and just be able to type that right in to look like the jukebox. I'm a security novice by the way.
Matt
Disregard half of the last statement.. I didn't see your most recent post..
Matt
Wouldn't the client have access to mp3 song hash + some secret data that he could just send back to the server via play.php?hash=... ??
Matt
no, because your player could check on each new song via AJAX.but if somebody understands the JS code or somebody traces network communication between the server and the client, then they can find what's going on and the IDs.
dusoft
Ah okay. Yah. That's what I was wondering. Okay. So it's only as secure as how much JS they know/understand. I guess if someone manages to read encrypted javascript, they deserve the song. Thanks!
Matt
+1  A: 

This is not possible. In order for the client computer to be able to play the song, the song has to be transferred there. Period.

Jörg W Mittag
A: 

Did you ever figure out how to do this? dusoft's solution was rather cryptic to me, I'm not great with this stuff.

Jay