User Guide

Working with video 61
By default there are no values in the Key tags. To implement this feature, you must add the
key values, either directly in the vhost.xml file, or with the
Stream.setVirtualPath()
method. For example, to implement this feature, set the first key to A, and the second two
keys to B, as in the following code:
<VirtualKeys>
<Key from="WIN 7,0,19,0" to="WIN 9,0,0,0">A</Key>
<Key from="WIN 6,0,0,0" to="WIN 7,0,18,0">B</Key>
<Key from="MAC 6,0,0,0" to="MAC 7,0,55,0">B</Key>
</VirtualKeys>
The following is an example of what the <VirtualDirectory> section from the vhost.xml file
could look like (the key attribute values and Streams tag values are not in the file by default).
The virtual keys are mapped to a virtual path and a physical directory, which are separated by
a semicolon (for example,
foo;c:\streams). To set up several virtual directories for different
Flash Player versions, use the same virtual path with different physical directories for each
Streams tag, as in the following example:
<VirtualDirectory>
<!-- Specifies virtual directory mapping for recorded streams. -->
<!-- To specify multiple virtual directory mappings for a stream,-->
<!-- add additional <Streams> tags; one for each virtual dir -->
<!-- mapping. Syntax for virtual directories is as follows: -->
<!-- <Streams>foo;c:\data</Streams>. This maps all streams whose -->
<!-- names begin with "foo/" to the physical directory c:\data. -->
<!-- For example, the stream named "foo/bar" would map to the -->
<!-- physical file "c:\data\bar.flv". Similarly, if you had a -->
<!-- stream named "foo/bar/x", then we first try to find a vdir -->
<!-- mapping for "foo/bar". Failing to do so, we then check for -->
<!-- a vdir mapping for "foo". Since there is one, the stream -->
<!-- "foo/bar" corresponds to the file "c:\data\bar\x.flv". -->
<Streams key="A">foo;c:\streams\on2</Streams>
<Streams key="B">foo;c:\streams\sorenson</Streams>
<Streams key="">foo;c:\streams</Streams>
</VirtualDirectory>
For more information about the vhost.xml file, see “Vhost.xml file” in Managing Flash Media
Server.