8 replies [Last post]
florent
florent's picture
User offline. Last seen 3 years 39 weeks ago. Offline
rank Enthusiast
Enthusiast
Timezone: GMT+1
Joined: 2003-04-19
Posts: 96
Points: 0

Hi,

I recently discovered the DivX web player plugin and I'm really interested in using it on my website, however its code does not validate against XHTML 1.0 strict DTD.

Here is the code it uses (from the DivX Web Player code generator):

<object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" width="320" height="260" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab">

  <param name="src" value="video.avi" />

<embed type="video/divx" src="video.avi" width="320" height="260" pluginspage="http://go.divx.com/plugin/download/">
</embed>
</object>

The EMBED tag does not validate... I tried removing it and passing its attributes into PARAM tags, but it does not seem to work.

Code I tried (displays nothing):

<object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" width="320" height="260" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab">

  <param name="src" value="video.avi" />
  <param name="type="video/divx" />
  <param name="pluginspage" value="http://go.divx.com/plugin/download/" />

</object>

Of course I tried lots of other combinations, adding or removing PARAM tags...

Resources I found on the EMBED and OBJECT tags did not prove helpful on the subject...

Is going Transitional the only solution?

I'm a perfectionist
and perfect is a skinned knee

Tags:
HellsBells
HellsBells's picture
User offline. Last seen 2 years 17 weeks ago. Offline
rank Leader
Leader
Joined: 2004-04-07
Posts: 851
Points: 0

Validating DivX web player code

My strategy is so simple an idiot could have devised it!

"Also, your CSS (no offence) makes me want to gouge my eyes out with a rusty spoon" - TPH

Chris..S
Chris..S's picture
User offline. Last seen 9 hours 2 min ago. Offline
rank Moderator
Moderator
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6047
Points: 130

Re: Validating DivX web player code

florent wrote:
Is going Transitional the only solution?

I doubt its a solution at all. <EMBED> is a proprietory element originally introduced by Netscape. It was never part of any HTML spec., so it shouldn't ever validate.

Validation is a tool, not a stricture. That doesn't mean validation should be flouted unnecessarily, but the overall goal of validation is to make portable, maintainable pages that work consistently across different user agents (browsers).

If you must use <EMBED> (and if Hellsbells isn't suggesting otherwise) then its your decision on foregoing the content or building the page to standard and then adding <EMBED> to support IE.

/edit however this will probably work for all IE object/embed combinations.

<object classid="clsid:xxxx" ... >
 <param ... />
 <!--[IF IE]>
<script type="text/javascript"> /* -->
 <object type="..." ... >
  <param ... />
  ... unsupported object stuff here, redo the comment stuff again to let IE see this as well.
 </object>
<!-- */ </script>
<![ENDIF]-->
</object>

florent
florent's picture
User offline. Last seen 3 years 39 weeks ago. Offline
rank Enthusiast
Enthusiast
Timezone: GMT+1
Joined: 2003-04-19
Posts: 96
Points: 0

Validating DivX web player code

Thank you both for your answers. I tried different things with the codes you offered, everything works perfectly in IE, but does not in Firefox. It seems the EMBED tag is absolutely mandatory to the DivX web player plugin (I either get no display at all, or an "illegal plugin operation" message, depending on the code i use).

I'm a perfectionist
and perfect is a skinned knee

gary.turner
gary.turner's picture
User offline. Last seen 5 days 5 hours ago. Offline
rank Moderator
Moderator
Timezone: GMT-5
Joined: 2004-06-25
Posts: 6726
Points: 426

Validating DivX web player code

Not tested.

Firefox has excellent support for object. However, you must use the correct MIME type and reference the source correctly.

 
<object type="video/x-dvx" data="video.avi"> 
  <p><img src="screencap.png" alt="a still from the movie"></p> 
  <p>Some text if neither the movie nor images are supported.</p> 
</object>

IE is the one with poor support for object.

cheers,

gary

Unplanned code results in a tangled wad of brain cramping confusion.

There are enough html & css demos and tutorials to be interesting. Please visit.

florent
florent's picture
User offline. Last seen 3 years 39 weeks ago. Offline
rank Enthusiast
Enthusiast
Timezone: GMT+1
Joined: 2003-04-19
Posts: 96
Points: 0

Validating DivX web player code

What I was trying to say is that perhaps the problem comes from the DivX plugin, not Firefox.

I have tried various combinations of

type="video/x-dvx" (what you posted) / type="video/divx" (code given by the divx generator) / type="video/x-divx"

with

data="video.avi" / movie="video.avi" / src="video.avi"

and none of them worked. I give up.

I'm a perfectionist
and perfect is a skinned knee

stanbogdanov
stanbogdanov's picture
User offline. Last seen 40 weeks 6 days ago. Offline
newbie
Timezone: GMT+2
Joined: 2006-08-18
Posts: 5
Points: 4

DivX plugin has a bug

Yes, that's the reason why it crashes on firefox when you try to add a [param] to the [object]
Hope the new plugin version will have it fixed and their code validates

stanbogdanov
stanbogdanov's picture
User offline. Last seen 40 weeks 6 days ago. Offline
newbie
Timezone: GMT+2
Joined: 2006-08-18
Posts: 5
Points: 4

DivX Validated as XHTML1.1

Valid XHTML 1.1 DivX Web Player plugin code

Just yesterday I got back to this DivX web player plugin validation issue and managed to validate as XHTML1.1!

I tested it on WinXP SP2: IE7, FF 2.0.0.11 and Opera 9.23.

It works! And is XHTML1.1 valid!
Give it a try and post back, especially on other OS in other browsers!
Note: (DON'T update to the v1.4.0 Beta 1 and Beta 2 DivX Web Player plugin, lots of complaints about it, as you may have found out!)

thepineapplehead
thepineapplehead's picture
User offline. Last seen 2 days 7 hours ago. Offline
rank Guru
Guru
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9180
Points: 284

Never embedded any divX

Never embedded any divX movies in pages yet, but this should come in handy for those of us that do. Thanks for remembering us and coming back Wink