I have a list of audios and two types of users. Some can [play] and others [play and download].
The audios charge them dynamically after a query to the BD and I show them with the following code:
<audio controls="controls" controlsList="nodownload">
<source src="~/2018/05/11/test.mp3" type="audio/mpeg" />
Your browser does not support the audio element.
</audio>
When the user can download the audio too, I just remove controlsList="nodownload" .
The user who can only play the audios can see the source code of the page and get the audio link src="/ 2018/05/11 / test.mp3 , open it and download it or with the developer tools remove the controlsList .
Everywhere I see it this is wrong.
I have been researching and should encrypt my audio url so that the user can not access the file directly
Has anyone had a similar need, some advice or recommendation?
I can not think of how to solve this, my only light is the following link: link but I do not understand how to implement that and if it is similar in audios.