
Working with video
59
Consider the following example: a user wants to play a stream and has Flash Player 8 installed
on their computer. Flash Player 8 is capable of playing On2 video. Flash Media Server
requests the HappyStream.flv file. After contacting the server, Flash Player 8 determines the
value of the server-side
Client.virtualKey
property. The
virtualKey
property maps to the
On2 streams directory, instead of to the default streams directory and the HappyStream.flv
stream encoded with the On2 codec is played.
To create an automatic stream delivery mechanism based on Flash Player version, edit the
vhost.xml file as follows:
<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>
<VirtualDirectory>
<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 editing the
Key
and
Streams
tags, see “Vhost.xml file” in
Managing Flash Media Server
.
Delivering video based on bandwidth
To deliver video to a client based on the client’s bandwidth, encode the video at different bit
rates (and optionally using different codecs) and create directories in which to store the
streams, as in the following example:
■
c:\streams\Sorenson22k\mystream.flv
■
c:\streams\Sorenson150k\mystream.flv
■
c:\streams\Sorenson300k\mystream.flv
■
c:\streams\Vp622k\mystream.flv
■
c:\streams\Vp6150k\mystream.flv
■
c:\streams\Vp6300k\mystream.flv
Содержание FLASH MEDIA SERVER 2-DEVELOPING MEDIA
Страница 1: ...Developing Media Applications ...
Страница 6: ...6 ...
Страница 10: ...10 About This Manual ...
Страница 36: ...36 Flash Media Server Architecture ...
Страница 80: ...80 Debugging and Monitoring Applications ...
Страница 106: ...106 Application Development Tips and Tricks ...
Страница 114: ...114 ...