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

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 155
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 111
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
109
<Key from="WIN 8,0,0,0" to="WIN 9,0,59,0">A</Key>
<Key from="WIN 6,0,0,0" to="WIN 7,0,55,0">B</Key>
</VirtualKeys>
Next, in the VirtualDirectory section of the Vhost.xml file, map the virtual keys 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 shown in this example:
<VirtualDirectory>
<Streams key="A">foo;c:\streams\on2</Streams>
<Streams key="B">foo;c:\streams\sorenson</Streams>
</VirtualDirectory>
Flash Media Interactive Server serves the client a stream from whichever virtual directory the virtual key is mapped
to. For example, if the client is Flash Player 8 and the call is
myNetStream.play("foo/familyVideo"), the
Streams element with key A would be used and the client would be served the higher-quality stream
c:\streams\on2\familyVideo.flv. If the client is Flash Player 7, the same URL maps to the sorenson stream directory
and the c:\streams\sorenson\familyVideo.flv file plays.
It is most common to change the values of the
VirtualKeys and VirtualDirectory elements in the Vhost.xml file.
However, you can call
Stream.setVirtualPath() to create Streams elements and you can use
Client.virtualKey to set a clients Key value.
For more information about the Vhost.xml file, see Adobe Flash Media Server Configuration and Administration
Guide.
Availability
Flash Media Server 2
Parameters
virtualPath A string indicating the virtual directory path of a stream. If the stream is not located in the virtual
path, the default virtual directory path is searched.
directory A string indicating the physical directory in which to store streams.
virtualKey A string that sets or removes the key value for each Streams entry.
Note: To indicate a slash in the
virtualPath and directory parameters, you must use a forward slash (/) or a double
backslash (
\\). In strings, single backslashes are used to escape characters. A double backslash is the escape sequence for
a backslash character.
Example
The following code sets the virtual key to
B, the virtual path to foo, and the physical directory to c:\streams\on2:
Stream.setVirtualPath("foo", "c:/streams/on2", "B");
Stream.size()
Stream.size(name[, virtualKey])
Static; returns the size of a recorded stream in bytes.
Availability
Flash Media Server 2
Vedere la pagina 111
1 2 ... 107 108 109 110 111 112 113 114 115 116 117 ... 154 155

Commenti su questo manuale

Nessun commento