Search
 
SCRIPT & CODE EXAMPLE
 

HTML

html video disable right click

<video oncontextmenu="return false;" id="my-video-player" width="854" height="480" controls autoplay>
  <source src="https://example.com/link-to-my-video.mp4" type="video/mp4">
</video>
Comment

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>
Comment

PREVIOUS NEXT
Code Example
Html :: making rectangle in css 
Html :: html no drag image 
Html :: opening email on clicking email link 
Html :: accept only numbers in textbox 
Html :: how to center an image in markdown 
Html :: Checkbox checked border square CSS 
Html :: GEThttp://127.0.0.1:5500/favicon.ico error 
Html :: how to navigate to another page in html 
Html :: create a table in html with 3 rows and 4 columns 
Html :: m3u8 ffmpeg download 
Html :: html align right 
Html :: nuxt cursor focus 
Html :: <meta name="viewport" content="width=device-width, initial-scale=1.0" 
Html :: BootStrap 4.6,BootStrap 5.2 CDN Css & JS & Bundle 
Html :: e.target.value svelte 
Html :: html input clear history 
Html :: html not displaying 
Html :: show location on google map using latitude and longitude web html 
Html :: html submit button text 
Html :: html dot 
Html :: remove underline from a tag 
Html :: click on div with class javascript 
Html :: pyscript python html 
Html :: html phone call 
Html :: html checkbox 
Html :: add delay to hrefs 
Html :: stop website from overscrolling 
Html :: button disabled ionic 
Html :: sign up form html 
Html :: check if select option is selected javascript 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =