How to mask an embedded audio file from being seen and downloaded from dev tools?

133 Views Asked by At

For a small website I am creating, I have an embedded piece of audio which plays on the landing screen, the current method I am using is just by simply embedding it via standard html:

<audio autoplay loop id="player" src="audio1.wav"></audio>

The issue with this method is it is possible to find and download the src when looking in devtools. I want to mask the src so nobody can find it and download it, as the audio is up for sale/copyrighted.

Is there a method where the original .wav audio file cannot be traced back and downloaded?

1

There are 1 best solutions below

0
On

There's no real way to prevent someone from obtaining the audio in one way or another if they're determined enough. However, a few alternatives are listed here, with some more concrete code examples here. Consider only playing a small sampler to prevent someone from getting the entire audio clip.