Video poster attribute
Definition and usage
poster
The attribute sets or returns the value of the video poster attribute.
poster
The attribute specifies the image to be displayed when the video is downloaded or before the user clicks the play button. If not set, the first frame of the video will be used.
Example
Example 1
Change the cover image of the video:
document.getElementById("myVideo").poster = "/images/w3logo.png";
Example 1
Get the URL of the cover image:
var x = document.getElementById("myVideo").poster;
Syntax
Return poster attribute:
videoObject.poster
Set poster attribute:
videoObject.poster = URL
Attribute value
Value | Description |
---|---|
URL |
Specify the URL of the image file. Possible values:
|
Detalye ng Teknolohiya
Ibalik na Halaga: | String na halaga, naglalarawan ng URL ng pabalikat na imahe. Ibabalik ang buong URL, kasama ang protocol ( tulad ng http://). |
---|
Suporta ng Browser
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Suporta | 9.0 | Suporta | Suporta | Suporta |
Sanggunian ng Pahina
HTML Taglapag:HTML <video> poster Atribute