HTML page native VIDEO tag hides the download button function

HTML page native VIDEO tag hides the download button function

When writing a web project, I encountered an introduction page with a separate introduction video. There was only this short video, so no video component was used. So I wanted to solve the problem by using the native video tag.

Although the introduction video is free, I don’t want a download button or the ability to save the video, so I found a way to make it look like there is no download function and took notes.

If you want to hide the download button above, three styles are enough. Let’s paste the code directly without further ado:

video::-internal-media-controls-download-button {
    display:none;
}
video::-webkit-media-controls-enclosure {
    overflow:hidden;
}
video::-webkit-media-controls-panel {
    width: calc(100% + 50px); 
}

To put it simply, it moves the download button outside the window, but it took me a long time to find these CSS! !

This method cannot really prevent the download of videos. "Attentive" users can still find the loaded video files in the cache files, so as the title says, it is just hidden.

To truly prevent video downloads, the video address must be encrypted and verified on the server side.

Summarize

The above is the editor's introduction to the HTML page native VIDEO tag hiding the download button function. I hope it will be helpful to everyone. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

<<:  Solution to the problem of child element margin-top causing parent element to move

>>:  Query the data of the day before the current time interval in MySQL

Recommend

Kali Linux Vmware virtual machine installation (illustration and text)

Preparation: 1. Install VMware workstation softwa...

MYSQL stored procedures, that is, a summary of common logical knowledge points

Mysql stored procedure 1. Create stored procedure...

Example code for text origami effect using CSS3

Preface This article mainly shares with you an ex...

Simple implementation method of vue3 source code analysis

Table of contents Preface 🍹Preparation 🍲vue3 usag...

How to quickly use mysqlreplicate to build MySQL master-slave

Introduction The mysql-utilities toolset is a col...

CSS code for arranging photos in Moments

First, you can open Moments and observe several l...

Steps to install superset under win10 system

Superset is a lightweight self-service BI framewo...

Pure CSS code to achieve flow and dynamic line effects

Ideas: An outer box sets the background; an inner...

Several ways to implement inheritance in JavaScript

Table of contents Structural inheritance (impleme...

Detailed explanation of the role and principle of key in Vue

Table of contents 1. Let’s start with the conclus...

Solution to BT Baota Panel php7.3 and php7.4 not supporting ZipArchive

The solution to the problem that the PHP7.3 versi...

CSS3 realizes text relief effect, engraving effect, flame text

To achieve this effect, you must first know a pro...

Web page custom selection box Select

Everyone may be familiar with the select drop-dow...