Intro
If you don't want to host the video on your site, you can use Iframe elements to embed videos from various other websites like Youtube and Vimeo.
You can technically use Iframes in two ways on The.com:
-
Iframe Element
-
Raw HTML Element with an
<iframe>
tag
The embed code provider will give you a snippet that looks something like this:
<iframe src="https://player.vimeo.com/video/433759125" width="640" height="360" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>
<p><a href="https://vimeo.com/433759125">Introducing The.com</a> from <a href="https://vimeo.com/thedotcom">The.com</a> on <a href="https://vimeo.com">Vimeo</a>.</p>
Use the Iframe Element
In the above code snippet, you may notice that there is some HTML. However, the only thing that we are worried about when using an Iframe Element is the src value, which in this case is a URL to the video:
https://player.vimeo.com/video/433759125
Copy this URL and paste it in the Source attribute of an Iframe Element.

You will have to resize the Iframe manually to get the desired size. The Aspect-Ratio CSS property is a great tool to use for this!
Use the Raw HTML Element
Alternatively, you could copy the whole HTML snippet and paste it into a Raw HTML Element.
<iframe src="https://player.vimeo.com/video/433759125" width="640" height="360" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>
<p><a href="https://vimeo.com/433759125">Introducing The.com</a> from <a href="https://vimeo.com/thedotcom">The.com</a> on <a href="https://vimeo.com">Vimeo</a>.</p>

Since the HTML version has attributes to define the width and height of the player, you can see how it compares to the iframe method above in terms of the player's size.
Comments
0 comments
Please sign in to leave a comment.