Povert

It's Pronounced "Pah-vert." You povert.

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.

3 Responses to “object and embed”

  1. chris czerniak Says:

    That sucks. I hate writing scripts for cross browser compatibility.

  2. Joe Says:

    Yes, it does.

    Debugging cross-browser issues takes all the fun out of web site development.

  3. Into the Mind of a Povert » Blog Archive » Object tag, again Says:

    [...] talked about the ugly use of <embed> and <object> a couple months [...]

Leave a Reply

Povert is proudly powered by WordPress
Entries (RSS) and Comments (RSS).