Stream.setVirtualPath()
Availability
Flash Media Server 2.
Usage
myStream.setVirtualPath(virtualPath, directory, virtualKey)
Parameters
A string indicating the virtual directory path of a stream. If the stream is not
virtualPath
located in the virtual path, the default virtual directory path is searched.
A string indicating the physical directory in which to store streams.
strDirectory
A string that sets or removes the key value for each virtual path entry.
virtualKey
Returns
Nothing.
Description
Method; sets or removes the virtual directory path for video stream playback.
Flash Media Server can deliver two video codecs to clients: Sorenson Spark and the On2 VP6
codec. Flash Player 8 supports both codecs; Flash Player 7 and earlier supports only Sorenson
Spark. You can use the
method to dynamically serve Flash Player
Stream.setVirtualPath()
8 clients a better version of a video stream.
When Flash Player requests a stream from Flash Media Server, the Flash Player version
determines the server-side
property (typically a mapping of the Flash
Client.virtualKey
Player version). Flash Media Server then serves the client a stream from whichever virtual
directory the virtual key is mapped to. For example, if the client is Flash Player 8, the virtual
key might map to the On2 streams directory, and the client would be served a higher quality
stream. If the client is Flash Player 7, the virtual key might map to the default stream
directory. This feature allows you to serve the same content to all clients in the optimum
encoding for each client's platform.
The mapping between the virtual keys and virtual directories is made in the vhost.xml file.
(For more information about the vhost.xml file, see "The Vhost.xml file" in Managing Flash
Media Server). When you call
, you are changing values in the
setVirtualPath()
tag of that file.
VirtualDirectory
158
Server-Side ActionScript Language Reference
Need help?
Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?