Olivier Mengué – Code & rando

Aller au contenu | Aller au menu | Aller à la recherche

samedi 11 novembre 2006

DailyMotion's poor HTML code

For my post of this morning that included a video I did use DailyMotion services. When you upload a video, they provide HTML code to embed it on your site. OK, that seems fine. But it's not. Here is the code:

  <object width="425" height="335">
    <param name="movie" value="http://www.dailymotion.com/swf/2JarEXHqOuOxZ4psf"></param>
    <param name="allowfullscreen" value="true"></param>
    <embed src="http://www.dailymotion.com/swf/2JarEXHqOuOxZ4psf" type="application/x-shockwave-flash" width="425" height="334" allowfullscreen="true"></embed>
  </object><br />
  <b><a href="http://www.dailymotion.com/video/xmj2z_rallye-de-vence-2006-speciale-3-96">Rallye de Vence 2006 - Spéciale 3 - 96</a></b>

Here are my grievances:

  • This code uses <embed> tags, which have never been part of any W3C HTML specifications. <embed> is, AFAIK, a Netscape-only tag. Firefox/Mozilla now recognizes the standard <object> tag, so <embed> is only required for compatiblity with Netscape 4.x which, at web2.0 time, nobody uses anymore.
  • They do not provide alternative strictly validating XHTML code. Most blog and CMS software are now XHTML strict compliant. Embedding this code breaks strict validation and could cause the page to not display at all.
  • The code is not working with old Flash versions and does not tells why or proposes to upgrade. My parents have Flashplayer 6, and the display is weired. Even worse, when clicking on the link below the video to go to DailyMotion site, it crashes IE6 (with latest security patches).

So, here is my own code:

<div class="video dailymotion">
  <object width="425" height="335" classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">
    <param name="movie" value="http://www.dailymotion.com/swf/2JarEXHqOuOxZ4psf"></param>
    <param name="FlashVars" value="playerMode=embedded"></param>
    <!--[if !IE]>-->
      <object width="425" height="335" data="http://www.dailymotion.com/swf/2JarEXHqOuOxZ4psf" type="application/x-shockwave-flash"></object>
  </object><br />
  <b><a href="http://www.dailymotion.com/video/xmj2z_rallye-de-vence-2006-speciale-3-96">Rallye de Vence 2006 - Spéciale 3 - 96</a></b>

Tested with Firefox and Internet Explorer 6. I just hope it works with Opera/Safari/Konqueror…

Some reference documentation from Netscape/Mozilla and Ado be were useful.

Rallye du Pays Vençois 2006

J'étais le week-end dernier dans les Aples-Maritimes. Pour randonner, bien sûr, mais aussi pour assister au 10e Rallye Régional du Pays Vençois, dans l'arrière-pays au-dessus de Vence.

Voici les deux équipages que j'encourageais :

Désolé, il manque le son. Mais mon appareil photo numérique, un Nikon Coolpix E995, ne le capte pas...

Aussi, je n'ai pas pensé à marquer un waypoint sur mon GPS au moment du passage de façon à noter l'heure exacte (oui, un GPS ça donne directement l'heure de l'horloge atomique des satellites), et sur le Coolpix, l'heure n'est réglable qu'à la minute près. Voilà une idée pour la prochaine fois.