Bonjour,

j'ai le script suivant qui me sert a insérer le player flash pour toute les element Embed ayant un fichier flv à afficher.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 
jQuery(document).ready( function()
{
        alert ('ready');
	jQuery("embed").each( function()
	{
		// get the source
		var f = this.src;
 
		// the name of the video
		var fn = f.substr( f.lastIndexOf("/") + 1 );
 
		alert ('is embed '+fn);
		// if it's an flv, put the player in
		if( f.substr(f.length-3) == "flv" || f.substr(f.length-3) == "FLV" )
		{
			alert ('is flv '+$(this));
			jQuery(this).replaceWith('<embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="mon_url/player_flv_maxi.swf" width="480" height="320" allowfullscreen="true" flashvars="flv=' + f + '&amp;title=' + fn + '&amp;showvolume=1&amp;showfullscreen=1&amp;margin=1&amp;loadingcolor=97d49b&amp;buttonovercolor= 5fa664&amp;sliderovercolor= 5fa664"></embed>');
		}
	});
} );
Ce script fonctionne trés bien sous FF, Chrome, Opera mais impossible de le faire fonctionner sous IE (j'ai une version d'IE 7).

Je suis sous Wordpress c'est pour cela que je suis obligé d'utiliser la synthax jQuery(document) et non pas $(document).

Le script est bien appelé sous IE car l'alert afficher bien ready mais il ne trouve aucune balise "embed".

Une idée?

Merci d'avance