Use the tag video to properly add videos to your page
source type=”video/webm” src=”videos/video.webm” – link to your video in a modern webm format that is more optimized for the web. You can convert your mp4 by following the link – https://convertio.co/mp4-webm/
<video poster="img/video-image.jpg" controls preload="metadata"> <source type="video/webm" src="videos/video.webm"> <source type="video/mp4" src="videos/video.mp4"> </video>
More about tags
src – specifies the path to the video being played.
width – Specifies the width of the area for video playback.
height – Sets the height of the area for playing the video.
muted – Turns off audio.
autoplay – Video starts playing automatically after the page is loaded.
controls – adds a control panel to the video.
loop – repeats video playback from the beginning after it ends.
poster – Specifies the address of the image to be displayed,
until the video is available or playing.
preload – Used to download video along with web page download.
– none: Specifies that the video should not be preloaded.
– metadata: specifies that video metadata is preloaded
(for example, length).
– auto: indicates that the entire video file can be downloaded,
even if the user should not use it.
– empty string: synonymous with auto.