External users list in AVChat 3
Overview
In order to show on your website who is logged in the video chat, AVChat 3 generates 2 external files in the folder where it is installed:
- users__definst_.txt -> a text file containing the number of unique users connected to the video chat
- users__definst_.xml -> an xml file containing the list of rooms and users in each room
You will see these files ONLY AFTER THE FIRST USER (NOT ADMIN) LOGS IN THE VIDEO CHAT!
Starting with build 2768 the external users list is generated even if someone joins the chat through the admin interface.
You can use these 2 files to show on your website how many clients are logged in, the room structure or which clients are logged in!
How to actually code/do that is outside the scope of this article but anyone with minumum php or .net experience should be able to parse the xml/text file and post the contents on the website.
How it works
In detail:
- user joins the video chat via index.swf, the path to the writeuserslist.php is automatically detected
- user joins a room, the media server sends the new rooms/users structure to writeuserslist.php via POST (using the path detected at step 1)
- writeuserslist.php receives the new info via POST and creates the 2 files on the web server
The media server automatically detects the path to writeuserslist.php WHEN THE FIRST USER (NOT ADMIN) LOGS IN THE VIDEO CHAT.
One some of our integration kits admin.swf and writeuserslist.php are placed in separate folders, that’s why admins logging in do not trigger an attempt to detect the path to writeuserslist.php!
Admins and users are properly listed in the external .xml file as long as at least a user has logged in in the past so that the media server knows where writeuserslist.php is located!
You can also set the path manually (via the settings.asc/avchat3.properties files on the media server) and you should when:
- you’re using writeuserslist.asp (or any other scripting language) instead of writeuserslist.php
- you’ve moved writeuserslist.php to a separate folder
- you have troubles with the external users list not being generated
Troubleshooting
If the 2 files refuse to appear do these tasks in this order:
- Log in the video chat trough the user interface (not the admin interface/area)
- Make sure the folder containing writeuserslist.php is chmoded to 755 so that writeuserslist.php can write/crate new files
- Make sure calls to the new info is POST-ed from the media server to the web server (check Apache logs)
- Make sure the folder where writeuserslist.php is located is not password protected!
- Hard code the path to writeuserslist.php in settings.asc ( on FMIS ) or in avchat3.properties ( on Wowza/Red5 ) and restart the media server
- contact support: http://avchat.net/support/request-support/
Turning the feature off
On FMIS edit applications/avchat30/settings asc, set application.writeUsersLists=false and restart FMIS!
On Red5 edit webapps/avchat30/avchat3.properties, set writeUsersLists=false and restart Red5!
On Wowza edit conf/avchat30/avchat3.properties, set writeUsersLists=false and restart Wowza!
This will turn off the feature and stop the media server from making POST calls to the web server!
2 thoughts on “External users list in AVChat 3”