ObjectSwap does not work with YouTube videos

Youtube provides a object tag that you can include on your site to show the videos directly, w/o making the user leave your site.

However, I noticed that this object tag was not being activated with the objectswap technique which makes it so you don’t have to click on the flash object to “activate” it in IE.

To fix this you need to include the type=”application/x-shockwave-flash” in the object definition.

I am not sure why you need this, but if you leave it out, somehow IE removes the object from it’s DOM.

If you allow a page to load w/o this “type” and then try to find, using javascript, any OBJECT tags and it will tell you there are none.

 

UPDATE:  Still having some problems… thinking the trick above is causing some new problems.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s