Develop your own Plugins for Red5 SparkWeb

After Gato made this suggestion in my last blog, I decided to move this request to the top of my to-do list as I also need it for another project I am currently working on.

How does it work?

I am using the Flex Dashboard developed by ESRIA which was donated to the Adobe Developer Connection. Plugins are presented in a pod layout called a View. Each View occupies a Tab in the SparkWeb ChatWindow. You can modify Views by dragging and dropping pods to a different location and minimizing, maximizing, and restoring pod windows. View changes are saved using a LocalSharedObject. View configuration data is loaded from sparkweb/plugins/plugins.xml with values in plugins.xml indicating which swf file to load for a particular pod within each View.

SparkWeb will load each pod SWF file and call the method setParentApplication passing it the SparkWeb root Application object. From this object, you can navigate your way to access all other SparkWeb public objects and even add eventhandlers on events like NewMessage for example.

To get a feel of what can be done, I decided to implement the User Tunes and Moods PEP (personal eventing protocol) applications. See Armando Jagucki’s blog for more details about PEP in Openfire. The source code to the demo plugins is in the src/plugins folder.

For those interested, the latest version of Red5 Plugin for Openfire can be found at _ Remove comments in plugins.xml to activate the demo.

we are using openfire 3.6.2 and downloaded your latest excellent job.

unfortunately we cannot get our sparkweb or anything else working. I can see red5.html page but that is it. any suggestions?

I now got the sparkweb main page but that was it. when I copied red5.war over to openfire/plugins directory I made sure openfire was stopped before copying. Still working on a few issues.

In spark, our red5 plugin is not working. it is verion 0.0.6. I’d downloaded from latest red5 but it is still not working is spark.

Please provide some instructions. Like to try this.

One of these days, I will setup a Linux box and understand why the Red5 plugin in Linux is such a pain. For now there not much I can do without seeing any logs.

I have this working on my Windows PCs with no problems.

I just remembered. Red5 SparkWeb version 0.1.05 and above use TLS for socket connections which don’t login with Openfire 3.6.2. Either use the patch I supplied at _ or switch to http-bind.

yes that worked. changing socket to http in plugins/red5/sparkweb/index.html file.

problem #1

when I uncommented the your new plugins, in sparkweb it did not like it. said "unable to ___ at plugins/plugins.xml. It might be a linux thing.

problem #2

in spark under Red5, for all 3 features - open audio/video roster, view audio/video messages and publish desktop screen are not working




through spark, is there a way to use secure http bind port instead of unsecure http bind port?

Did you do this?

<?xml version="1.0" encoding="utf-8"?> <!-- - Represents a tab. id - Must be unique so state can be saved properly. label - The label of the tab. id - Must be unique per view so state can be saved properly. title - The title of the pod. dataSource - The xml to load for the pod.

Remove comments from tag below to activate plugins in SparkWeb


one reason is that red5 plugin assumes that openfire is started from openfire_home/bin. If isn’t, then all references to file names are incorrect. This is not a problem in Windows, but could be in Linux.

Hi Dele,

I’m trying to compile your Red5 SparkWeb but I’ve encountered some problems.
I’m using Windows 2000 with FlexBuilder 3.0.2, I’ve updated your script (located under sparkweb/src_3.6 folder) in order to launch my mxmlc.exe compiler, but there are some errors using both 3.1.0 and 3.2.0 sdks.

Here is my output when compiling red5 sparkweb 0.1.08:

Warning: Source path entry, ‘D:\TEMP\sparkweb\src_3.6\locale’, is a subdirectory of source path entry, ‘D:\TEMP\sparkweb\src_3.6’.

D:\TEMP\sparkweb\src_3.6\com\esria\samples\dashboard\view\PodContentBase.mxml(34 ): Error: Call to a possibly undefined method setParentApplication through a reference with static type mx.core:Application.

  •            _appLoaded.setParentApplication(Application.application);*

D:\TEMP\sparkweb\src_3.6\SparkWeb.mxml(259): Error: Implicit coercion of a value of type to an unrelated type com.jivesoftware.spark.managers:SparkManager.

  •             sparkManager =*

D:\TEMP\sparkweb\src_3.6\com\hurlant\crypto\symmetric\ col: 23: Warning: flex2.compiler.as3.SignatureExtension.SignatureGenerationFailed[level=‘warning’ , column=‘23’, node=‘ForStatement’, line=‘214’, cause='flex2.compiler.as3.SignatureAssertionRuntimeException: Unreachable Codepath
at flex2.compiler.as3.SignatureEvaluator.ASSERT(
at flex2.compiler.as3.SignatureEvaluator.UNREACHABLE_CODEPATH(SignatureEvaluator.j ava:357)
at flex2.compiler.as3.SignatureEvaluator.evaluate(
at macromedia.asc.parser.ForStatementNode.evaluate(
at flex2.compiler.as3.SignatureEvaluator.evaluate(
at macromedia.asc.parser.StatementListNode.evaluate(
at flex2.compiler.as3.SignatureEvaluator.evaluate(
at macromedia.asc.parser.ClassDefinitionNode.evaluate( )
at flex2.compiler.as3.SignatureEvaluator.evaluate(
at macromedia.asc.parser.StatementListNode.evaluate(
at flex2.compiler.as3.SignatureEvaluator.evaluate(
at macromedia.asc.parser.ProgramNode.evaluate(
at flex2.compiler.as3.SignatureExtension.generateSignature( :270)
at flex2.compiler.as3.SignatureExtension.doSignatureGeneration(SignatureExtension. java:174)
at flex2.compiler.as3.SignatureExtension.parse1(
at flex2.compiler.as3.Compiler.parse1(

', path=‘D:\TEMP\sparkweb\src_3.6\com\hurlant\crypto\symmetric\’]

  •        for (i=0;i<256;i++) {

What’s wrong with my setup?

Use make_sparkweb_final.cmd. It has compiler flag -strict=false

Correct syntax is

xxxxx( _appLoaded).setParentApplication(Application.application);

We can’t use strict compilation as the plugin class name xxxxx is unknown at compilation time

Thanks for your quick response .

Tried the other script, the 2 compiling errors have been replaced by this new one:

D:\TEMP\sparkweb_all_versions\red5–0.1.08\sparkweb\src_3.6\com\jivesoftware\spa rk\ChatContainer.mxml(671): Error: Type was not found or was not a compile-time constant: SuperTabNavigator.

  •    id="chatFrame"*

Any suggestion?

You need flexlib.swc in frameworks\libs. Download from

Thanks again for your hint, I’m a newbie with Flex .

Now compilation works!


I’ve trying to download Red5 Plugin but the url was not found.

For those interested, the latest version of Red5 Plugin for Openfire can be found at _ Remove comments in plugins.xml to activate the demo.




Powered by Jetty://

Anyone can help?

Looks like there is an issue with this site and can not download the file. does anyone else has this and upload it somewhere else please so we can all download?

Many thanks