
120
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
To publish a stream through an RTMFP NetConnection to a remote server, pass a connection argument. The
NetConnection must use an RTMFP URI. Do not pass a groupspecifier argument.
Note: You cannot use the server-side NetStream class to play a stream.
Availability
Flash Media Server 3
RTMFP groups are available in Flash Media Server 4
Parameters
connection A NetConnection object.
groupspec (Optional) To publish or play a stream in a peer-to-peer multicast group, specify a groupspec string or a
GroupSpecifier object. To create a groupspec string, call
GroupSpecifier.toString().
Returns
A NetStream object if successful; otherwise, null.
Example
nc = new NetConnection();
nc.connect("rtmp://xyz.com/myapp");
ns = new NetStream(nc);
NetStream.attach()
ns.attach(stream)
Attaches a data source to the NetStream object.
Availability
Flash Media Server 3
Parameters
stream A Stream object. If you pass false, the attached Stream object detaches from the NetStream object.
Returns
A boolean value. If the attached object is a valid data source, true; otherwise, false.
Example
myStream = Stream.get("foo");
ns = new NetStream(nc);
ns.attach(myStream);
NetStream.bufferTime
ns.bufferTime
Read-only; indicates the number of seconds assigned to the buffer by the NetStream.setBufferTime() method.
Availability
Flash Media Server 3
Komentáře k této Příručce