How to remove download option from video tag in | Html
To remove the download option
<-- Add the line below to your video tag -->
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>
You can also 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>
The given code is meant to remove the download option and disable right-clicking on a video element in HTML. Let's break down the code: 1. To remove the download option from the video player, the `controlsList="nodownload"` attribute is added to the video tag. This attribute specifies that the default set of controls should not include a download button. This way, users won't be able to download the video using the browser's default download option. 2. To disable the right-click context menu on the video player, the `oncontextmenu="return false;"` attribute is added to the video tag. This JavaScript event handler prevents the default context menu (usually triggered by right-clicking) from appearing on the video player. Here's an example showing both of these modifications applied to a video element: ```html ``` In this example, the video element has the download option removed and right-click context menu disabled. This ensures that users cannot download the video through the browser's controls or by right-clicking on the video player.