Is there a way to adjust the HTML5 video poster so it perfectly fits the dimensions of the video itself?
Check out this JSFiddle demonstrating the issue: http://jsfiddle.net/zPacg/7/
Here's the code snippet:
HTML:
<video controls width="100%" height="100%" poster="http://www.wpclipart.com/blanks/buttons/glossy_buttons/glossy_button_blank_orange_rectangle.png">
<source src="http://demo.inwebson.com/html5-video/iceage4.mp4" type="video/mp4" />
<source src="http://demo.inwebson.com/html5-video/iceage4.ogg" type="video/ogg" />
<source src="http://demo.inwebson.com/html5-video/iceage4.webm" type="video/webm" />
</video>
CSS:
video{
border:1px solid red;
}
It's evident that the orange rectangle doesn't scale properly to the red border of the video.
Simply adding the CSS below doesn't solve the issue, as it resizes both the video and the poster:
video[poster]{
height:100%;
width:100%;
}