WordPress.org

Support

Support » Plugins and Hacks » Preventing download of video

Preventing download of video

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Kyle Gilman

    @kylegilman

    It’s difficult to prevent users from saving your videos once you put them online. You could disable right-clicking on video elements, which will dissuade most casual downloaders.

    Try this. In js/kgvid_video_embed.js find the line

    function kgvid_setup_video(id) {

    and paste this code directly below it

    jQuery('.kgvid_wrapper').bind('contextmenu', function(e) {
       return false;
    });

    Thanks for the response. This is my first try at modifying a plug in so I might have done something wrong. I did as you asked and saw no change at all.

    I’ll tell you what I did step by step so you can perhaps spot a mistake I made. I copied the original file to a folder I created called copy. I then opened the js/kgvid_video_embed.js file using the code editor and found the line: function kgvid_setup_video(id) {

    I copied your code piece and pasted it in the line directly after the line you specified. I saved the file, and then went to the wordpress editor and made a new post with a video.

    I saw no change.

    I then removed the line and saved so I am back to normal. Again, no change.

    Did I do things correctly and if so, is this probably impossible? I do think simply turning off the right click is enough, but also, I have seen video players that do not allow copying. There must be a way to turn off the right click, but your suggestion seemed not to do that.

    Thanks again, and I will try anything you suggest.

    I found another plug in that hides the download link. I do like the ease of use in your plug in but this other one serves me better right now.
    Thank you.

    Plugin Author Kyle Gilman

    @kylegilman

    That was the right way to modify the plugin. You probably didn’t see a change because your browser had cached the old js file. If you still want to try it out, make the edit and then test it in a browser that’s never been to your website. Or hit shift-reload a bunch of times. You can tell Chrome not to cache js using these instructions: http://stackoverflow.com/questions/5690269/disabling-chrome-cache-for-website-development

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Preventing download of video’ is closed to new replies.