Displaying a Placeholder Image
The poster attribute presents the user with a placeholder image. This image will be shown in place of the video until the user starts playback.
<!DOCTYPE HTML>
<html>
<head>
<title>Example</title>
</head>
<body>
<video width="360" height="240" src="yourVideo.webm" controls
preload="none" poster="http://java2s.com/Book/HTML-CSSImages/star.png"> Video cannot be displayed
</video>
<img src="http://java2s.com/Book/HTML-CSSImages/star.png" />
</body>
</html>
Home
HTML CSS Book
HTML
HTML CSS Book
HTML
video:
- Using the video Element
- Preloading the Video
- Displaying a Placeholder Image
- Setting the Video Size
- Specifying the Video Source (and Format)
- The source Element
- The track Element
Related: