
AVChat 2 and AVConference are compatible with both FMS 2 & 3 and Red5 .
Creating separate rooms with AVConference and how it is different from AVChat 2
Prerequisites:
- working AVConference installation
A little bit of (abstract) intro
Looking at a rtmp connection string we see it looks something like this:
- rtmp://myserver.com/application_name/instance_name
application_name is the actual name of the application on the FMS server (in our case avconference).
instance_name is the name of the application instance created by the FMS server in its memory to run that application.
A FMS server can load in its memory as many instances of the same application as needed.
Application instances are separate from one another!
To create a new application instance you just need to connect to it like this:
- rtmp://myserver.com/application_name/instance2
- rtmp://myserver.com/application_name/room1
- rtmp://myserver.com/application_name/alex_and_jane
If you do not specify an application instance in your connection string, FMS automatically uses an instance named _definst_, so when connecting to a FMS server, using rtmp://myserver.com/application_name/ is the same as using rtmp://myserver.com/application_name/_definst_.
The difference between AVChat 2 and AVConference (short)
AVChat 2 uses a single application instance (_definst_), and all room info is kept inside this application instance. All users are connected to the same application instance, and after they connect to this instance they are assigned to different users list depending on the room he is dropped in.
AVConference uses for each room a different application instance. In each application instance there is only one user list.
OK, so how do I group users in different rooms with AVConference?!
By dynamically modifying the instance name of the connection string in avc_settings.php.
If I want to group user A and user B in the same room, when they load AVConference in their browser, I make sure avc_settings.php outputs to them the same connection string (rtmp://myserver.com/avconference/room1 example).
If at the same time I want to group user C and D in another room, when they load AVConference in their browser, I make sure avc_settings.php outputs to them the same connection string, but different from the first (rtmp://myserver.com/avconference/room2 for example)
To do this dynamic (real time) modification of the connection string based on what user is loading AVConference in his browser you will need to know a little about Php/Asp and how cookies or sessions work in Php/Asp.
What you can do with AVConference and its room system?!
- You can use it in an application where you need several (independent) chat sessions that are not aware of each other!
- You can use it as a simple chat software where there is only need for one room where everyone is dropped!
- You can make it behave like an IM, and group people together in separate rooms (you would still have to develop a way to track what users are online, display IM buttons allover the web site, and develop an IM invitation system).
- You can make an advanced meetings/classes/conferences management software in Php/Mysql (or in anything else) and integrate AVConference with it. In this case any room information can be kept in the database (name, description, start time, invited users, instance name that will be used for the connection string, etc...) and displayed to the users on various pages of your web site!
Some Red5 notes
In Red5 there the application instances are named scopes and they behave a little differently, but in what concerns creating rooms in AVConference , everything is the same, you need to change the rtmp connection string!
