Videos stored within your KnowledgeOwl Files storage play with an HTML5 video player. The HTML5 video player allows readers to download the video using a control in the triple dot menu in the lower right:
Sample HTML5 video player with controls displayed, including the Download controlIf your videos are proprietary or secure, you may want to disable video download across your knowledge base using some custom code.
To disable video downloads in your knowledge base:
- Go to Customize > Style (HTML & CSS). The Style Settings page opens.
- In the Customize HTML, CSS, and JS section, select Custom HTML.
- Select Body from the Select HTML section to edit dropdown.
- Copy the code below and paste it into the bottom of the Body editor:
<script type="text/javascript"> /* Disable video downloads */ $(function(){ $("video").each( function( index, element ){ /* Remove Download control from HTML5 video player */ $( this ).attr("controlsList", "nodownload"); /* Disable right-click context menu for videos */ $( this ).attr("oncontextmenu", "return false;"); }); }); </script> - The script will do two things:
- Row 6 will remove the Download option from the HTML5 video player.
- Row 8 will disable the right-click context menu for videos, so readers can't right-click and select Save video as.... If you don't need to be this heavy-handed with your videos, you can remove or comment out row 8.
- Be sure to Save your changes.
The built-in HTML5 player controls will now only show the Playback speed and Picture in picture controls, and the right-click context menu will be disabled for all videos.