MACROMEDIA FLASH MEDIA SERVER 2-CLIENT-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR FLASH MEDIA SERVER 2 Manual do Utilizador Página 56

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 172
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 55
53
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
Sets the maximum bandwidth for this client from client to server, server to client, or both. The default value for a
connection is set for each application in the
Client section of the Application.xml file. The value specified cannot
exceed the bandwidth cap value specified in the Application.xml file. For more information, see
BandwidthCap in the
Adobe Media Server Configuration and Administration Guide.
You can call this method from a client-side script. Call the NetConnection.call() method and pass it the name of
the method, a result object, and any arguments, as in the following:
var re:Responder = new Responder(res);
function res(info) {
trace(info);
for (var i:String in info) { trace(i + " - " + info[i]); }
}
nc.call("setBandwidthLimit", re, 125000, 125000);
Availability
Flash Communication Server 1
Parameters
iServerToClient A number; the bandwidth from server to client, in bytes per second. Use 0 if you don’t want to
change the current setting.
iClientToServer A number; the bandwidth from client to server, in bytes per second. Use 0 if you don’t want to
change the current setting.
Example
The following example sets the bandwidth limits for each direction, based on values passed to the onConnect()
function:
application.onConnect = function(newClient, serverToClient, clientToServer){
newClient.setBandwidthLimit(serverToClient, clientToServer);
application.acceptConnection(newClient);
}
Client.uri
clientObject.uri
Read-only; the URI specified by the client to connect to this application instance.
Availability
Flash Media Server 2
Example
The following example defines an onConnect() callback function that sends a message indicating the URI that the
new client used to connect to the application:
application.onConnect = function(newClient, name){
trace("New user requested to connect to " + newClient.uri);
};
Client.videoSampleAccess
clientObject.videoSampleAccess
Vista de página 55
1 2 ... 51 52 53 54 55 56 57 58 59 60 61 ... 171 172

Comentários a estes Manuais

Sem comentários