
156
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
Example
The following 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");
}
The following 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");
}
The following example gets the length of the MP4 file beethoven.mp4 and assigns it to the variable streamLen:
function onProcessCmd(cmd){
var streamLen = Stream.length("mp4:beethoven");
trace("Length: " + streamLen + "\n");
}
Stream.liveEvent
stream.liveEvent
A string indicating the name of an HTTP Dynamic Streaming live event. For more information, see Using Adobe
HTTP Dynamic Streaming .
Availability
Flash Media Server 3.8
Example
The following example sets the name of a live event to “myevent”:
application.onPublish = function(clientObj, streamObj){
livestream = Stream.get("f4f:livestream");
livestream.liveEvent = "myevent";
livestream.record("record");
livestream.play(streamObj.name, -1);
}
Stream.maxQueueDelay
myStream.maxQueueDelay
The maximum time, in milliseconds, that the live queue can delay transmitting messages.
Availability
Flash Media Server 3.5
Example
For an example, see the Stream.publishQueryString property.
Commentaires sur ces manuels