Embeddable Widescreen YouTube Player

Screenshot of YouTube Widescreen PlayerYou may have noticed a link reading “Try the New YouTube Player Beta!” under videos on YouTube.  The new player is pretty sharp looking. Moreover, it has a sweet widescreen version. Unfortunately, YouTube provides no instructions on embedding the new player on your blog/website. I searched Google and didn’t find any instructions anywhere, so after I figured it out, I thought I should share with the world.

To embed a regular 4:3 video, use the following code.
<object width="480" height="385"><param name="movie" value="http://www.youtube.com/swf/watch.swf?video_id=YOUR-VIDEO-ID-HERE"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/swf/watch.swf?video_id=YOUR-VIDEO-ID-HERE" type="application/x-shockwave-flash" wmode="transparent" width="480" height="385"></embed></object>

There is one caveat when using the new player: the videos start automatically whether you want them to or not. I’m sure this is something YouTube will deal with once the player comes out of beta, but for now, we’re stuck with it how it is. At least, I think so. I couldn’t find any way to stop it, although I didn’t try using the API. If you know how to stop it from auto-playing, let me know in the comments.

To embed a widescreen video you must add &vq=2&fmt_map=6/720000/7/0/0 to the end of the URL (shown in the following code box). However, there is an additional caveat when using the widescreen player. Most videos, even widescreen videos, will not work with it. If you get a message saying, “This video is no longer available,” and you’re sure you copied the code correctly, it means that the video will not work with the widescreen player. If you’re having trouble, you can test your code with the video id X13o3efXTmk , which is the video I have embedded below. If it still doesn’t work, your code may be slightly off. Unfortunately, it’s very finicky and breaks at the drop of a hat.

I can’t promise this is repeatable, but I did upload one video that worked with the widescreen player. It had a 1.8:1 ratio (864×480) letterboxed into a 640×480 Quicktime video. I’m sure other ratios/sizes would work as well. The video below has an even wider radio, but 1.8:1 and 640×480 worked for me.

<object width="480" height="295"><param name="movie" value="http://www.youtube.com/swf/watch.swf?video_id=YOUR-VIDEO-ID-HERE&vq=2&fmt_map=6/720000/7/0/0"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/swf/watch.swf?video_id=YOUR-VIDEO-ID-HERE&vq=2&fmt_map=6/720000/7/0/0" type="application/x-shockwave-flash" wmode="transparent" width="480" height="295"></embed></object>

5 Comments

  1. Comment by David Rodriguez on May 13, 2008 1:42 am

    Nice job figuring this out!

  2. Comment by Justin Hamilton on May 13, 2008 6:51 am

    now they just need to improve the quality

  3. Comment by Will Johnston on May 13, 2008 10:54 pm

    While I suppose the quality could be better still, if you set your profile to always play in high quality (or just click the link below the videos that have a link to a high quality version, it’s actually not too bad. This only works for new content that was uploaded at a higher resolution though.

  4. Comment by sEPH on May 14, 2008 10:26 pm

    coolness. thanks.

  5. Pingback by YouTube e Alta Qualità: Come Inserire nel Tuo Sito i Video in Qualità Migliorata on May 21, 2008 4:18 am

    [...] spunto per scrivere questo articolo l’ho preso da un post apparso su http://www.Willfjohnston.com. Segnala [...]

Comments RSS TrackBack Identifier URI

Leave a comment