How to modify your embed code to support custom video sizes

Our embed code supports the most popular video sizes for embedding. But, if you need a custom size, you'll just need to make a slight modification to the embed code before pasting it into your website's HTML code.

Look at the first two lines of code in the image below. You'll notice a width and height setting (highlighted in red below):

<iframe id="vp19QnqL" title="Video Player" width="432" height="243"...

You can modify these values to set the video player size to a size more appropriate for your website. 

 

Tips to maintain the aspect ratio of your video

When you use custom height/width settings, you'll want to make sure your video doesn't appear distorted. To do this, we recommend that your video fits within an aspect ratio of 16:9*.

In the two examples below, we'll show you how to calculate height and width. 

Calculating custom video height

Say you want a video to fit within your blog article on your Wordpress site at full width, where the the article width is 960 pixels.

To make sure your video maintains a 16:9 aspect ratio, just divide your custom width (960 pixels) by 1.7777, which would equal 540. That would make your video size 960 x 540.

Calculating custom video width

For a video to fit in a height of 400 pixels, you would multiply the height in order to determine width. In this case, 400 x 1.7777 would equal 711 pixels, making your video dimension 711 x 400.

*16:9 = 16/9 = 1.7777

 

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk