Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to hide the source of an audio tag in html5?

I don't want to let my visitors download or see the path to my audio files. Is there a way to block this so the user doesn't see it?

like image 660
Roozbeh15 Avatar asked Jan 30 '26 14:01

Roozbeh15


1 Answers

I ended up using a PHP file to fetch the mp3 file. This way the path to the actual file remains hidden.

I understand that there's no way to disable tech savy people from downloading an audio file as some people mentioned, they can simply redirect the output of their sound card to a file.

Dealing with the headers was a little bit of a pain. You have to make sure you accept ranges, especially for Chrome.

like image 148
Roozbeh15 Avatar answered Feb 01 '26 08:02

Roozbeh15



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!