
54
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
Enables Flash Player to access raw, uncompressed video data from streams in the specified folders.
Call 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 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
Use this property in conjunction with the Stream.setVirtualPath() method to map stream URLs to physical
locations on the server. This allows you to serve different content to different versions of Flash Player.
When a client connects, it receives a virtual key that corresponds 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.-->
<!-- You can create as many Key elements as you need.-->
<Key from="WIN 7,0,19,0" to="WIN 9,0,0,0">A</Key>
</VirtualKeys>
Using the previous Vhost.xml file, if a Flash Player 8 client connected to the server, its Client.virtualKey value
would be
A.
Komentáře k této Příručce