MACROMEDIA FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE Reference page 160

Server-side actionscript language reference
Table of Contents

Advertisement

Example
The following code sets the virtual key to B, the virtual path to /foo, and the physical
directory to c:\streams\on2:
myStream.setVirtualPath("B", "/foo", "c:\streams\on2");
Stream.size()
Availability
Flash Media Server 2.
Usage
Stream.size(name[, virtualKey])
Parameters
A string indicating the name of a stream. You can use the format tag in the
name
parameter to specify the type.
A string indicating a key value. Starting with Flash Media Server 2, stream
virtualKey
names are not always unique; you can create multiple streams with the same name, place them
in different physical directories, and use the VirtualDirectory section and VirtualKeys section
of the vhost.xml file to direct clients to the appropriate stream. Because the
method is not associated with a client, but connects to a stream on the server, you may need to
specify a virtual key to identify the correct stream. For more information about keys, see
Client.virtualKey
Returns
A number indicating the size of the stream; if the requested stream is not found, returns 0.
Description
Method (static); returns the size of a recorded stream in bytes.
Example
The following examples return the size of a stream and an MP3 stream, respectively:
function onProcessCmd(cmd){
// Insert code here...
var streamSize = Stream.size("foo");
trace("Size: " + streamSize + "\n");
}
//For mp3
160
Server-Side ActionScript Language Reference
. This parameter is optional.
name
Stream.size()

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash media server 2

Table of Contents