IZegoRangeSceneEventHandler
IZegoRangeSceneEventHandler
Declared in callback/IZegoRangeSceneEventHandler.java
Methods
onSceneStateUpdate
public void onSceneStateUpdate(ZegoRangeScene rangeScene, ZegoSceneState state, int errorCode)callback/IZegoRangeSceneEventHandler.javaParameters
| Name | Type | Description |
|---|---|---|
| rangeScene | ZegoRangeScene | Range scene instance that triggers this callback. |
| state | ZegoSceneState | Current scene state. |
| errorCode | int | Error code, please refer to the error codes document https://doc-en.zego.im/en/5548.html for details. |
Details
The callback triggered when the scene connection state changes. When to trigger: Scene connection state changes.
- Restrictions: Do not call the SDK interface in the callback thread.
onEnterView
public void onEnterView(ZegoRangeScene rangeScene, ZegoUser user, ZegoPosition position)callback/IZegoRangeSceneEventHandler.javaParameters
| Name | Type | Description |
|---|---|---|
| rangeScene | ZegoRangeScene | Range scene instance that triggers this callback. |
| user | ZegoUser | User object. |
| position | ZegoPosition | User position. |
Details
Callback notification when another user enters the current user's field of view. When to trigger: Another user enters the current user's field of view.
- Restrictions: Do not call the SDK interface in the callback thread.
onLeaveView
public void onLeaveView(ZegoRangeScene rangeScene, String userID)callback/IZegoRangeSceneEventHandler.javaParameters
| Name | Type | Description |
|---|---|---|
| rangeScene | ZegoRangeScene | Range scene instance that triggers this callback. |
| userID | String | User ID. |
Details
Callback notification when other users leave the current user's field of view. When to trigger: Other users leave the current user's field of view.
- Restrictions: Do not call the SDK interface in the callback thread.
onUserStatusUpdate
public void onUserStatusUpdate(ZegoRangeScene rangeScene, String userID, ZegoPosition position, int channel, byte[] status)callback/IZegoRangeSceneEventHandler.javaParameters
| Name | Type | Description |
|---|---|---|
| rangeScene | ZegoRangeScene | Range scene instance that triggers this callback. |
| userID | String | User ID. |
| position | ZegoPosition | User's current position. |
| channel | int | The channel to which the status belongs. |
| status | byte[] | Current status data. |
Details
User state update callback. When to trigger: User state update.
- Caution: This callback is a high-frequency callback, please do not perform time-consuming operations in this callback.
- Restrictions: Do not call the SDK interface in the callback thread.
onUserCommandUpdate
public void onUserCommandUpdate(ZegoRangeScene rangeScene, String userID, ZegoPosition position, int channel, byte[] command)callback/IZegoRangeSceneEventHandler.javaParameters
| Name | Type | Description |
|---|---|---|
| rangeScene | ZegoRangeScene | Range scene instance that triggers this callback. |
| userID | String | User ID. |
| position | ZegoPosition | User's current position. |
| channel | int | The channel to which the command belongs. |
| command | byte[] | Next command data. |
Details
User command update callback. When to trigger: User command update.
- Caution: This callback is a high-frequency callback, please do not perform time-consuming operations in this callback.
- Restrictions: Do not call the SDK interface in the callback thread.
onCustomCommandUpdate
public void onCustomCommandUpdate(ZegoRangeScene rangeScene, byte[] command)callback/IZegoRangeSceneEventHandler.javaParameters
| Name | Type | Description |
|---|---|---|
| rangeScene | ZegoRangeScene | Range scene instance that triggers this callback. |
| command | byte[] | Custom command. |
Details
Custom command update callback. When to trigger: Custom command update.
- Restrictions: Do not call the SDK interface in the callback thread.
onSceneTokenWillExpire
public void onSceneTokenWillExpire(ZegoRangeScene rangeScene, int remainTimeInSecond)callback/IZegoRangeSceneEventHandler.javaParameters
| Name | Type | Description |
|---|---|---|
| rangeScene | ZegoRangeScene | Range scene instance that triggers this callback. |
| remainTimeInSecond | int | The remaining time before the token expires. |
Details
The callback notification that the scene Token authentication is about to expire, please use [renewToken] to update the scene Token authentication.
- When to call /Trigger: 30 seconds before the Token expires, the SDK will call [onSceneTokenWillExpire] to notify developer.
- Related APIs: When the developer receives this callback, he can use [renewToken] to update the token authentication information.
- Available since: 3.1.0
- Restrictions: Do not call the SDK interface in the callback thread.
