Nick
Nick

Reputation: 241

Hide Properly Download Button

I have an audio playing site and I want to prevent the users from downloading the sounds from the HTML audio element download button. So I wrote:

<audio src="sound.mp3" controls controlsList="nodownload"></audio>

It works fine but I can delete the controlsList="nodownload" from inspect element and then the download-button appears.

Any ideas of how to deal with it?

Upvotes: 1

Views: 1029

Answers (2)

Maxime
Maxime

Reputation: 2270

You cannot stop a user from downloading a file if you give him access to. When the user is reading the audio file on his computer, the computer is actually downloading the file in his RAM while playing it. Nothing can prevent the user from simply storing this data in his hard-drive.

The only way to stop the user from being able to download the file is by not letting him play it.

You can use DRM-wrapped content on the web. Here is a list of the web browsers supporting DRM content.

Upvotes: 1

alen
alen

Reputation: 276

Everything you hear or you see on your browser is downloaded from different sources. How browser can write some text or play music if its protected by server/by you? Even if browser protect all these things from you for example if theres no way to download Rihannas new song from SoundCloud, you can allways record it. Sorry, but you can do nothing about that.

Upvotes: 0

Related Questions