Disable right click on HTML5 video

Product

WonderPlugin Gallery

Question:

I need to deactivate the functionality which occurs when you right click on a video. It gives you the option to ‘download video’ I need to turn this off for copyright reasons. I know there are always ways and means to download video content if you want it badly enough, but having a download option when you right click is something I really need to turn off!

Answer:

The right click menu is a function of the web browser. To disable it, in WonderPlugin Gallery plugin, edit the gallery, in step 3 Options tab, Advanced Options, add the following code to Custom JavaScript input box:

jQuery(document).ready(function(){
   jQuery('body').on('contextmenu', 'video', function() { return false; });
});