logo
On this page

IZegoRangeSceneEventHandler

IZegoRangeSceneEventHandler

Declared in callback/IZegoRangeSceneEventHandler.java

Methods

onSceneStateUpdate

onSceneStateUpdate
public void onSceneStateUpdate(ZegoRangeScene rangeScene, ZegoSceneState state, int errorCode)
The callback triggered when the scene connection state changes.
Declared in callback/IZegoRangeSceneEventHandler.java

Parameters

NameTypeDescription
rangeSceneZegoRangeSceneRange scene instance that triggers this callback.
stateZegoSceneStateCurrent scene state.
errorCodeintError 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

onEnterView
public void onEnterView(ZegoRangeScene rangeScene, ZegoUser user, ZegoPosition position)
Callback notification when another user enters the current user's field of view.
Declared in callback/IZegoRangeSceneEventHandler.java

Parameters

NameTypeDescription
rangeSceneZegoRangeSceneRange scene instance that triggers this callback.
userZegoUserUser object.
positionZegoPositionUser 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

onLeaveView
public void onLeaveView(ZegoRangeScene rangeScene, String userID)
Callback notification when other users leave the current user's field of view.
Declared in callback/IZegoRangeSceneEventHandler.java

Parameters

NameTypeDescription
rangeSceneZegoRangeSceneRange scene instance that triggers this callback.
userIDStringUser 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

onUserStatusUpdate
public void onUserStatusUpdate(ZegoRangeScene rangeScene, String userID, ZegoPosition position, int channel, byte[] status)
User state update callback.
Declared in callback/IZegoRangeSceneEventHandler.java

Parameters

NameTypeDescription
rangeSceneZegoRangeSceneRange scene instance that triggers this callback.
userIDStringUser ID.
positionZegoPositionUser's current position.
channelintThe channel to which the status belongs.
statusbyte[]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

onUserCommandUpdate
public void onUserCommandUpdate(ZegoRangeScene rangeScene, String userID, ZegoPosition position, int channel, byte[] command)
User command update callback.
Declared in callback/IZegoRangeSceneEventHandler.java

Parameters

NameTypeDescription
rangeSceneZegoRangeSceneRange scene instance that triggers this callback.
userIDStringUser ID.
positionZegoPositionUser's current position.
channelintThe channel to which the command belongs.
commandbyte[]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

onCustomCommandUpdate
public void onCustomCommandUpdate(ZegoRangeScene rangeScene, byte[] command)
Custom command update callback.
Declared in callback/IZegoRangeSceneEventHandler.java

Parameters

NameTypeDescription
rangeSceneZegoRangeSceneRange scene instance that triggers this callback.
commandbyte[]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

onSceneTokenWillExpire
public void onSceneTokenWillExpire(ZegoRangeScene rangeScene, int remainTimeInSecond)
Callback notification that scene Token authentication is about to expire.
Declared in callback/IZegoRangeSceneEventHandler.java

Parameters

NameTypeDescription
rangeSceneZegoRangeSceneRange scene instance that triggers this callback.
remainTimeInSecondintThe 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.

Previous

izegorangeaudioeventhandler

Next

izegorangesceneitemeventhandler

On this page

Back to top