How to: Embed Videos
Before I get into the tutorial, I want to take some time to explain why you would want to embed the video. Why would you want to embed a video when it is so much easier to use the video module? What if you wanted more from the video? What if you would like for it to autoplay, or for the sound to be muted, or you wanted to fit it to a specific size? Well all these options are available to you, through the handy-dandy process of embedding a video into your site. Embedding a video using the code module is simple and easy to do, and in this tutorial I’ll take you step by step to show you how you can have a beautiful video on your site in no time.
How to Embed a Youtube Video
Click on the Share button below the title
Click on the Embed tab and copy the code.
Paste the Embed code into the Code Module
So now that we have the video on the site, we can start customizing how we want it to be displayed on the site. This has to be done through the URL in the Embed code. As an example, I will use the URL code in the video at the start of this blog: www.youtube.com/embed/xGRjCa49C6U. To begin with, we need to add a “?” after the video to tell the Youtube API that we are no longer giving it a URL, and that these are the changes we want to apply. If I wanted to make the video auto play when the site loaded it, the url would look something like:
If we wanted the video to have more than one embed property, We can do that to. To make the video have more than one embed property, we just have to add an “&”in between each added piece. So if I wanted to make the video both auto play and I wanted to mute the sounds the code would look like:
Its also important to note that when defining a parameter in the embed code, 0 represents false, and 1 represents true. So reusing the code above us, if we changed it to
The program handling this would read that as autoplay = false, or in human speak, that you don’t want the video to auto play. Now that you know how to format the embed code, here are some useful codes to use:
Removes Controls: controls=0
Disable Related Videos: rel=0
Remove the title/ owners channel: showinfo=0
Remove the Youtube Logo: modestbranding=1
If you would like all these options in one easy code: ?controls=0&rel=0&showinfo=0&modestbranding=1
And thats it! If you’ve done everything according to this post, you should have a beautiful looking video embeded on your site.