Lee Kelleher

How to best embed a WMV video clip?

Posted on

I hate to admit it, but I’m stuck… I’m trying to figure out how to best embed a WMV video clip in a web-page, so that it works cross-browser (and cross-platform).

Even after all my years of web-development, I’m still confused to which browser supports which tag … nested <embed> tags in <object> tags … it gets messy!

I’m as equally confused with the Class ID attribute: “CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6” – surely that can’t be the same across all browsers/platforms?!

A List Apart article discusses dropping the <embed> tag. Which sounds like a good idea to me. The HTML looks so much better… MIME types all the way baby!!

<object type="video/x-ms-wmv" data="/media/video.wmv" width="320" height="260">
	<param name="src" value="/media/video.wmv" />
	<param name="autostart" value="0" />
	<param name="controller" value="1" />

I tested this on Firefox 2.0 and IE7 on Vista, and IE6 and Safari on XP – all fine, so far so good! When I ask my client to test the page on their Mac … it’s no good! The videos just wouldn’t load! Hmphf!

So does anyone know of a simple way of embedding a WMV video clip that works cross-browser/platform? Please let me know, I’d be very a happy developer!

Otherwise, I’m so close to using the beastly code that comes from the “Embedded Media HTML Generator” … help me please! ;-)