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

html+css+js to realize the function of photo preview and upload picture

Preface: When we are making web pages, we often n...

Implementing calculator functions with WeChat applet

This article is a simple calculator written using...

Q&A: Differences between XML and HTML

Q: I don’t know what is the difference between xml...

MySQL 5.7.21 installation and configuration tutorial under Window10

This article records the installation and configu...

Login interface implemented by html+css3

Achieve results First use HTML to build a basic f...

JavaScript implements password box verification information

This article example shares the specific code of ...

How React Hooks Work

Table of contents 1. React Hooks vs. Pure Functio...

How to configure /var/log/messages in Ubuntu system log

1. Problem Description Today I need to check the ...

Native js to implement drop-down menu

Drop-down menus are also very common in real life...

How to set up virtual directories and configure virtual paths in Tomcat 7.0

Tomcat7.0 sets virtual directory (1) Currently, o...

Specific operations of MYSQL scheduled clearing of backup data

1|0 Background Due to project requirements, each ...

VMware Workstation installation Linux system

From getting started to becoming a novice, the Li...

5 Ways to Clear or Delete Large File Contents in Linux

Sometimes, while working with files in the Linux ...

What is the function and writing order of the a tag pseudo class

The role of the a tag pseudo-class: ":link&qu...

In-depth understanding of the seven communication methods of Vue components

Table of contents 1. props/$emit Introduction Cod...