About videos in posts and comments

Publishing video on your blog is not as easy as a copy-paste of the code propose by the website. I often run into problems mainly because of the editor used by my blog platform. I found it painful enough to think that putting something together for the bloggers on “Parlons” might be a good idea… Done. All they need to do now when publishing a video is to put the video link between bracket [ ].

How it is done ?
A few lines of code put together (thanks to a very powerful hooking and plugin system in Wordpess) that transform this:

[http://www.youtube.com/watch?v=x2x4YmdXwoU]

into that

<object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/x2x4YmdXwoU&rel=1"> </param>
<param name="wmode" value="transparent"> </param>
<embed src="http://www.youtube.com/v/x2x4YmdXwoU&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"> </embed>
</object>

This was done quite easily because the code of the player can be automatically be build with the permalink of the video. Smart.

I tried to do the same then with Dailymotion, unfortunately they seem to not have think about that one as the URL use as a permalink for the video is not the same as the one to insert in the player code. Too bad!

I have not investigated all video system (I think Kewego should be allright) but if I was about to create some sort of Twitter-like video thingy, it is something I would probably like to think about… :-)

What about the comments ?
Well good question… so while I was at it I just did the same for the comments (see example), so that it is very easy to share video through the comments, and we are basically one step away for having a discussion through video. Quite easy to shoot its reaction to a post on YouTube, and just post the link as a comment! It will automatically transform the link into the YouTube player and make the video playable in the flow of the discussion.

2 comments