MACROMEDIA FLASH MEDIA SERVER 2-CLIENT-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR FLASH MEDIA SERVER 2 Manual de usuario Pagina 122

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 172
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 121
119
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
2 To connect to the server acting as the introducer for the RTMFP group, call the connect() method and connect
to the server-side application:
nc.connect("rtmfp://localhost/appname/appinstancename");
Note: Remember to use the RTMFP protocol.
3 To create a stream over the NetConnection, call the NetStream constructor and pass the NetConnection and a
GroupSpecifier:
var ns = new NetStream(nc, groupspecifier);
4 To publish a stream to a group, call publish() and pass a name for the stream. Stream data is routed to the RTMFP
group, it is not copied at the server.
ns.publish("mystream");
5 To subscribe to this stream, clients call the play() method and pass the stream name. Clients receive the stream
from the group, not from the server. The following is client-side code:
mynetstream.play("mystream");
Availability
Flash Media Server 3
RTMFP groups are supported in Flash Media Server 4
Property summary
Method summary
Event handler summary
NetStream class constructor
ns = new NetStream(connection[, groupspec])
Creates a stream that can be used for publishing (sending) data through the specified NetConnection object. You can
create multiple streams that run simultaneously over the same connection.
To publish a stream through an RTMFP NetConnection to a group, pass a groupspecifier argument.
Property Description
NetStream.bufferTime Read-only; indicates the number of seconds assigned to the buffer by the
NetStream.setBufferTime() method.
NetStream.time Read-only; indicates the number of seconds the stream has been publishing.
Method Description
NetStream.attach() Attaches a data source to the NetStream object.
NetStream.publish() Publishes a stream to a remote server.
NetStream.send() Broadcasts a data message over a stream.
NetStream.setBufferTime() Sets the size of the outgoing buffer in seconds.
Event handler Description
NetStream.onStatus() Invoked every time a status change or error occurs in a NetStream Object.
Vista de pagina 121
1 2 ... 117 118 119 120 121 122 123 124 125 126 127 ... 171 172

Comentarios a estos manuales

Sin comentarios