Embedding YouTube videos in your page

Date: 26-Jul-2010

There are two ways to add video to your populus website. The first is to upload your video in .flv format (Macromedia Flash Video) to the media section as 'video', and then create a video module. The second is to upload the video to YouTube and then add the embed script to the relevant field in the admin

A YouTube video can be added to any admin field that supports html. Using the video module will ensure that the video is fomatted correctly on the page. However, an administrator can do this themselves provided they know the size of the area in which they are attempting to embed the video.

The process to add a YouTube video is as follows.
  1. Upload your video to YouTube (you'll need to be a registered user).
  2. Generate the embed script from YouTube. As part of that process you will be asked to specify the 'height' and 'width' of the video. You should ensure that this matches the area in which you wish to display the video.
  3. Copy the embed script from YouTube and paste it into the relevant field in the administration area.
If you are adding the script to an admin field that has the WYSIWYG then you will need to click the 'source' button before adding the script into the page. This enables you to add html to the page. If you do not add the script as 'source' then when you view the page you will just see the text of the embed script.

The following is an example of a YouTube embed script (added without clicking source).

<object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/3IwDHvNxjJo&amp;hl=en_US&amp;fs=1?rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/3IwDHvNxjJo&amp;hl=en_US&amp;fs=1?rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object>

And here is the YouTube video when the embed script is added to the admin as 'source'.

to top