BoonEx Home Trac
 
 

Creating Ray MultiMedia Server application

Ray MultiMedia Server (RMS) is based on open-source Flash Server RED5 (http://osflash.org/red5/). We have provided you with a current, stable version of RED5. It’s available at (links to be inserted) UNIX OS and (links to be inserted) for Windows OS. Also you need is to install Java SDK. You can get it from http://www.sun.com.

For the RMS application you can use our sample. Let’s assume your new application will be named “my_app”. For this you should do the following:

  1. Open “build.xml” file for edit. Find the following code (it appears twice):
<!--
<mkdir dir="${src.dir}/../webapps/[NAME]/WEB-INF/classes"/>
<mkdir dir="${src.dir}/../webapps/[NAME]/WEB-INF/lib"/>
-->

You should remove comments or copy and paste without comments, replacing "[NAME]" with "my_app". Find the following code:

<!--
<javac
sourcepath=""
srcdir="${src.dir}/../webapps/[NAME]/WEB-INF/src"
destdir="${src.dir}/../webapps/[NAME]/WEB-INF/classes"
classpathref="webapps.classpath"
optimize="${build.optimize}"
verbose="${build.verbose}"
fork="${build.fork}"
nowarn="${build.nowarn}"
deprecation="${build.deprecation}"
debug="${debug.state}"
compiler="${compiler}"
source="${java.target_version}"
target="${java.target_version}"
/>
-->

You should remove comments or copy and paste without comments, replacing “[NAME]” with "my_app". Find the following code:

<!--
<jar destfile="${src.dir}/../webapps/[NAME]/WEB-INF/lib/[NAME].jar">
<fileset dir="${src.dir}/../webapps/[NAME]/WEB-INF/classes">
<include name="**"/>
</fileset>
</jar>
-->

You should remove comments or copy and paste without comments, replacing "[NAME]" with "my_app". Save and close the file.

  1. Copy the “webapp_sample” folder to the “webapps” directory and rename it to "my_app";
  1. Go to the “webapps/my_app/WEB-INF” folder. Here you should edit “red5-web.properties”, “red5-web.xml” and “web.xml” files, replacing [NAME] with “my_app” and [SOCKET] with your server socket ([IP]:[PORT]);
  1. Go to “src\org\red5\server\webapp” and rename the “sample” folder to “my_app”;
  1. Now you should edit “src\org\red5\server\webapp\my_app\Application.java” file. This will be your new application main source file. First of all replace “[NAME]” with “my_app” in package name.
  1. In all our server applications we have a security method “checkDomain” that denies connections from any domain except the ones in “access.dat” list. So we recommend that you use it in your applications, too. See demo3 as an example to know how to use it.
  1. After you finish editing your application source you should compile it with “compile.sh” (don’t forget to configure JAVA_HOME as path to JRE in “compile.sh” and “red5.sh” files).
  1. After your application is tested and runs perfectly you can distribute it in your widget package (usually named like “[NAME]_rms” – “my_app_rms”). You need to delete the “classes” and “src” folders from "webapps/my_app/WEB-INF” before distributing it.