Retrieving connected users on client side.

RVMedia support and discussion (components for displaying and controlling IP cameras, webcams, video conferencing, video chats, recording audio and video files)
Post Reply
friman
Posts: 25
Joined: Fri Jul 17, 2015 4:26 am

Retrieving connected users on client side.

Post by friman » Sun Nov 29, 2015 8:37 pm

Hi
I have another question:
How can I know/detect on client when new user is connected to server?
Is there some way to let client to know about new "registered" users?

Sergey Tkachenko
Site Admin
Posts: 14654
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Sun Nov 29, 2015 9:15 pm

By default, a media server does not inform clients about other clients entering/leaving.

However, there are several mechanisms allowing to do it.
You should choose which one is more appropriate for you.

1. Groups of clients.
Groups are like chat rooms.
Groups are used in VideoChats\Chat demo (you can see, it uses OnUserJoinsGroup and OnUserLeavesGroup)
See http://www.trichview.com/help-media/trv ... ethods.htm
This topic explains how group members are informed about each other

2. "Default receivers" and/or "allowed senders"
Default receivers are used in all our VideoChat demos, but while "Chat" uses groups for managing lists of clients, "Messenger" and "Conference" use default receivers (you can see, they use OnUserEnter and OnUserExit).
See
http://www.trichview.com/help-media/trv ... ethods.htm
http://www.trichview.com/help-media/trv ... ethods.htm
These topics explain how such users are informed about each other.

friman
Posts: 25
Joined: Fri Jul 17, 2015 4:26 am

Post by friman » Mon Nov 30, 2015 2:02 am

Hi Serguey
Thanks for your reply.
Yes, I use these method, but they inform to user about the currents allowed by him, no about others (thinking on extended solution where users can banned, denied, allow,...access). That is why I ask if some way to retrieve ALL.
I now think that solution will be sent some command to ALL live users from server when new users connects.

On this case, I can suggest if is possible, on server side to clients:
- Retrieve info of connected users
- Retrieve info of live groups
- Retrieve info of live Cam

Sergey Tkachenko
Site Admin
Posts: 14654
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Tue Dec 01, 2015 9:00 am

1. Informing about each other

You can implement a special group on the server (with some fixed ID), and all clients must join it. So they will be able to know about each other.

2. Retrieve information about users

By default, the server does not store any information about clients except for their ID, list of default receivers, and list of allowed senders.
You need to implement retrieving information yourself.
Online clients can send commands to each other (via the server) and you can implement information exchange in this way.
You can also implement storing information about the client on the server. Clients can send commands not only to each other, but to the server directly.
The example can be found in Demos\ClientServer\Login\. This example uses TRVMediaServer.OnServerCmd to store information about clients (login and password) in a database. You can store any information you need, and implement commands for requesting this information.

3. As for the list of active group.
On the server, you can process the commands for users joining and leaving groups, thus maintaining a list of active groups.
But I'll discuss with the developer how to simplify this task.

4. I am not sure what do you mean by "live Cam". If this is something on clients, you can implement exchanging information between clients using commands, as I explained in (2)

Post Reply