Skip to main content

Embed YouTube videos using IFRAMES

YouTube just introduced a new video encoding method by which users will now be able to embed videos in blog post and HTML pages using IFRAMES. The regular Flash video embedding codes are still available.

To embed any video using IFRAMES just use the following code, replacing VIDEO_ID with the unique identifying code of the video which you can grab from the video URL. Adjust the width and height appropriately.

<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/VIDEO_ID" frameborder="0">
</iframe>

The following video has been embedded using IFRAMES.

Unlike normal IFRAME behavior, resizing the size of the IFRAME automatically resizes the video contained within.

If you use the new embed code style, your viewers will be able to view your embedded video in one of our Flash or HTML5 players, depending on their viewing environment and preferences.

An additional benefit of the new embed style is that it will eventually allow embeds to work on mobile devices, which typically use a built-in player instead of Flash or HTML5.

Comments

  1. Well, I guess the IFRAME version doesn't allow such customization.

    ReplyDelete
  2. i have embedded a video from microsoft's site onto my blog! When i am trying to resize that video.., it is cropping and the video not resizing itself but cropping!!!

    ReplyDelete

Post a Comment

Popular posts from this blog

How to Record CPU and Memory Usage Over Time in Windows?

Whenever the computer is lagging or some application is taking too long to respond, we usually fire up task manager and look under the Performance tab or under Processes to check on processor utilization or the amount of free memory available. The task manager is ideal for real-time analysis of CPU and memory utilization. It even displays a short history of CPU utilization in the form of a graph. You get a small time-window, about 30 seconds or so, depending on how large the viewing area is.

How to Schedule Changes to Your Facebook Page Cover Photo

Facebook’s current layout, the so called Timeline, features a prominent, large cover photo that some people are using in a lot of different creative ways. Timeline is also available for Facebook Pages that people can use to promote their website or business or event. Although you can change the cover photo as often as you like, it’s meant to be static – something which you design and leave it for at least a few weeks or months like a redesigned website. However, there are times when you may want to change the cover photo frequently and periodically to match event dates or some special promotion that you are running or plan to run. So, here is how you can do that.

Diagram 101: Different Types of Diagrams and When To Use Them

Diagrams are a great way to visualize information and convey meaning. The problem is that there’s too many different types of diagrams, so it can be hard to know which ones you should use in any given situation. To help you out, we’ve created this diagram that lays out the 7 most common types of diagrams and when they’re best used: