ZegoRangeSceneEventHandler
ZegoRangeSceneEventHandler
Declared in ZegoExpressEventHandler.h
Methods
rangeScene:sceneStateUpdate:errorCode
- (void)rangeScene:(ZegoRangeScene *)rangeScene sceneStateUpdate:(ZegoSceneState)state errorCode:(int)errorCode;ZegoExpressEventHandler.hParameters
| 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.
rangeScene:enterView:position
- (void)rangeScene:(ZegoRangeScene *)rangeScene enterView:(ZegoUser *)user position:(ZegoPosition *)position;ZegoExpressEventHandler.hParameters
| 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.
rangeScene:leaveView
- (void)rangeScene:(ZegoRangeScene *)rangeScene leaveView:(NSString *)userID;ZegoExpressEventHandler.hParameters
| Name | Type | Description |
|---|---|---|
| rangeScene | ZegoRangeScene * | Range scene instance that triggers this callback. |
| userID | NSString * | 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
- (void)rangeScene:(ZegoRangeScene *)rangeScene userStatusUpdate:(NSString *)userID position:(ZegoPosition *)position channel:(unsigned int)channel status:(NSData *)status;ZegoExpressEventHandler.hParameters
| Name | Type | Description |
|---|---|---|
| rangeScene | ZegoRangeScene * | Range scene instance that triggers this callback. |
| userID | NSString * | User ID. |
| position | ZegoPosition * | User's current position. |
| channel | unsigned int | The channel to which the status belongs. |
| status | NSData * | 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
- (void)rangeScene:(ZegoRangeScene *)rangeScene userCommandUpdate:(NSString *)userID position:(ZegoPosition *)position channel:(unsigned int)channel command:(NSData *)command;ZegoExpressEventHandler.hParameters
| Name | Type | Description |
|---|---|---|
| rangeScene | ZegoRangeScene * | Range scene instance that triggers this callback. |
| userID | NSString * | User ID. |
| position | ZegoPosition * | User's current position. |
| channel | unsigned int | The channel to which the command belongs. |
| command | NSData * | 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
- (void)rangeScene:(ZegoRangeScene *)rangeScene customCommandUpdate:(NSData *)command;ZegoExpressEventHandler.hParameters
| Name | Type | Description |
|---|---|---|
| rangeScene | ZegoRangeScene * | Range scene instance that triggers this callback. |
| command | NSData * | 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
- (void)rangeScene:(ZegoRangeScene *)rangeScene tokenWillExpire:(int)remainTimeInSecond;ZegoExpressEventHandler.hParameters
| 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.
