object and embed
I’ve heard a lot of people say that in order to support all browsers, you need to use both <object> and <embed> when showing something like a quicktime movie.
Not true.
Flapping Crane uses only the <object> tag. But I pulled my hair out a few months ago trying to figure out why, when I took out the <embed> tag, IE still worked, but not Firefox.
Long story short, if you have this attribute in your object tag:
classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
IE will work, but not Firefox. Leave it out, and Firefox works, but not IE.
Why? Beats the hell out of me. I did a half-hearted search on google, but I didn’t find anything.
The easiest way around this is conditional comments:
<!--[if IE]><object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" data="movie.mov" type="video/quicktime" width="320" height="256" codebase="http://www.apple.com/qtactivex/qtplugin.cab" standby="Loading Quick Time components...">
<![endif]-->
<!--[if !IE]> <-->
<object data="movie.mov" type="video/quicktime" width="320" height="256" codebase="http://www.apple.com/qtactivex/qtplugin.cab" standby="Loading Quicktime components...">
<!--> <![endif]-->
<param name="src" value="movie.mov">
<param name="autoplay" value="true">
<param name="controller" value="true">
</object>
Anyway, the original reason for doing this was because of a bizarre Safari bug. Safari would occasionally load the same video twice, a few seconds apart, and overlayed. You’d get a weird echo, and when you stopped one movie, the other would keep going (because one was covering the other up). It was difficult to reproduce, since it only seemed to happen 1 out of 20 times or so. Very irritating. After getting rid of the <embed> tag, the issue went away.
June 9th, 2006 at 9:21 am
That sucks. I hate writing scripts for cross browser compatibility.
June 9th, 2006 at 9:33 am
Yes, it does.
Debugging cross-browser issues takes all the fun out of web site development.
February 8th, 2008 at 6:57 pm
[...] talked about the ugly use of <embed> and <object> a couple months [...]