
68
Example
This example gets the length of the recorded stream file myVideo and assigns it to the variable
streamLen:
function onProcessCmd(cmd){
var streamLen = Stream.length("myVideo");
trace("Length: " + streamLen + "\n");
}
This example gets the length of the MP3 file beethoven.mp3 and assigns it to the variable
streamLen:
function onProcessCmd(cmd){
var streamLen = Stream.length("mp3:beethoven");
trace("Length: " + streamLen + "\n");
}
Stream.name
Availability
Flash Communication Server MX.
Usage
Stream.name
Description
Property (read-only); contains a unique string associated with a live stream.
You can also use this as an index to find a stream within an application.
Example
The following function, getStreamName, takes a stream reference as an argument, myStream, and
returns the name of the stream associated with it.
function getStreamName (myStream) {
return myStream.name;
}
Stream.onStatus
Availability
Flash Communication Server MX.
Usage
myStream.onStatus = function([infoObject]) {
// Insert code here
};
Parameters
infoObject An optional parameter defined according to the status message. For details about
this parameter, see Appendix, “Server-Side Information Objects,” on page 77.
Returns
Nothing.
Kommentare zu diesen Handbüchern