Preloading the Video
The preload attribute tells the browser whether to preload the video.
The allowed values for this attribute are described in the following table:
Value | Description |
---|---|
none | The video will not be loaded until the user starts playback. |
metadata | Only the metadata for the video (width, height, first frame, duration, and other such information) should be loaded. |
auto | download the video as soon as possible. The browser is free to ignore this request. (default) |
<!DOCTYPE HTML>
<html>
<head>
<title>Example</title>
</head>
<body>
<video width="360" height="240" src="yourVideo.webm" controls
preload="none" muted> Video cannot be displayed
</video>
<video width="360" height="240" src="yourVideo.webm" controls
preload="metadata" muted> Video cannot be displayed
</video>
</body>
</html>