Question
Deliver content based on bandwidth
Hi experts,
I have read the part on Delivering video based on bandwidth in Developing Media Application Flash Media server documentation. I try to apply the thing it suggested, i added the following to vhosts.xml:
<VirtualKeys>
<Key from="WIN 6,0,0,0" to="WIN 9,0,0,0">fp</Key>
</VirtualKeys>
<VirtualDirectory>
<Streams key="fpslow">video;c:\streams\videoslow</Streams>
<Streams key="fpfast">video;c:\streams\videofast</Streams>
<Streams key="">video;c:\streams\videofast</Streams>
</VirtualDirectory>
in c:\streams\videoslow and c:\streams\videofast , there are 2 different files encoded in different kbps. I have tested this part and it actually work. However, when i try on the next part on adding bandwidth detection procedure, i am not able to addin the virtualkey to my client. Below is part of my main.asc, To make thing simple, i remove the bandwidth detection procedure and simply try to force virtualkey to "fast", but still does not work.
application.onConnect = function(p_client, p_autoSenseBW)
{
p_client.VirtualKey +="fast";
trace ("Accepting Client Connection...");
this.acceptConnection(p_client);
}
Anyone anyidea? Please help. Thank you in advance.
I have read the part on Delivering video based on bandwidth in Developing Media Application Flash Media server documentation. I try to apply the thing it suggested, i added the following to vhosts.xml:
<VirtualKeys>
<Key from="WIN 6,0,0,0" to="WIN 9,0,0,0">fp</Key>
</VirtualKeys>
<VirtualDirectory>
<Streams key="fpslow">video;c:\streams\videoslow</Streams>
<Streams key="fpfast">video;c:\streams\videofast</Streams>
<Streams key="">video;c:\streams\videofast</Streams>
</VirtualDirectory>
in c:\streams\videoslow and c:\streams\videofast , there are 2 different files encoded in different kbps. I have tested this part and it actually work. However, when i try on the next part on adding bandwidth detection procedure, i am not able to addin the virtualkey to my client. Below is part of my main.asc, To make thing simple, i remove the bandwidth detection procedure and simply try to force virtualkey to "fast", but still does not work.
application.onConnect = function(p_client, p_autoSenseBW)
{
p_client.VirtualKey +="fast";
trace ("Accepting Client Connection...");
this.acceptConnection(p_client);
}
Anyone anyidea? Please help. Thank you in advance.
