When you right click on the video on the page, the video I added can be downloaded. What change do I make in the code below to prevent the video from downloading?
<div class="video" style="padding-top:30px">
<source data-srcset="[[*cover:pthumb=`&w=1290&h=600&zc=1&aoe=1&far=1&f=webp`]]" srcset="[[*cover:pthumb=`&w=1290&h=600&zc=1&aoe =1&far=1&f=webp`]]]" type="image/webp" />
<img class="lazy" data-src="[[*cover:pthumb=`&w=1290&h=600&zc=1&aoe=1&far=1&f=webp`]]" src="[[*cover:pthumb=`&w= 1290&h=600&zc=1&aoe=1&far=1&f=webp`]]" alt="[[*pagetitle]]" title="[[*longtitle]]" onerror="this.style.display = 'none'"/>
<a class="video_btn" href="#">
<video class="video_content" src="/template/video/NBE1.mp4" preload="auto"></video>
You can make it a lot harder to download though.
Frankly, it’s not entirely possible to prevent video downloading, but I just want the save option to disappear when I hover over the video.
What can I do to link from youtube in the code I mentioned above?
Your code above loads the actual video file which is located in your server. This is different from displaying a video that is actually located on YouTube.
If you decide to go the YT route, or vimeo, they do the work of making it difficult to download the video. For average folks anyway. But even so there are dozens of websites where anyone can drop a YouTube video URL and it will scoop up the video file and download to your computer. (Sometimes along with unwelcome files.)
So you might want to try what is explained in the link I posted above, where you host the file yourself and then basically copy the process YouTube uses to make it difficult to download.
Maybe if you describe your use case we could better understand the needs/reasons to try to keep them un-downloadable, and suggest better solutions.
controlslist attribute on
<video> has a
nodownload option, maybe that’s what you’re looking for. It seems non-standard and only supported in Chrome, though.
My aim is to publish the video of the product under the relevant product title.
I want no video download on right click.
Ok. But can you say why it’s important to prevent downloading? Is there something in the video that should be available only to certain people? Or are the videos something that might be used by a competitor?