Block Video Downloads

in Download Manager Free

Viewing 6 posts - 1 through 6 (of 6 total)
May 19, 2021 at 8:02 pm
#153908
Participant
P N
OP

On the plugin description, it says “Video file download protection, allow visitors to play but block download.” On our site, we have removed the download button and information from the video player template so that it only shows the video. However, when someone right clicks on the video (an uploaded mp4 file), they can still save the video. How can I block visitors from downloading videos, while still allowing visitors to play them?

Previously, “controlsList=’nodownload'” was added to the line of html in class.package.php where the video player is initialized. However, this does not prevent download of the video when someone right clicks on it.

May 20, 2021 at 5:48 am
#153925
Spectator
Humayon

Hello @pn2021,
Welcome to the support forum and hope you are well.
In order to disable video download please add the below code in the download-manager/assets/js/front.js file.

jQuery(document).ready(function () {
  jQuery("#__wpdm_videoplayer").bind("contextmenu", function () {
    return false;
  });
  jQuery("#__wpdm_videoplayer").attr("controlsList", "nodownload");
});

Let me know if you need further assistance regarding this matter and will gladly help you.
With Regards

May 20, 2021 at 7:23 pm
#153996
Participant
P N
OP

Hi Humayon, thank you very much for your help and your prompt reply. I added that code to the end of the front.js file, but I could still download videos by right clicking them after making that change. Is there a specific place where that code needs to be added? Is there anything else I need to do?

May 21, 2021 at 5:51 am
#154003
Spectator
Humayon

Hello @pn2021,
Sorry to hear that. But, it’s working fine in our testing.
Have you cleared your browser and website caches after applying the above-mentioned code?
If, still the problem persists then please share your temporary admin login info in a private reply so that I can debug it properly.
Also, don’t forget to share the relevant package/file URL as well.
Thank you.

May 24, 2021 at 7:57 pm
#154132
Participant
P N
OP

I tried clearing my cache in a different way and it is now working! Thank you so much for your speedy help!

May 25, 2021 at 6:22 am
#154147
Spectator
Humayon

Hi @pn2021,
You are welcome.
If you found my support helpful, could you leave your valuable review here?
Your rating keeps us inspired ❤️
Best Regards

Viewing 6 posts - 1 through 6 (of 6 total)

The topic "Block Video Downloads" is closed to new replies.