Embed a video on your website
Copy the embed code
Section titled “Copy the embed code”Embed a Vaam video to play it directly on your website, help center, or knowledge base.
- Open the video in Vaam.
- Click Share and open the Embed tab.
- Click Copy embed code.
- Paste the code into the HTML of your page.
The embed code is an iframe:
<iframe width="560" height="315" src="https://app.vaam.io/embed/VIDEO_ID" frameborder="0" allow="fullscreen; picture-in-picture" allowfullscreen></iframe>Match the background to your page
Section titled “Match the background to your page”When the iframe shape is different from the video shape, the player shows empty space beside or above and below the video. This space is white by default. On a dark page, set the bg parameter in the iframe src to the background color of your page.
<iframe width="560" height="315" src="https://app.vaam.io/embed/VIDEO_ID?bg=0f172a" frameborder="0" allow="fullscreen; picture-in-picture" allowfullscreen></iframe>The bg parameter accepts these values:
- A hex color, such as
0f172aorfff. You can write the#as%23, for example%230f172a. Do not write a plain#in the URL, because the browser ignores everything after it. transparent, which shows your page through the empty space. This works only when your page does not set a darkcolor-scheme. If you use a dark theme, use a hex color.
If the value is not valid, the player keeps its default background.
If the URL already has a ?, add bg with & instead, for example ...?t=10&bg=0f172a.
Place the video at the left edge
Section titled “Place the video at the left edge”By default, the player centers the video in the iframe. To place the video at the left edge of the iframe, add align=left to the iframe src:
<iframe width="560" height="315" src="https://app.vaam.io/embed/VIDEO_ID?align=left" frameborder="0" allow="fullscreen; picture-in-picture" allowfullscreen></iframe>Use this when your page shows videos of different shapes in iframes of the same size, or when the video sits in a left-aligned column of text. The empty space is then on the right side only.
- A video with the same shape as the iframe, such as a 16:9 video in a 560 by 315 iframe, fills the iframe.
align=leftdoes not change it. - A narrower video, such as a portrait phone recording, starts at the left edge of the iframe.
- When the iframe is narrower than the video shape, the video uses the full width.
align=leftdoes not change it.
The player does not crop or stretch the video. The title and the controls move with the video.
The align parameter accepts only left. Other values keep the video centered.
To use align together with other parameters, join them with &, for example ...?bg=0f172a&align=left.