Class IZegoRangeSceneEventHandler


  • public abstract class IZegoRangeSceneEventHandler
    extends java.lang.Object
    • Constructor Detail

      • IZegoRangeSceneEventHandler

        public IZegoRangeSceneEventHandler()
    • Method Detail

      • onSceneStateUpdate

        public void onSceneStateUpdate​(ZegoRangeScene rangeScene,
                                       ZegoSceneState state,
                                       int errorCode)
        The callback triggered when the scene connection state changes. Available: Since 3.0.0 Description: 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.
        Parameters:
        rangeScene - Range scene instance that triggers this callback.
        state - Current scene state.
        errorCode - Error code, please refer to the error codes document https://doc-en.zego.im/en/5548.html for details.
      • onEnterView

        public void onEnterView​(ZegoRangeScene rangeScene,
                                ZegoUser user,
                                ZegoPosition position)
        Callback notification when another user enters the current user's field of view. Available: Since 3.0.0 Description: 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.
        Parameters:
        rangeScene - Range scene instance that triggers this callback.
        user - User object.
        position - User position.
      • onLeaveView

        public void onLeaveView​(ZegoRangeScene rangeScene,
                                java.lang.String userID)
        Callback notification when other users leave the current user's field of view. Available: Since 3.0.0 Description: 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.
        Parameters:
        rangeScene - Range scene instance that triggers this callback.
        userID - User ID.
      • onUserStatusUpdate

        public void onUserStatusUpdate​(ZegoRangeScene rangeScene,
                                       java.lang.String userID,
                                       ZegoPosition position,
                                       int channel,
                                       byte[] status)
        User state update callback. Available: Since 3.0.0 Description: User state update callback. When to trigger: User state update. Restrictions: Do not call the SDK interface in the callback thread. Caution: This callback is a high-frequency callback, please do not perform time-consuming operations in this callback.
        Parameters:
        rangeScene - Range scene instance that triggers this callback.
        userID - User ID.
        position - User's current position.
        channel - The channel to which the status belongs.
        status - Current status data.
      • onUserCommandUpdate

        public void onUserCommandUpdate​(ZegoRangeScene rangeScene,
                                        java.lang.String userID,
                                        ZegoPosition position,
                                        int channel,
                                        byte[] command)
        User command update callback. Available: Since 3.0.0 Description: User command update callback. When to trigger: User command update. Restrictions: Do not call the SDK interface in the callback thread. Caution: This callback is a high-frequency callback, please do not perform time-consuming operations in this callback.
        Parameters:
        rangeScene - Range scene instance that triggers this callback.
        userID - User ID.
        position - User's current position.
        channel - The channel to which the command belongs.
        command - Next command data.
      • onCustomCommandUpdate

        public void onCustomCommandUpdate​(ZegoRangeScene rangeScene,
                                          byte[] command)
        Custom command update callback. Available: Since 3.0.0 Description: Custom command update callback. When to trigger: Custom command update. Restrictions: Do not call the SDK interface in the callback thread.
        Parameters:
        rangeScene - Range scene instance that triggers this callback.
        command - Custom command.
      • onSceneTokenWillExpire

        public void onSceneTokenWillExpire​(ZegoRangeScene rangeScene,
                                           int remainTimeInSecond)
        Callback notification that scene Token authentication is about to expire. Available since: 3.1.0 Description: 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. Restrictions: Do not call the SDK interface in the callback thread. Related APIs: When the developer receives this callback, he can use [renewToken] to update the token authentication information.
        Parameters:
        rangeScene - Range scene instance that triggers this callback.
        remainTimeInSecond - The remaining time before the token expires.