IZegoRangeSceneTeamEventHandler
IZegoRangeSceneTeamEventHandler
Declared in callback/IZegoRangeSceneTeamEventHandler.java
Methods
onTeamStateUpdate
onTeamStateUpdate
public void onTeamStateUpdate(ZegoRangeScene rangeScene, int teamID, ZegoTeamState state, int errorCode)The callback triggered when the team connection state changes.
Declared in
callback/IZegoRangeSceneTeamEventHandler.javaParameters
| Name | Type | Description |
|---|---|---|
| rangeScene | ZegoRangeScene | Range scene instance that triggers this callback. |
| teamID | int | Team ID. |
| state | ZegoTeamState | Changed team state. |
| errorCode | int | Error code, For details, please refer to Common Error Codes. |
Details
This callback is triggered when the connection status of the team changes, and the reason for the change is notified.
- Use cases: Developers can use this callback to determine the status of the current user in the team. When to trigger:
- The developer will receive this notification when calling the [joinTeam], [leaveTeam] functions.
- This notification may also be received when the network condition of the user's device changes (SDK will automatically join the team when reconnected, please refer to [Does ZEGO SDK support a fast reconnection for temporary disconnection] for details](https://docs.zegocloud.com/faq/reconnect?product=ExpressVideo&platform=all).
- Caution: If the connection is being requested for a long time, the general probability is that the user's network is unstable.
- Related APIs: [joinTeam]、[leaveTeam]
- Available since: 3.1.0
- Restrictions: None.
onTeamMemberUpdate
onTeamMemberUpdate
public void onTeamMemberUpdate(ZegoRangeScene rangeScene, int teamID, ZegoUpdateType updateType, ArrayList<ZegoUser> userList)The callback triggered when the number of other users in the team increases or decreases.
Declared in
callback/IZegoRangeSceneTeamEventHandler.javaParameters
| Name | Type | Description |
|---|---|---|
| rangeScene | ZegoRangeScene | Range scene instance that triggers this callback. |
| teamID | int | Team ID. |
| updateType | ZegoUpdateType | Update type (add/delete). |
| userList | ArrayList<ZegoUser> | List of users changed in the current team. |
Details
When other users in the room are online or offline, which causes the user list in the room to change, the developer will be notified through this callback.
- Use cases: Developers can use this callback to update the user list display in the room in real time.
When to trigger:
- When the user join the room for the first time, if there are other users in the team, the SDK will trigger a callback notification with
updateTypebeing [ZegoUpdateTypeAdd], anduserListis the other users in the team at this time. - The user is already in the team. If another user join the team through the [joinTeam] function, the SDK will trigger a callback notification with
updateTypebeing [ZegoUpdateTypeAdd]. - If other users leave the team through the [leaveTeam] function, the SDK will trigger a callback notification with
updateTypebeing [ZegoUpdateTypeDelete].
- When the user join the room for the first time, if there are other users in the team, the SDK will trigger a callback notification with
- Related APIs: [joinTeam]、[leaveTeam]
- Available since: 3.1.0
