How to embed YouTube and Google Video without breaking validation!

<object type="application/x-shockwave-flash" data="[INSERT VIDEO URL FROM EMBED CODE PROVIDED HERE]" width="400" height="326"><param name="movie" value="[INSERT VIDEO URL FROM EMBED CODE PROVIDED HERE]" /><param name="FlashVars" value="playerMode=embedded" /></object>


So, here's the code for either one:

<object type="application/x-shockwave-flash" data="[INSERT VIDEO URL FROM EMBED CODE PROVIDED HERE]" width="400" height="326"><param name="movie" value="[INSERT VIDEO URL FROM EMBED CODE PROVIDED HERE]" /><param name="FlashVars" value="playerMode=embedded" /></object>

Took a while to figure out, but it works. I originally tried the code mentioned in this article, but it kept breaking my site, so I trimmed it all down to the bare essentials. This works for me and my template. Let me know if it does / doesn't work for yours in the comments. w00t!

UPDATE: Great post from Ryan over at Hapless band of staff and regulars, where he tweaks my code slightly to avoid YouTube upscaling of the video. Check it out.

Comments

C.K. Sample III
C.K. Sample III
Artist, Writer, Blogger, Editor, Director of Content Marketing at Crowd Fusion
Bronxville, NY
Article rating:
Your rating:
All Rights Reserved.
Version: 2
Versions
Last edited: Jul 24, 2008 8:10 PM.

Reviews

    Similar Content on the Web

    Knol translations

    Activity for this knol

    This week:

    21pageviews

    Totals:

    380pageviews