Skip to content

DivX Stage6 and valid XHTML

DivX Stage6 is a video sharing platform not unlike YouTube. One of the differences is that users can upload their DivX-encoded videos that can be played in the browser using the DivX Web Player. Now, Stage6 even offers some HTML and Javascript code to include any video in your blog or on your web site. The problem is that this code does not validate. Maybe the JS code does, but I have not tried it because, you know, what if JS is turned off ... I just wanted to do it the plain XHTML way.

People have tried to find a solution that validates, but so far I couldn't find one. Until I came across A Smartass Education's code. It seems to build on earlier solutions for inserting Flash and Quicktime movies, so the author seems to have some experience with the topic. I took the relevant parts from their code and put them on a blank XHTML page. And to my surprise, the video plays in Firefox, IE, and Opera, and the Firefox HTMLTidy extension does not give me any errors. Now how great is that? Still, I'm not sure if this solution really adheres to web standards. Basically, what gives me a headache, is putting one object inside another. I'd be really glad if you gave me feedback on this. Here's the code:

<div style="margin:auto;">
<object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab" height="240" width="320">
    <param name="src" value="http://video.stage6.com/1342802/.divx" />
    <param name="custommode" value="Stage6" />
    <param name="autoplay" value="false" />
    <object type="video/divx" data="http://video.stage6.com/1342802/.divx" height="240" width="320">
        <param name="src" value="http://video.stage6.com/1342802/.divx" />
        <param name="custommode" value="Stage6" />
        <param name="autoplay" value="false" />
    </object>
</object>
</div>
 

And here's what the video looks like (DivX Web Player required):

Update: Markus suggested to add autoplay=false to the original example.