On Android, inline html5 tag will stretch video playback

I have a video tag with width and height set to a dimension that doesn't match the video format. When I see the page on an Android tablet, the video playback is stretched to fill the video clip. If in ipad or desktop browsers they will be centered.

<video width="xxx" height="yyy">
   <source ...>
   ...
</video>

      

If I only use width and not height, then the video will maintain the aspect ratio, but I want to keep the height and center the video playback.

Is there a way to do this in Android browsers?

Thank,

+3


source to share





All Articles