YouTube embed options

YouTube has provided an option on embedding code customization on HD-enabled videos that add in such parameter automatically. To enable YouTube hosted video to autoplay in HD mode when embedded on your web page, click on Customize button at the end of the embed code.

embed-youtube-hd-code

If the video is uploaded in HD resolution, and support HD playback, there should be an option called Play in HD. Tick the check box for “Play in HD”, choose the video size, and then copy and paste the video embed code to your web page.

Here’s the code for WordPress.com blogs:

And here’s the code for self-hosted WordPress blogs:

<object width=”853″ height=”505″> < param name=”movie” value=”http://www.youtube.com/v/zlfKdbWwruY&hl=en&fs=1&rel=0&hd=1″> </param> <param name=”allowFullScreen” value=”true”> </param> <param name=”allowscriptaccess” value=”always”> </param> <embed src=”http://www.youtube.com/v/zlfKdbWwruY&hl=en&fs=1&rel=0&hd=1″ type=”application/x-shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” width=”853″ height=”505″> </embed> </object>

If there is no “Play in HD” option, most likely the video does not have HD version of it. However, it’s still possible to try to force HD autoplay on embedded YouTube video, by amending the embed code manually. The hack is to add the following code to the end of the two URL web addresses point to the SWF Flash videos in the embed code: &hd=1

Original solution posted by My Digital Life onMay 2nd, 2009 at http://www.mydigitallife.info/2009/05/02/embed-youtube-hd-video-to-autoplay-in-high-definition-code-trick/

Advertisements
%d bloggers like this: