Change the poster image of a video:
The poster property sets or returns the value of the poster attribute of a video.
The poster attribute specifies an image to be shown while the video is downloading, or until the user hits the play button. If this is not included, the first frame of the video will be used instead.
The poster property is supported in all major browsers.
Note: Internet Explorer 8 and earlier versions, do not support the <video> element.
Return the poster property:
Set the poster property:
Value | Description |
---|---|
URL | Specifies the URL of the image file. Possible values:
|
Return Value: | A String, representing the URL of the poster image. Returns the entire URL, including the protocol (like http://) |
---|
Get the URL of the poster image:
The result of x will be:
HTML reference: HTML <video> poster attribute