Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
389 views
in Technique[技术] by (71.8m points)

php - Protect audio file from being downloaded while still being playable through JQuery JPlayer

I have audio files saved in a folder on my server. They are called by JQuery JPlayer to be played. 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 the files from being downloadable, but still allow JPlayer to play them. Is this possible?

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It's impossible to stop a savvy user stealing your media. But if you like, you could

  • use oAuth to govern access to the media resource
  • teach your server to only respond to media requests that contain "special" HTTP Headers, Cookies etc.
  • use DRM (washes mouth out)
  • some other URL obfuscating/expiring method you dream up..

To save time, i suggest you accept whatever you publish can be copied / taken. So, why not publish

  • a sample snippet (e.g. the first minute)
  • A lower-bitrate / mono taster version

Recently, a widget allowing you to stream Paul McCartney's new album was published in the Guardian.. how this is "secure" i don't know, I opened Chrome Dev Tools Network tab and helped myself to anything "audio/mpeg"!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...