Feb 16

I try to enhance my posts with audio or video whenever possible and I just realized that the simple media component I threw together to do this might be useful for other people using BlogCFC or BlogFusion so I figured I’d bubble it back up into the community. I did separate files for audio and video but with a little more thought the media type could be abstracted and you could just use one file. Here’s how I do it:

  1. create a separate directory for video and audio, encode the clips in .flv and .mp3 format and place them in their respective directories
  2. put the .swf for each type of media in its respective directory. The audio player is an example of calling inline and therefore only uses the swf, the video player is a separate external .cfm file that demonstrates playback in a new window. This just shows two ways of doing it and either component could be switched to inline or external.
  3. use the following code in your post to call the media files:
<!— inline Audio Player Code —>
<object classid=“clsid:d27cdb6e-ae6d-11cf-96b8-444553540000” codebase=
http://fpdownload.macromedia.com/pub/
shockwave/cabs/flash/swflash.cab#version=7
,0,0,0
width=“330” height=“230” id=“playback” align=“middle”>

<param name=“allowScriptAccess” value=“sameDomain” />
<param name=“movie” value=“/downloads/audio/inlineAudioplayer.swf” />
<param name=“quality” value=“high” />
<param name=“bgcolor” value=“#ffffff” />
<embed xsrc=“/downloads/audio/inlineAudioplayer.swf
?audioFile=http://www.Your_Domain_Goes_Here.com/audio/test.mp3
quality=“high” bgcolor=“#ffffff” width=“330” height=“230” name=“playback” align=“middle” allowScriptAccess=“sameDomain” type=“application/x-shockwave-flash” pluginspage=http://www.macromedia.com/go/getflashplayer />

</object><!— calling the external video player —>
<a xhref=
/video/VideoPlayer.cfm?theFile=test.flv
>

Launch Video</a>

I’ve zipped up the test files and put them here. I also included the .fla files so you can see how the .swf’s were built and re-skin them if you like. The real key to this technique is a small bit of actionscript in the swf that treats the file name as a variable so you can pass it in dynamically. Until we find a service that does protected podcasts, we’re using this audio component in conjunction with my iTalk within the Grid7 pilot right now internally to capture the audio from our meetings and make it available via streaming flash audio. It’s useful for anyone who missed, any participants that were there but need clarification (or inspiration) and most importantly, so future members can hear the conversations that have taken place before they arrived and so they can come up to speed quickly and get an idea of the culture of Grid7 before their first participation. Hit me here with any questions if you need help on setting it up. I use Quicktime to export as .flv for the video (I know Sorenesen Squeeze is supposed to be good too). I know someone in our CFUG had been working on a server-side way of encoding the .flv’s so you could just upload the .avi and not worry about that piece. Would be slick to see a total solution integrated with BlogCFC. Hopefully this trick reduces the friction for people adding media to posts and more people start doing it.

On an entirely different topic, we had a bit of a snafu with the Grid7 domain on our first day out of the gate and have chose to change domains and rebrand while we’re still a newborn. If you’re interested, this is the detail of what happened. The new domain is Grid7Labs.com– anyone who subscribed to the RSS feeds since Tuesday will need to update their feeds to reflect the new URL.

sean

© 2005 Lights Out Production – All Rights Reserved Worldwide

Leave a Reply

preload preload preload