Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

how to disable right clicking on video using html

To disable right clicking on your video in html
<--- Add the line below to your video tag --->
oncontextmenu="return false;"
  
<-- For Example -->
  
<video id="myVideo" width="350" height="500" oncontextmenu="return false;" controls autoplay>
  <source src="video.mp4" type="video/mp4">
</video>
  
<-- You can also remove the download option by adding the line below -->
controlsList="nodownload"
  
  <-- For Example -->
    
<video id="myVideo" width="350" height="500" oncontextmenu="return false;" controlsList="nodownload" controls autoplay>
  <source src="video.mp4" type="video/mp4">
</video>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #disable #clicking #video #html
ADD COMMENT
Topic
Name
2+4 =