How to disable video/audio downloading in web pages?

本小妞迷上赌 提交于 2019-12-05 06:23:05

问题


I have a website that I put my videos/audios on it. I use HTML5 and tag to show videos. But videos/audios can be downloaded if client opens view source page and then copy the file address. How can I disable downloading these files, I just want client to see videos/hear audios in the web page.

Many online video/audio services like Youtube disabled downloading videos by this way. How they did that? What is a working way to disable, or at least make this progress much harder?


回答1:


Youtube encodes their video into the MPEG-DASH format, which plays back through byte streams via the browser's implementation of the Media Source Extensions API. See See more on Wikipedia.

You can do the same by encoding your video into MPEG-DASH files, then playing it back in your code through a library like dash.js. Watch how the dash.js player works live by checking out the DASH Reference Client.

I've encoded MPEG-DASH video using Sorenson Squeeze, but there are other encoders you could use.

And just to clarify... this will make downloading more difficult... but will NOT provide a real DRM solution. For that you need to check out EME.




回答2:


MPEG-DASH seems like a nice solution but is definitely not perfect. There are many ways to bypass this and still being able to download the video. On the other hand putting a lot of effort in protection might not be worth it since people can always make screen recordings etc.

But if you still want to go for a more secure option you can try using Encrypted Media Extensions i.e. with Amazon s3 cloud.



来源:https://stackoverflow.com/questions/36987661/how-to-disable-video-audio-downloading-in-web-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!