Fev 27

Cette fois ci, mon problème était d'intégrer facilement une vidéo hébergé sur Dailymotion via l'interface du plugin media ..

Encore une fois, sans que mon client n'est besoin de toucher au code html ..

j'ai encore touché à : jscripts>tiny_mce>plugin>media>js>media.js

j'ai ajouté :

1
2
3
4
5
6
7
	// dailymotion
    if ( v.match(/dailymotion\.com\/video\/(.+)(.*)/)) {
		f.width.value = '425';
		f.height.value = '350';
		f.src.value = 'http://www.dailymotion.com/swf/' + v.match(/video\/(.*)(.*)/)[0].split('video/')[1];
		return 'flash';
	}

après la ligne 322 .

L'insertion se fait maintenant simplement en colant le permalien de la vidéo dans l'interface du plugin media ..

 

Il existe aussi un code pour les vidéo chez viméo , cette fois, c'est pas de moi .. un certain Arcsin

1
2
3
4
5
6
7
// Vimeo
    if ( v.match(/^http:\/\/(?:www\.){0,1}vimeo\.com\/(\d+)$/) ) {
        f.width.value = '400';
        f.height.value = '321';
        f.src.value = 'http://vimeo.com/moogaloop.swf?clip_id=' + v.match(/^http:\/\/(?:www\.){0,1}vimeo\.com\/(\d+)$/)[1];
        return 'flash';
    }

je partage ...

27/02/2010