close
Cimatti Consulting

Most popular searches

Can the “Save video as” and “Copy video URL” options be disabled when I right-click on an HTML video?

No. You cannot disable individual right-click options.

However, you can disable the entire right-click on a specific piece of content by using oncontextmenu=”return false;”

If our video is embedded in the code like this:

<video width=”1920″ height=”1080″ id=”idVideo”>
<source src=”video-cimatti.mp4″ type=”video/mp4″>
  </video>

The javascript/jQuery function that disables the right button will be the following:

jQuery(document).ready(function(){
  jQuery(‘#idVideo’).bind(‘contextmenu’,function() { return false; });
});

How do we disable the right button of a video inside a fancybox?

To disable a video inside a fancybox, we can bind the #fancybox-wrap ID

jQuery(‘#fancybox-wrap’).bind(‘contextmenu’, function() { return false; });

This will block the right button on all fancyboxes and not just those containing a video.


Comments are closed.

Our skills

Industry
food
construction
editorial
electronics

manufacture
mechanical
medical
packaging
Craft
ceramic
food
fashion
Commerce
distributors
resellers
shops
Tourism
hotels
farmhouses
accommodation facilities
Professionals
consultants
professional studios

Siamo in Romagna, lavoriamo con tutto il mondo

Ravenna
Faenza
Lugo
Bagnacavallo
Castel Bolognese
Ravenna

Emilia Romagna
Forlì
Imola
Cesena
Rimini

Italia
Bologna
Milano
Ferrara
Firenze
Palermo
Roma
Torino

Worldwide
Canada
UK
USA