Friday, 27 April 2012

The Underrated Source of Everything!

"Too often we are so preoccupied with the destination,we forget the journey"

With so much ado about the journey being better than the destination..and everyone striving to reach their destination..how many of us wonder about the underrated source ?

Is it just as forgotten as it is in the old saying..that no one really wonders about how it all began,what led to its inception..somehow it is all about the journey or the destination..the traveller with his tales..did he ever say what made him start.. and led to his travels..and I dont mean the thought process or how it struck him..just the trigger that made him get up and get out..that moment suspended in time when you made a path setting decision..and then promptly forgot what made you do it...nope not the thoughts,rather the act,thats what you let go of!

This seemingly uncaring way of being is a waste of some really special information,that elusive "something" which made u act! So you were thinking about something..maybe as inconsequential as asking someone out!..and then that "something" happened and you actually did it..u had your beautiful journey ,took it as it came..and then it changed..did you look back on your "something" and re-live your journey from there on,only to realise how you got to your present? Maybe it could have set the process to improve the present situation,if not then maybe suggest a new thought process,the beginning of yet another journey maybe?

So why not build a new strategy,whenever you are stuck in a muddle and you don't know how to get out of it,look back to what got you there.Remember the trigger and then relive it..and let it set the trend for some new inspiration!


Wednesday, 18 April 2012

The Golden Hues!

The Golden Hues! by Viny N
The Golden Hues!, a photo by Viny N on Flickr.

ColdFusion IceBreaker #5: JBOSS 7.1 and OpenOffice for ColdFusion cfdocument


In JBOSS7.1 , there have been major changes in the class loading behaviour of applications .Due to this we need to make a few changes to use ColdFusion's cfdocument and other OpenOffice features.Class loading is based on modules,with each module having its module.xml in which one can specify dependencies on the other modules using the <dependencies> element.

To support OpenOffice with JBOSS7.1 for cfdocument, you need to:
1)Install OpenOffice and add the installation path in the ColdFusion Admin
2)Edit the module.xml located in <JBOSS_HOME>/modules/sun/jdk/main and put the following entry there:
<path name="com/sun/star/lib/loader"/>
3)Start JBOSS with the following flag in the standalone.bat/standalone.sh.
-Djava.ext.dirs=<jboss-deployment-dir>/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib/oosdk/:<java-home>/lib/ext/
(':' for unix based machines and ';' in windows)

The <dependecies> element can be used to specify dependencies on the paths and packages  from the class loader which loaded JBoss Modules.These can in turn be specified for re-exported if specified using the <export> element.The <path> element is used here to list the paths.

Adding the oosdk package to the java.ext.dir ensures that the classes of that package can be found and loaded without them being on the actual class path.

One need not add the individual jars to the JBOSS classpath or the java classpath

Click here  for MAC OSX specific instructions. These just make life easier :D.

Thursday, 1 March 2012

ColdFusion IceBreaker #4 : The "CF10-HTML5 Video" story begins !


With Coldfusion 10, we deep dive into the world of HTML5 video support through the CFMEDIAPLAYER tag.

Then(CF 9) :  The cfmediaplayer tag could only support Flash videos,the likes of flv,f4v.

Now (CF 10):  The cfmediaplayer can now support HTML 5 videos , the likes of mp4,ogv,webm ; formats conditioned for video playback over the internet.These require no additional plugins. You can skin/style the player,use Javascript functions ,set event handlers and even set a customised title !

More on all that later!!

Snippet #1:  Just specify your HTML5 video in the source attribute of the cfmediaplayer tag
<cfmediaplayer name="player1" source="sample_webm.webm" />

Play the snippet in Firefox or Chrome to view the webm video

Alternately , you can use ColdFusion.MediaPlayer.setSource() method and add to your existing code.

Snippet #2 : Use the all new "type" attribute to tell your browser whether to play the same video as flash or HTML. This is pretty useful when you want to enforce a particular type of content to be sent to the client.
MP4 videos can play as flash and HTML videos. This essentially means that if you try to play an MP4 video with flash enabled,you see a flash player loaded (right click on the player and observe the "About Flash Player" info ) and when flash is disabled the HTML% player is loaded

Try this in Chrome to see the difference:
<cfmediaplayer name="player2" source="sample_mp4.mp4" type="html" /><br>
<cfmediaplayer name="player3" source="sample_mp4.mp4" type="flash" />
The Flash and HTML5 players have been designed to look as identical as possible so as to support seamless fallback.

Snippet #3: Use the HTML source tag to set multiple videos as sources to the cfmediaplayer tag and let ColdFusion handle the video playback depending on video support by the browser

<cfmediaplayer name="player4" source="sample_webm.webm" type="html">
<source src="sample_mp4.mp4" type="video/mp4" />
</cfmediaplayer>

Now play the snippet in IE9,Firefox,Chrome and Safari .

You will see :
IE9 and Safari5 : playing sample_mp4.mp4 in HTML because it currently doesnt support WEBM
Firefox and Chrome : playing sample_webm.webm

A few things to consider :


1)Use the <!DOCTYPE html > and the <head/> <body> tags to write your cfm page for best results. A few browsers will not render the player properly otherwise!
2)Can't play your video ?  Are you using a web server ? Then make sure the right mime-types are added so that content can be served to the client.
3)Video playback is subject to browser support for formats,codecs and rendering.

More on Flash-HTML fallback in the next post!

Downloads :

Right Click and save as to download sample_mp4.mp4

Right Click and save as to download sample_webm.webm