oEmbed video aspect ratio
-
Hi,
I noticed that when embedding video from Youtube (or others) the frame aspect ratio is all wrong. The video frame is too high, causing black bars (letterboxing) above and below the video.
Turns out that the theme’s $content_width is set to 920 pixels so video oembedded iframe is set with a width=”920″ and matching height. But the real content width is 660 pixels. Only a featured image will be displayed at 920px wide above a post or page…
This can be fixed by either changing to
$content_width=660;
or adding this to the stylesheet (for youtube video as en example):@media screen and (min-width: 501px) { span.embed-youtube { margin-left: -40px; margin-right: -40px; } } @media screen and (min-width: 801px) { span.embed-youtube { margin-left: -130px; margin-right: -130px; } }
- The topic ‘oEmbed video aspect ratio’ is closed to new replies.