Protect your audio file from downloading while it plays through jQuery JPlayer

I have audio files stored in a folder on my server. They are called by jQuery JPlayer to play. However, if a person looks at the source of the page, they can find the location of the file and simply download it. I want to protect files from downloading, but still allow them to play. Is it possible?

I tried to strip the folder with .htaccess, as well as the password protecting this folder, but this prevents JPlayer from being able to play files.

+4
source share
3 answers

It is not possible to stop an experienced user stealing your media. But if you want, you could

  • Use oAuth to control access to the media resource.
  • teach your server to respond only to multimedia requests containing "special" HTTP headers, cookies, etc.
  • use DRM (wash your mouth)
  • some other URL obfuscation / expiration method you are dreaming of.

To save time, I suggest you accept what you publish, you can copy / accept. So why not post

  • fragment example (e.g. first minute)
  • Low Bitrate / Monotest Version

Recently, a widget allowing you to transfer a new Paul McCartney album was published on the Guardian .. how safe it is. I know I opened the Chrome Dev Tools Network tab and helped myself with anything: "audio / mpeg"!

+2
source

I found for you a possible answer using PHP: Solution using PHP sessions

This is a long thread, but the code there will help.

+1
source

You should know (just in case if this is not the case) that if someone can play the file in their browser, there is nothing to stop them from playing the file and using the recording software to record sound.

0
source

Source: https://habr.com/ru/post/1395720/


All Articles