i want to disable download video link from control panel of video tag.
     <video oncontextmenu="return false;" id="myVideo" autoplay controls>
        <source src="uploads/videos/<?php echo $vid;?>" type="video/mp4">
    </video>
That's very easy it seems that your using the HTML 5 Video and using your sample above, below is the code:
<video oncontextmenu="return false;" id="myVideo" autoplay controls controlsList="nodownload">
    <source src="uploads/videos/<?php echo $vid;?>" type="video/mp4">
</video>
Just add controlsList="nodownload" in your video tag.
Add below style to disable download link in video tag.
For Example:
<!DOCTYPE html>
<html>
<head>
<style>
   video::-internal-media-controls-download-button {
    display:none;
   }
   video::-webkit-media-controls-enclosure {
        overflow:hidden;
   }
   video::-webkit-media-controls-panel {
        width: calc(100% + 30px); 
   }
</style>
</head>
<body>
<video width="320" height="240" controls>
  <source src="add your video url" type="video/mp4">
</video>
</body>
</html>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With