How to restrict the number of users on live or vod applications.
You can restrict the number of users on a flash server applications using server-side scripting.
Here is how.
1. Go to the flash server root/documentation/samples (Lets say its a live streaming aplication).
2. Copy the livestreams folder to your flash server root/applications and paste it inside the folder.
3. Open the main.asc file that is inside the folder you just pasted.
4. At the end of the code paste the following code:
application.onConnect = function(clientObj){
if (application.clients.length >=500){
application.rejectConnection(clientObj);
trace ("Too many users... rejecting new connection");
}else{
application.acceptConnection(clientObj);
}
}
On this code the application will accept 500 connections. You can change the number of connections to any number.
Remember that your Flash Live Encoder needs at least one connection to send the video to the server.
5. Make sure to grab the application.xml from the live application folder and copy it to your new application folder.
This keeps the live streaming alive as a live application should work.
6. Open the Flash Server Administration console and load the application to the server.
Thats it. you can restric the number of users on any applications on your flash server.
