防止视频下载应用程序从React网站下载视频

huangapple go评论92阅读模式
英文:

Preventing video downloading apps from downloading a video from a react website

问题

我正在尝试构建一个可以流式播放视频的网站,但希望阻止视频的下载。这些视频存储在AWS中,并且在存储桶上设置了权限,因此不能直接访问,只能通过Web服务器访问,这一切都正常工作。我还禁用了右键下载功能,适用于所有浏览器和移动视图。然而,如果我使用像Play商店中的Video Downloader这样的应用程序,该应用程序内部有一个浏览器,如果我在应用程序浏览器中访问网站,我仍然可以下载内容。

我已经使用了下面的代码来禁用下载按钮:

config={{
  file: {
    attributes: { controlsList: 'nodownload' },
  },
}}
onContextMenu={(e) => e.preventDefault()}

但这并不能阻止视频下载应用程序在其自己的浏览器中下载底层视频。有什么建议可以防止这种情况发生吗?

英文:

I am trying to build a site which streams videos but am looking to prevent any download of the video
The videos are stored in AWS and permission on the bucket so cannot be accessed directly but only via the webserver and this all works okay
I have also disabled the right click download as well , and works for all browsers and on mobile view.
However if I use a an app like Video Downloader (from the playstore), this then has a browser within the app and if I go to the site via in the app browser I can download the content

I have used the below bit of code which disabled the download button

                  config={{
                            file: {
                              attributes: { controlsList: 'nodownload' },
                            },
                          }}
                          onContextMenu={(e) => e.preventDefault() 

But it does not prevent a video downloader app to download the underlying video within its own browser.
Any suggestions on how I can prevent this?

答案1

得分: 1

I am trying to build a site which streams videos but am looking to prevent any download of the video

你不能。这是一个根本性的问题。你如何把东西发送给别人,同时又防止他们接收它呢?

The videos are stored in AWS and permission on the bucket so cannot be accessed directly but only via the webserver

所以,在这种情况下,你的网络服务器是访问存储桶的通道,不会提供额外的安全性...只会浪费金钱和资源。

I have also disabled the right-click download as well

这不会为你的应用程序增加任何安全性,不值得做。

But it does not prevent a video downloader app to download the underlying video within its own browser. Any suggestions on how I can prevent this?

你无法阻止某人下载视频。最多,你可以使用数字版权管理(DRM)解决方案,使视频在特定环境之外无法播放,但这会带来众多的兼容性问题和额外的成本。

参考:https://www.vdocipher.com/blog/2018/11/encrypted-media-extensions-eme/

英文:

> I am trying to build a site which streams videos but am looking to prevent any download of the video

You can't. It's a fundamental problem. How can you send something to someone and also prevent them from receiving it at the same time?

> The videos are stored in AWS and permission on the bucket so cannot be accessed directly but only via the webserver

So, in that case your web server is the doorway to your bucket, giving you no additional security... only costing you money and wasting resources.

> I have also disabled the right click download as well

This adds zero security to your application and isn't worth doing.

> But it does not prevent a video downloader app to download the underlying video within its own browser. Any suggestions on how I can prevent this?

You can't prevent someone downloading video. At best you can use a DRM solution to make the video unplayable outside of specific contexts, but it's a myriad of compatibility problems and extra cost.

See also: https://www.vdocipher.com/blog/2018/11/encrypted-media-extensions-eme/

huangapple
  • 本文由 发表于 2023年6月6日 04:52:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/76409925.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定