logo
On this page

ZegoRangeSceneEventHandler

ZegoRangeSceneEventHandler

Declared in ZegoExpressEventHandler.h

Methods

rangeScene:sceneStateUpdate:errorCode

rangeScene:sceneStateUpdate:errorCode
- (void)rangeScene:(ZegoRangeScene *)rangeScene sceneStateUpdate:(ZegoSceneState)state errorCode:(int)errorCode;
The callback triggered when the scene connection state changes.
Declared in ZegoExpressEventHandler.h

Parameters

NameTypeDescription
rangeSceneZegoRangeScene *Range 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.

rangeScene:enterView:position

rangeScene:enterView:position
- (void)rangeScene:(ZegoRangeScene *)rangeScene enterView:(ZegoUser *)user position:(ZegoPosition *)position;
Callback notification when another user enters the current user's field of view.
Declared in ZegoExpressEventHandler.h

Parameters

NameTypeDescription
rangeSceneZegoRangeScene *Range scene instance that triggers this callback.
userZegoUser *User object.
positionZegoPosition *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.

rangeScene:leaveView

rangeScene:leaveView
- (void)rangeScene:(ZegoRangeScene *)rangeScene leaveView:(NSString *)userID;
Callback notification when other users leave the current user's field of view.
Declared in ZegoExpressEventHandler.h

Parameters

NameTypeDescription
rangeSceneZegoRangeScene *Range scene instance that triggers this callback.
userIDNSString *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.

rangeScene:userStatusUpdate:position:channel:status

rangeScene:userStatusUpdate:position:channel:status
- (void)rangeScene:(ZegoRangeScene *)rangeScene userStatusUpdate:(NSString *)userID position:(ZegoPosition *)position channel:(unsigned int)channel status:(NSData *)status;
User state update callback.
Declared in ZegoExpressEventHandler.h

Parameters

NameTypeDescription
rangeSceneZegoRangeScene *Range scene instance that triggers this callback.
userIDNSString *User ID.
positionZegoPosition *User's current position.
channelunsigned intThe channel to which the status belongs.
statusNSData *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.

rangeScene:userCommandUpdate:position:channel:command

rangeScene:userCommandUpdate:position:channel:command
- (void)rangeScene:(ZegoRangeScene *)rangeScene userCommandUpdate:(NSString *)userID position:(ZegoPosition *)position channel:(unsigned int)channel command:(NSData *)command;
User command update callback.
Declared in ZegoExpressEventHandler.h

Parameters

NameTypeDescription
rangeSceneZegoRangeScene *Range scene instance that triggers this callback.
userIDNSString *User ID.
positionZegoPosition *User's current position.
channelunsigned intThe channel to which the command belongs.
commandNSData *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.

rangeScene:customCommandUpdate

rangeScene:customCommandUpdate
- (void)rangeScene:(ZegoRangeScene *)rangeScene customCommandUpdate:(NSData *)command;
Custom command update callback.
Declared in ZegoExpressEventHandler.h

Parameters

NameTypeDescription
rangeSceneZegoRangeScene *Range scene instance that triggers this callback.
commandNSData *Custom command.

Details

Custom command update callback. When to trigger: Custom command update.

  • Restrictions: Do not call the SDK interface in the callback thread.

rangeScene:tokenWillExpire

rangeScene:tokenWillExpire
- (void)rangeScene:(ZegoRangeScene *)rangeScene tokenWillExpire:(int)remainTimeInSecond;
Callback notification that scene Token authentication is about to expire.
Declared in ZegoExpressEventHandler.h

Parameters

NameTypeDescription
rangeSceneZegoRangeScene *Range 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

zegorangescene

Next

zegorangesceneitem

On this page

Back to top