The validation enthusiast can't seem to get a break in today's fast-talkin', rich media world.
The W3C XHTML Validator FAQ suggested I try Drew McLellan’s famous Flash Satay method, but I just plain don’t have the patience to wrap every embedded video on this blog in another Flash movie, and besides IE7 fixed the problem that motivated the Satay technique in the first place.
On top of all that, this particular error was incredibly easy to fix. (Which does make you wonder why Vimeo didn’t just fix in the first place!)
Nuts and bolts now. Here’s what they give you:
<object width="400" height="302"> <param name="allowfullscreen" value="true" /> <param name="allowscriptaccess" value="always" /> <param name="movie" value="uri" /> <embed src="uri" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="302"></embed> </object>
Let’s break down the one tag we don’t recognize as valid, the <embed> tag. It holds the following information:
- src: This is the location of the video we want to show.
- type: This tells the Flash player’s MIME interpreter that we’re looking at a file it can read.
- allowfullscreen: This is a Flash player paramater that lets us (the content provider) allow our users to watch the video at full screen size (true) or not (false).
- allowscriptaccess: This is another Macromedia-defined paramater, which controls the ability to perform outbound scripting from within a Flash SWF.
- width: The width of the video.
- height: The height of the video.
Now here’s an interesting fact. Numbers (1), (3), (4), (5) and (6) are already defined in this object without the <embed>. The only data point that’s not already defined (2) is the MIME type of the embed tag itself!
Furthermore, one might have noticed already that the object tag supports a "type" attribute as well.
So, given that all that, it is incredibly easily to rewrite this as a valid XHTML object:
<object width="400" height="302" type="application/x-shockwave-flash" data="uri"> <param name="allowfullscreen" value="true" /> <param name="allowscriptaccess" value="always" /> <param name="movie" value="uri" /> </object>