July 2009 - Posts

Kyoto Garden Waterfalls
31 July 09 04:19 AM | adrian | 1 comment(s)

Kyoto Garden Waterfalls, originally uploaded by Adrian Godong.

Testing Flickr post to MetaWeblog API.

Share this post: | | | |
Embedding A Valid XHTML Video
12 July 09 06:45 PM | adrian | with no comments

Writing a valid XHTML web site is hard, adding valid XHTML user generated content to it is even harder. One of the most annoying widget to validate is Youtube. Youtube provided an embed code, something like:

  <object width="560" height="340">
    <param name="movie"
value="http://www.youtube.com/v/uqeSnKmmv1k&hl=en&fs=1&"></param> <param name="allowFullScreen" value="true"></param> <param name="allowscriptaccess" value="always"></param> <embed src="http://www.youtube.com/v/uqeSnKmmv1k&hl=en&fs=1&"
type="application/x-shockwave-flash" allowscriptaccess="always"
allowfullscreen="true" width="560" height="340"></embed> </object>

That is hardly valid (because of the embed tag and src element on the tag). Based on several sources, I’ve put up together a cleaner, simpler code snippet for valid Youtube video.

  <object type="application/x-shockwave-flash"
data="http://www.youtube.com/v/uqeSnKmmv1k&fs=1"
width="500" height="400"> <param value="http://www.youtube.com/v/uqeSnKmmv1k&fs=1" name="movie" /> <param value="true" name="allowFullScreen"></param> </object>

For your convenience, I have also put together a plug in for Windows Live Writer to insert this snippet. Download here.

Share this post: | | | |