• Hello – I’m trying to disable the html5 contextual menu so that my videos cannot be saved. I contacted the theme developer who referred me here as he said it’s a wp issue. I had googled and come up with this information, but it didn’t seem to work. I was told to put this code:

    $(document).ready(function() {
        $("video").bind("contextmenu",function(){
            return false;
            });
     } );

    In the header before the </head>. Unfortunately it didn’t work.

    (Very possibly I’m doing something wrong or not adding the proper wrapper, etc, I’m not a coder, I’ve only hacked together one theme and customized another.)

    Any help is appreciated. Thank you.

Viewing 1 replies (of 1 total)
  • Moderator Marius L. J.

    (@clorith)

    Hi,

    Most likely this is failing because of the $(document) part, you’ll want to trigger it slightly differently ??

    Try the following instead:

    <script type="text/javascript">
    jQuery(document).ready(function ($) {
      $("video").bind( 'contextmenu', function() { return false; } );
    });
    </script>

    You should be able to put that anywhere on your site, but the ideal location is either right before the </head> tag, or right before the </body> tag

Viewing 1 replies (of 1 total)
  • The topic ‘How To Disable HTML5 Video Contextual Download’ is closed to new replies.