Bonjour,
J'suis loin d'�tre bon en javascript, donc j'avance al�atoirement ..

Je tente de modifier un plugin de TinyMCE (media) pour qu'il reconnaisse une source de m�dia suppl�mentaire .

J'ai tent� le code suivant ( bon, il marche pas)

Code : S�lectionner tout - Visualiser dans une fen�tre � part
1
2
3
4
5
6
7
	// Archive Host
    if ( v.match(/dewplayer\.swf\?son=(.*)(.*)/) ) {
        f.width.value = '235';
        f.height.value = '20';
        f.src.value = 'http://www.archive-host.com/dewplayer.swf/' + v.match(/son=(.*)(.*)/)[0].split('=')[1];
        return 'flash';
    }
Pour int�grer �a
Code : S�lectionner tout - Visualiser dans une fen�tre � part
http://www.archive-host.com/dewplayer.swf?son=http://sd-1.archive-host.com/membres/playlist/108751062716077859/space_life.mp3&autostart=1&autoreplay=1
En m'inspirant de �a :

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
	// YouTube
	if (v.match(/watch\?v=(.+)(.*)/)) {
		f.width.value = '425';
		f.height.value = '350';
		f.src.value = 'http://www.youtube.com/v/' + v.match(/v=(.*)(.*)/)[0].split('=')[1];
		return 'flash';
	}
 
	// Google video
	if (v.indexOf('http://video.google.com/videoplay?docid=') == 0) {
		f.width.value = '425';
		f.height.value = '326';
		f.src.value = 'http://video.google.com/googleplayer.swf?docId=' + v.substring('http://video.google.com/videoplay?docid='.length) + '&hl=fr';
		return 'flash';
	}
Qui marche ...

Je sais, j'suis pas au point .. mais si quelqu'un peu me donner un coup de main ...
Merci d'avance