SSAS サポート - ベース

The foundation classes for SSAS support are now available, the actual SSAS API (partial) to be provided as soon as time allows. In a nutshell, to use the layer, you place your FMS scripts in a webapp configured to use FMSAdpater. From there on in, the scripts drive the behaviour of the Red5 application. Before hopes are raised too high too soon, bear in mind that the code attached actually provides the proposed basis for Red5 scripting applications - it is from this code base that SSAS 'simulation' will be provided - this is the 'hello world' of the underlying implementation. Rather than go into detail here (for the moment), the source code attached has been commented and should provide some insight.


ScriptingApplication. A generic encapsulation of common operations associated with obtaining and evaluating programs written in JSR-223 specification supported languages. Pending critical review, it is hoped that ScriptingApplication will become the adopted means to support scripted Red5 applications.

ECMAScriptApplication. A specialization of ScriptingApplication, ECMAScriptApplication builds on the functionality of ScriptingApplication. In addition it provides a streamlined interface to define Host objects, gobal properties, constants and methods. It has been designed to take advantage of the underlying Mozilla Rhino implementation that ships with JavaSE6. The reason to support the 'phobos' implementation, rather than building Rhino from scratch is primarily to avoid introducing potential instabilities to the code base, and the phobos implementation is generally considered stable. Unlike the SSAS interpreter demoed at FITC, which was based on a (since deprecated) bespoke Rhino build, the forthcoming SSAS interpreter will be based on ECMAScriptApplication and the phobos implementation.

ScriptingApplicationAdapter. ScriptingApplicationAdapter extends ApplicationAdapter and is a generic encapsulation of the common operations of hooking up scripting application functionality to the Java based Red5 API. At present, the imlementation only supports single scope applications. Multiscope scripting application support is in development.

ECMAScriptApplicationAdapter. ECMAScriptApplicationAdapter subclasses ScriptingApplicationAdapter to support the means for implementors to develop bespoke ECMAScript Host Object API's to run on top of the Red5 Java API. FMSApplicationAdapter will be a specialization of ECMAScriptApplicationAdapter. In addition to these classes a number of proposed conventions have been developed, primarily with regard to defining ECMAScript host objects. Any of you familiar with the Mozilla Rhino host object API will be familiar with its eccentricities. Example source code provided details the proposed conventions for adoption by Red5 developers when developing scripting support in ECMAScript derivitive languages.

Instructions. Obtain Red5 from the repository and build the project in Eclipse as per the norm. Download the attached files ( and Place the class file contents of into the src folder of your Red5 project directory. Place the contents of into your webapps folder. Read through the source and you should be good to go\!

If you want some more information, feel free to unzip ScriptingApplication(standalone).zip - a standalone development implementation of ECMAScriptApplication (that is, does not require Red5) demonstrating a simple use case. A word of warning, however, some of the comments are incomplete. More meaningful examples will follow soon.

Please leave comments, feature requests, bug reports, experiences and criticisms on this page of the wiki as this project is developed further.