At this moment, the compatibility of this feature has been tested only in WebKit browsers.
When a poster image is applied to a <video>
element using the poster
attribute, it appears before the user starts playing the video (default behavior). However, if the aspect ratio of the poster image differs from that of the <video>
element, whitespace or blackspace may be visible on the sides of the image (either horizontally or vertically), with the image being centered (also default behavior).
I am looking for a way to scale up this image (preferably using CSS) so that it fills the entire video element, similar to what the CSS3 property background-size: cover;
achieves.
If you're still having trouble understanding, perhaps this JSFiddle example can clarify things: http://jsfiddle.net/jonnymilano/2w2CE/
I would also appreciate solutions that force the image into the video container, adjusting its height and/or width to match the dimensions of the video container. Although this approach might only partially resolve my problem.