
48
FLASH
MEDIA
SERVER
4.5
CONFIGURATION
AND
ADMINISTRATION
Configuring the server
Last updated 11/28/2012
trace("I am " + application.config.use " and I work in the " +
application.config.dep " department.");
trace("I am " + application.config["user_name"] + " and I work in the " +
application.config["dept_name"] + " department.");
The output from either statement would be as follows:
I am jdoe and I work in the engineering department.
You can also use environment variables and symbols you define in the substitution.xml file. For example, assume that
the environment variable
COMPUTERNAME
is equal to
jsmith01
, and you have defined a symbol named
DEPT
in the
substitution.xml file:
<Root>
<Symbols>
<DEPT>Engineering</DEPT>
</Symbols>
</Root>
In addition, the following XML appears in the Application.xml file:
<Application>
<ScriptEngine>
<config>
<compName>${%COMPUTERNAME%}</compName>
<dept>${DEPT}</dept>
</config>
</ScriptEngine>
</Application>
In a server-side script, the following
trace
statements are valid:
trace("My computer's name is: " + application.config.compName);
trace("My department is: " + application.config.dept);
The output is as follows:
My computer's name is: jsmith01
My department is: Engineering
Note:
Server-side ActionScript
trace()
statements display in the Live Log panel of the Administration Console.
More Help topics
“
Using symbols in configuration files
” on page 18
Configure or disable native bandwidth detection
The server can detect a client’s bandwidth in the core server code (called
native bandwidth detection
), or in a server-
side script (called
script-based bandwidth detection
). Native bandwidth detection is faster than script-based because the
core server code is written in C and C++. Also, with native bandwidth detection, if a client connects through edge
servers, the outermost edge server detects the bandwidth, which results in more accurate data. Native bandwidth
detection is enabled and configured by default.
The server detects bandwidth by sending a series of data chunks to the client, each larger than the last. If desired, you
can configure the size of the data chunks, the rate at which they’re sent, and the amount of time the server sends data
to the client. For more information about detecting bandwidth in an application, see the
Developer Guide
.
1
Open the Application.xml file.