
38
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
application.onConnect = function(client) {
// Anyone can play free content, which is all streams placed under the
// samples/, publicdomain/ and contrib/ folders.
client.readAccess = "samples;publicdomain;contrib";
// Paying customers get to watch more streams.
if ( isPayingCustomer(client))
client.readAccess += "nonfree;premium";
// Content can be saved (user recorded streams) to contrib/ folder.
client.writeAccess = "contrib";
// Anyone can gain access to an audio snapshot of the publicdomain/ folder.
client.audioSampleAccess = "publicdomain";
// Paying customers can also get a video snapshot of the publicdomain/ folder.
if (isPayingCustomer(client))
client.videoSampleAccess = "publicdomain";
}
See also
Client.videoSampleAccess
Client.call()
clientObject.call(methodName, [resultObj, [p1, ..., pN]])
Executes a method in client-side code or on another server. The remote method can return data to the resultObj
parameter, if provided. Whether the remote agent is a client or another server, the method is called on the remote
agent’s NetConnection object.
In ActionScript 2.0, define the method on the NetConnection object. In ActionScript 3.0, assign the
NetConnection.client property to an object on which callback methods are invoked. Define the method on that
object.
Availability
Flash Communication Server 1
Parameters
methodName A string indicating a remote method. The string uses the form "[objectPath/]method". For example,
the string
"someObj/doSomething" tells the client to invoke the NetConnection.someObj.doSomething() method
on the client or remote server. The string
"doAction" calls the doAction() method on the client or remote server.
resultObj An Object. This is an optional parameter that is required when the sender expects a return value from the
client. If parameters are passed but no return value is desired, pass the value
null. The result object can be any object
that you define. To be useful, it should have two methods that are invoked when the result arrives:
onResult() and
onStatus(). The resultObj.onResult() event is triggered if the invocation of the remote method is successful;
otherwise, the
resultObj.onStatus() event is triggered.
p1, ..., pN
Optional parameters that can be of any ActionScript type, including a reference to another ActionScript
object. These parameters are passed to the
methodName
parameter when the method is executed on the Flash client. If you
use these optional parameters, you must pass in some value for
resultObj
; if you do not want a return value, pass
null
.
Komentarze do niniejszej Instrukcji