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

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 172
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 127
125
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
If you pass "appendWithGap", additional information about time coordination is passed to help the server determine
the correct transition point when dynamic streaming. For more information about using "
appendWithGap", see Using
DVR with dynamic streaming.
The server stores recorded files in the streams subfolder of the application’s folder, for example,
RootInstall/applications/sampleapplication/_definst_/streams. The recorded file has the filename passed in the
name
parameter. For example,
NetStream.publish ("mp4:streamname.f4v", "record") creates the file
streamname.f4v.
Example
application.onPublish = function(client, myStream){
nc = new NetConnection();
nc.connect("rtmp://example.com/myApp");
ns = new NetStream(nc);
ns.attach(myStream);
ns.publish(myStream.name, "live");
};
The following example shows how to record an F4V file on the remote server.
application.onPublish = function(client, myStream){
nc = new NetConnection();
nc.connect("rtmp://example.com/myApp");
ns = new NetStream(nc);
ns.attach(myStream);
ns.publish("mp4:" + myStream.name, "record");
};
NetStream.send()
ns.send(handlerName, [p1, ..., pN])
Broadcasts a data message over a stream.
Availability
Flash Media Server 3
Parameters
handlerName A string that identifies the name of the handler to receive the message.
p1, ..., pN Optional parameters of any type. They are serialized and sent over the connection. The receiving
handler receives them in the same order.
Returns
A boolean value; true if the data message is dispatched; otherwise, false.
Example
The following client-side code broadcasts the message "Hello world" to the foo handler function on each client that
is connected to
myApp:
nc = new NetConnection();
nc.connect("rtmp://xyz.com/myApp");
ns = new NetStream(nc);
ns.send("foo", "Hello world");
Vista de pagina 127
1 2 ... 123 124 125 126 127 128 129 130 131 132 133 ... 171 172

Comentarios a estos manuales

Sin comentarios