A typical code fragment obtained from the YouTube embed feature looks like this:
<object width="660" height="405">
<param name="movie" value="http://www.youtube.com/v/NWHfY_lvKIQ?fs=1&amp;hl=en_GB&amp;border=1"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="http://www.youtube.com/v/NWHfY_lvKIQ?fs=1&amp;hl=en_GB&amp;border=1"
type="application/x-shockwave-flash"
allowscriptaccess="always"
allowfullscreen="true"
width="660"
height="405">
</embed>
</object>
Now, the <embed>
element has a type attribute to tell the browser it is embedding a flash file, but for browsers using the <object>
tag, there appears to be no information available to the browser!
Why is a classid or codebase attribute not required here? The only options I can think of are:
- IE assumes Flash embedding in the absence of other information
- or, IE reads this information from the
<embed>
tag
I can't find documentation to verify either option. And I'm curious!
EDIT: found a great comparison of Flash embedding techniques here. Still want to know how it works though...