User Class
User Class
The User class does not have predefined methods, but it has the following predefined properties. Users can call the changeUserProperty method to add properties to this class. If you only want to add local properties and do not want to inform others in the room, you can directly add properties to the RoomUser object and assign values without calling the changeUserProperty method.
Property Name | Property Function |
---|---|
id | A unique identifier for the user in the room |
nickname | The user's nickname in the room |
role | User Role |
hasaudio | Whether the user has an audio device |
hasvideo | Whether the user has a video device |
publishstate | The user's audio and video publishing status |
tk_maincamera | Primary camera device ID |
tk_ip | The user's IP address |
tk_area | The user's region |
tk_carrier | The user's network carrier |
servername | The user's assigned server |
tk_disablevideo | Whether the user has disabled the camera |
tk_disableaudio | Whether the user has disabled the microphone |
tk_screenstate | The user's screen-sharing publishing status |
tk_mediafilestate | The user's media file publishing status |