0

I was trying to hide the Download option from my controls list even if it means hiding the whole controls and design a new one (which I did) I did this using js

vid.controls = false;

it Works fine But the user can just open divTools and just write controls in my <video< tag and delete the

controlslist="nodownload"

and just download the video that easily I need any method to stop this I have worked so hard for those videos I do not want them to be leaked

thanks in advance

2 Answers2

0

The best way to disable the download button for the video element is to use a blob URL. You can read more about that here:

Users won't be able to download blob URLs created from media sources. This is what youtube does for example. But of course, the user can just open the network tab and grab the URL to the video to download it that way. There is nothing to prevent that.

duncte123
  • 15
  • 6
  • i am already using it with php – Badar Al Naaimi Jun 07 '23 at 14:17
  • @BadarAlNaaimi with php you can only make it more difficult for a user to download the video, but not impossible. In theory, a user could even dump their RAM to get the raw video data as it is sent to their computer in the browser. – duncte123 Jun 07 '23 at 14:19
  • how can i get more help? I am ready to pay because if this videos get leaked I am loosing money and effort in the same time – Badar Al Naaimi Jun 07 '23 at 15:46
  • @BadarAlNaaimi If you broadcast (serve) the video (such that someone can see it) then it can be copied (low tech, use a camera to record the screen). The ONLY way to prevent copying is to not broadcast the video. – Blindman67 Jun 07 '23 at 21:40
  • No I am just posting the videos and they can see it when ever they want but as i menthid before I do not want them to open devTools and just write controls and delete controlslist="nodownload" from the – Badar Al Naaimi Jun 09 '23 at 10:27
0

Like the friends above say, you can’t prevent downloads from tech sassy users because once they enable network monitoring they’ll have the URL to any stream; that’s how I catch the url’s of HLS streams; as an example! :)

But what you can do is have a watermark across your video to discourage duplication. Here’s a relevant post that demonstrates the addition of a watermark programmatically using a 3rd party library:

How to add watermark in <iframe> video html5

Can we add logo to HTML5 Video?

...although I would opt for ready-made software for a job as boring as this.

The other idea I’d like to suggest is to play the videos in a HTML canvas element to make things harder/more technical, for users to pinch it:

html5: display video inside canvas

And if you wanna go really paranoid you can add an iframe to your page and set its srcdoc with a canvas that plays the video! How's that for complexity? :)

Good luck.