Yesterday I posted a video demo of my new ColdFusion Builder Extension. I recorded the mp4 demo using Jing Pro which I am really like. I was really tired of posted videos the way I used to. I would record a video, take a screen shot of the 1st frame, post the screen shot on my blog and link to a view in a new window.

Now that I am up and running on ColdFusion 9 I thought it was time to take advantage of cfmediaplayer. This tag does what all ColdFusion tags do, make something very easy to do. Just by passing a source you can embed a player that has all the controls as well as full screen capabilities. This is exactly what I needed, but how was I going to use it on myblog. I couldn't just use the following code in a blog post.

Trying to figure out how I could easily integrate this into BlogCFC I recruited the help of my friend Todd Sharp. He said that Ray was already doing something similar with cfinclude and that I should be able accomplish this pretty easily.

I went looking through the source and I found out how this actually works. When a entry displays its content it calls the renderEntry method which can be found in the blog.cfc oomponent. In the render entry method you will find the following snippet of code. Basically any method in the org/camden/blog/render folder gets put into a collection and looped over. Each render component will have a render dipslay method which it then uses to run a piece of code. In the include example that comes with BlogCFC you can get an idea what Ray was going for here. This is a way to type include in a blog post and actually run the cfinclude tag.

With that in mind I figured it would be pretty easy to copy that format for my media player tag. Just create a mediaplayer.cfc using the following code and drop it in the org/camden/blog/render folder. Now anytime I want to use the cfmediaplayer tag in my blog posts I can simply use the following and my video will displayed inline.

Just another reason why I love BlogCFC. This is a really great feature, you are the man Ray!