Is the image provided by the "poster" or "src" attributes considered a "content" of the element?

Viewed 61

Using the "poster" attribute of the video element, you can load an image which serves as the first frame of the video, which is loaded by the "src" attribute of the "source" element, which is an empty element.

I know the video itself is the content of the video element, but is the image loaded by the "poster" attribute also a content of the video element, or is it just a value that modifies the content?

Since the video provided by the "src" attribute is the content of the video element, if the image of the "poster" attribute is also a content, then does that mean the video element contains two content-box siblings?

Update:

My understanding is that, yes, the image loaded by the poster or src attributes are in fact a content. The reason why i think so is because, it's essentially the same with the img element. The src attribute loads an image which becomes the content-box of the img element. It's the same with the video element. The src attribute of the source element loads the video which becomes the content of the video element (since source is empty, and only provides a content for its parent), then the poster attribute loads a second image, which also becomes a content of the video element, and only replaces the first frame of the video. So in essence, both content-boxes are siblings and co-exist in a weird way, but not simultaneously.

Any thoughts/corrections on my understanding/theory are welcomed.

1 Answers

poster is an attribute of the video tag. It actually points to a URL that is a snapshot or an image of one of the frames from your video. It is an optional attribute. If no poster attribute is provided, no image is shown until the first frame in the video is available.

You can refer to the documentation on the MDN site for the video tag.

Related