Youtube Custom Embed Code

There could be several reason why you would want to embed a Youtube Video on your web pages. Perhaps you want to use video as a banner and don’t want to show users the control panel or you would like to re-size your video for a specific purpose.

Here is a typical embed code customized for a specific purpose, in this case branding for an event.  I’ll give you the code first then explain each aspect of the code and then show you the final product.

Here’s the iFrame embed code: <iframe src=”http://www.youtube.com/v/UV7U6Ut38i8?version=3&amp;controls=0&amp;autoplay=1&amp;showinfo=0&amp;modestbranding=0&amp;loop=1&amp;playlist=UV7U6Ut38i8″ frameborder=”0″ width=”295″ height=”212″></iframe>

Now, let’s go through it step by step.

First, you’ll notice that instead of the typical code which uses the word /embed/, you will swap that out for the letter /v/.

Then, you’ll notice that after the unique video serial number is this; ?version=3. That’s the video code’s application version which will allow certain customization.  Yes, there is a version 2 and a version 1 which in each case will not allow certain custom parameters.

Next, you’ll find the customization parameters for which “0” means off and “1” means on. Here is an explanation of each one.  Also

controls: This adds or removes the play controls from the video. “0” means no controls so that people cannot stop or start, play in youtube or even fast forward.

autoplay: The video starts on it’s own when the page is loaded.

showinfo: The actual title of the video is removed.

modestbranding: Removes the Youtube branding logo.

loop: plays over and over in an endless loop.

playlist: You will have to use this playlist code and the branding ID of the video in order to use the loop command.

Here’s the final product resized without controls, looped and branded.

One Comment

  1. Jonathan

    Hi Paul,

    Great article and always good to have an understanding of how the YouTube embed code works. For simplicity, I always like to use this YouTube embed code generator. Just hit the radio buttons for the functions you want and it shoots out the embed code for you.

    http://www.vtubetools.com/

    Hopefully this can help people out in addition to the great knowledge you provide :).

Leave a Reply