MACROMEDIA FLASH MEDIA SERVER 2-SERVER MANAGEMENT ACTIONSCRIPT LANGUAGE Manuale Utente Pagina 46

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 155
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 45
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
43
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
Enables Flash Player to access raw, uncompressed video data from streams in the specified folders.
Calls the
BitmapData.draw() method in client-side ActionScript 3.0 to read the raw data for a stream that is
currently playing. For more information, see the
BitmapData.draw() entry in ActionScript 3.0 Language and
Components Reference.
Availability
Flash Media Interactive Server 3 and Flash Media Development Server 3
Example
The following server-side code sets the
videoSampleAccess directory to publicdomain for paying customers:
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 the 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.audioSampleAccess
Client.virtualKey
clientObject.virtualKey
A virtual mapping for clients connecting to the server. When a client connects, it receives a virtual key that corre-
sponds to ranges that you set in the Vhost.xml file. You can use
Client.virtualKey to change that value in a server-
side script. The following is the code in the Vhost.xml file that you must configure:
<VirtualKeys>
<!-- Create your own ranges and key values.-->
Vedere la pagina 45
1 2 ... 41 42 43 44 45 46 47 48 49 50 51 ... 154 155

Commenti su questo manuale

Nessun commento