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:

ValueDescription
noneThe video will not be loaded until the user starts playback.
metadataOnly the metadata for the video (width, height, first frame, duration, and other such information) should be loaded.
autodownload 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>
  
Click to view this demo.
Home 
  HTML CSS Book 
    HTML  

video:
  1. Using the video Element
  2. Preloading the Video
  3. Displaying a Placeholder Image
  4. Setting the Video Size
  5. Specifying the Video Source (and Format)
  6. The source Element
  7. The track Element
Related: