AgoraIO-Community / Agora-RTC-React

A react wrapper for Agora RTC NG SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

associating user with video

brismol opened this issue · comments

I'm a student trying with my team to build a video chat app with support for a simple game. We need to divide the users into two teams and sort them on the screen. We can't figure out a way for the callers to identify themself so that we can associate it with our user models. Please help if you can! Any advice would be super appreciated!

Hey you can use Agora RTM to signal users and their screenshare UIDs to other users in the channel. You can send messages with a user's UID and their screenshare UID along with their team name etc.
Or a simpler hack would be to have some logic where you assign a particular UID to a user's screenshare, for example: User A has UID 1000, User's A screenshare is always set to 1001. That way you can associate screenshare with other users. But be sure to avoid any UID collisions, maybe use the timestamp to generate UIDs.
Hope this helps.