io.agora.rtc

## Class LocalUserObserverWrapper

- java.lang.Object
- - io.agora.rtc.LocalUserObserverWrapper

- All Implemented Interfaces:
    ILocalUserObserver

      public class LocalUserObserverWrapper
      extends java.lang.Object
      implements ILocalUserObserver

  Wrapper class for local user observer that manages track lifecycle.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.util.List<AgoraLocalAudioTrack>` | `agoraLocalAudioTracks` List of local audio tracks
    `private java.util.List<AgoraLocalVideoTrack>` | `agoraLocalVideoTracks` List of local video tracks
    `private java.util.List<AgoraRemoteAudioTrack>` | `agoraRemoteAudioTracks` List of remote audio tracks
    `private java.util.List<AgoraRemoteVideoTrack>` | `agoraRemoteVideoTracks` List of remote video tracks
    `private boolean` | `isRegistered` Whether the observer is registered
    `private ILocalUserObserver` | `observer` The wrapped observer instance

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocalUserObserverWrapper(ILocalUserObserver observer)` Constructs LocalUserObserverWrapper with an observer.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `destroy()` Destroys the wrapper and releases resources.
    `boolean` | `isRegistered()` Checks whether the observer is registered.
    `private void` | `nativeDestory(long[] cptrs)` Native method to destroy native handles.
    `void` | `onActiveSpeaker(AgoraLocalUser agoraLocalUser, java.lang.String userId)` Called when an active speaker is detected.
    `void` | `onAudioMetaDataReceived(AgoraLocalUser agoraLocalUser, java.lang.String userId, byte[] metaData)` Called when audio metadata is received.
    `void` | `onAudioPublishStateChanged(AgoraLocalUser agoraLocalUser, java.lang.String channel, int oldState, int newState, int elapseSinceLastState)` Called when audio publish state changes.
    `void` | `onAudioSubscribeStateChanged(AgoraLocalUser agoraLocalUser, java.lang.String channel, java.lang.String userId, int oldState, int newState, int elapseSinceLastState)` Called when audio subscribe state changes.
    `void` | `onAudioTrackPublicationFailure(AgoraLocalUser agoraLocalUser, AgoraLocalAudioTrack agoraLocalAudioTrack, int error)` Called when audio track publication fails.
    `void` | `onAudioTrackPublishStart(AgoraLocalUser agoraLocalUser, AgoraLocalAudioTrack agoraLocalAudioTrack)` Called when audio track publish starts.
    `void` | `onAudioTrackPublishSuccess(AgoraLocalUser agoraLocalUser, AgoraLocalAudioTrack agoraLocalAudioTrack)` Called when audio track publish succeeds.
    `void` | `onAudioTrackUnpublished(AgoraLocalUser agoraLocalUser, AgoraLocalAudioTrack agoraLocalAudioTrack)` Called when audio track is unpublished.
    `void` | `onAudioVolumeIndication(AgoraLocalUser agoraLocalUser, AudioVolumeInfo[] speakers, int totalVolume)` Called when audio volume indication is received.
    `void` | `onFirstRemoteAudioDecoded(AgoraLocalUser agoraLocalUser, java.lang.String userId, int elapsed)` Called when the first remote audio frame is decoded.
    `void` | `onFirstRemoteAudioFrame(AgoraLocalUser agoraLocalUser, java.lang.String userId, int elapsed)` Called when the first remote audio frame is received.
    `void` | `onFirstRemoteVideoDecoded(AgoraLocalUser agoraLocalUser, java.lang.String userId, int width, int height, int elapsed)` Called when the first remote video frame is decoded.
    `void` | `onFirstRemoteVideoFrame(AgoraLocalUser agoraLocalUser, java.lang.String userId, int width, int height, int elapsed)` Called when the first remote video frame is received.
    `void` | `onFirstRemoteVideoFrameRendered(AgoraLocalUser agoraLocalUser, java.lang.String userId, int width, int height, int elapsed)` Called when the first remote video frame is rendered.
    `void` | `onIntraRequestReceived(AgoraLocalUser agoraLocalUser)` Called when an intra request is received.
    `void` | `onLocalAudioTrackStateChanged(AgoraLocalUser agoraLocalUser, AgoraLocalAudioTrack agoraLocalAudioTrack, int state, int error)` Called when local audio track state changes.
    `void` | `onLocalAudioTrackStatistics(AgoraLocalUser agoraLocalUser, LocalAudioStats stats)` Called when local audio track statistics are updated.
    `void` | `onLocalVideoTrackStateChanged(AgoraLocalUser agoraLocalUser, AgoraLocalVideoTrack agoraLocalVideoTrack, int state, int error)` Called when local video track state changes.
    `void` | `onLocalVideoTrackStatistics(AgoraLocalUser agoraLocalUser, AgoraLocalVideoTrack agoraLocalVideoTrack, LocalVideoTrackStats stats)` Called when local video track statistics are updated.
    `void` | `onRemoteAudioTrackStatistics(AgoraLocalUser agoraLocalUser, AgoraRemoteAudioTrack agoraRemoteAudioTrack, RemoteAudioTrackStats stats)` Called when remote audio track statistics are updated.
    `void` | `onRemoteSubscribeFallbackToAudioOnly(AgoraLocalUser agoraLocalUser, java.lang.String userId, int isFallbackOrRecover)` Called when remote subscribe falls back to audio only or recovers.
    `void` | `onRemoteVideoStreamInfoUpdated(AgoraLocalUser agoraLocalUser, RemoteVideoStreamInfo info)` Called when remote video stream info is updated.
    `void` | `onRemoteVideoTrackStatistics(AgoraLocalUser agoraLocalUser, AgoraRemoteVideoTrack agoraRemoteVideoTrack, RemoteVideoTrackStats stats)` Called when remote video track statistics are updated.
    `void` | `onStreamMessage(AgoraLocalUser agoraLocalUser, java.lang.String userId, int streamId, byte[] data)` Called when a stream message is received.
    `void` | `onUserAudioTrackStateChanged(AgoraLocalUser agoraLocalUser, java.lang.String userId, AgoraRemoteAudioTrack agoraRemoteAudioTrack, int state, int reason, int elapsed)` Called when user audio track state changes.
    `void` | `onUserAudioTrackSubscribed(AgoraLocalUser agoraLocalUser, java.lang.String userId, AgoraRemoteAudioTrack agoraRemoteAudioTrack)` Called when a user audio track is subscribed.
    `void` | `onUserInfoUpdated(AgoraLocalUser agoraLocalUser, java.lang.String userId, int msg, int val)` Called when user info is updated.
    `void` | `onUserStateChanged(AgoraLocalUser agoraLocalUser, java.lang.String userId, int state)` Called when user state changes.
    `void` | `onUserVideoTrackStateChanged(AgoraLocalUser agoraLocalUser, java.lang.String userId, AgoraRemoteVideoTrack agoraRemoteVideoTrack, int state, int reason, int elapsed)` Called when user video track state changes.
    `void` | `onUserVideoTrackSubscribed(AgoraLocalUser agoraLocalUser, java.lang.String userId, VideoTrackInfo info, AgoraRemoteVideoTrack agoraRemoteVideoTrack)` Called when a user video track is subscribed.
    `void` | `onVideoPublishStateChanged(AgoraLocalUser agoraLocalUser, java.lang.String channel, int oldState, int newState, int elapseSinceLastState)` Called when video publish state changes.
    `void` | `onVideoSizeChanged(AgoraLocalUser agoraLocalUser, java.lang.String userId, int width, int height, int rotation)` Called when video size changes.
    `void` | `onVideoSubscribeStateChanged(AgoraLocalUser agoraLocalUser, java.lang.String channel, java.lang.String userId, int oldState, int newState, int elapseSinceLastState)` Called when video subscribe state changes.
    `void` | `onVideoTrackPublicationFailure(AgoraLocalUser agoraLocalUser, AgoraLocalVideoTrack agoraLocalVideoTrack, int error)` Called when video track publication fails.
    `void` | `onVideoTrackPublishStart(AgoraLocalUser agoraLocalUser, AgoraLocalVideoTrack agoraLocalVideoTrack)` Called when video track publish starts.
    `void` | `onVideoTrackPublishSuccess(AgoraLocalUser agoraLocalUser, AgoraLocalVideoTrack agoraLocalVideoTrack)` Called when video track publish succeeds.
    `void` | `onVideoTrackUnpublished(AgoraLocalUser agoraLocalUser, AgoraLocalVideoTrack agoraLocalVideoTrack)` Called when video track is unpublished.
    `void` | `unregister()` Unregisters the observer and releases remote tracks.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### observer

          private ILocalUserObserver observer

      The wrapped observer instance

    - #### agoraLocalAudioTracks

          private java.util.List<AgoraLocalAudioTrack> agoraLocalAudioTracks

      List of local audio tracks

    - #### agoraLocalVideoTracks

          private java.util.List<AgoraLocalVideoTrack> agoraLocalVideoTracks

      List of local video tracks

    - #### agoraRemoteAudioTracks

          private java.util.List<AgoraRemoteAudioTrack> agoraRemoteAudioTracks

      List of remote audio tracks

    - #### agoraRemoteVideoTracks

          private java.util.List<AgoraRemoteVideoTrack> agoraRemoteVideoTracks

      List of remote video tracks

    - #### isRegistered

          private boolean isRegistered

      Whether the observer is registered

  - ### Constructor Detail

    - #### LocalUserObserverWrapper

          public LocalUserObserverWrapper(ILocalUserObserver observer)

      Constructs LocalUserObserverWrapper with an observer.
      Parameters:
        `observer` - The observer to wrap

  - ### Method Detail

    - #### isRegistered

          public boolean isRegistered()

      Checks whether the observer is registered.
      Returns:
        Whether the observer is registered

    - #### destroy

          public void destroy()

      Destroys the wrapper and releases resources.

    - #### unregister

          public void unregister()

      Unregisters the observer and releases remote tracks.

    - #### onAudioTrackPublishSuccess

          public void onAudioTrackPublishSuccess(AgoraLocalUser agoraLocalUser,
                                                 AgoraLocalAudioTrack agoraLocalAudioTrack)

      Description copied from interface: `ILocalUserObserver`
      Called when audio track publish succeeds.
      Specified by:
        `onAudioTrackPublishSuccess` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `agoraLocalAudioTrack` - The local audio track

    - #### onAudioTrackPublishStart

          public void onAudioTrackPublishStart(AgoraLocalUser agoraLocalUser,
                                               AgoraLocalAudioTrack agoraLocalAudioTrack)

      Description copied from interface: `ILocalUserObserver`
      Called when audio track publish starts.
      Specified by:
        `onAudioTrackPublishStart` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `agoraLocalAudioTrack` - The local audio track

    - #### onAudioTrackUnpublished

          public void onAudioTrackUnpublished(AgoraLocalUser agoraLocalUser,
                                              AgoraLocalAudioTrack agoraLocalAudioTrack)

      Description copied from interface: `ILocalUserObserver`
      Called when audio track is unpublished.
      Specified by:
        `onAudioTrackUnpublished` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `agoraLocalAudioTrack` - The local audio track

    - #### onVideoTrackPublishStart

          public void onVideoTrackPublishStart(AgoraLocalUser agoraLocalUser,
                                               AgoraLocalVideoTrack agoraLocalVideoTrack)

      Description copied from interface: `ILocalUserObserver`
      Called when video track publish starts.
      Specified by:
        `onVideoTrackPublishStart` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `agoraLocalVideoTrack` - The local video track

    - #### onVideoTrackUnpublished

          public void onVideoTrackUnpublished(AgoraLocalUser agoraLocalUser,
                                              AgoraLocalVideoTrack agoraLocalVideoTrack)

      Description copied from interface: `ILocalUserObserver`
      Called when video track is unpublished.
      Specified by:
        `onVideoTrackUnpublished` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `agoraLocalVideoTrack` - The local video track

    - #### onAudioTrackPublicationFailure

          public void onAudioTrackPublicationFailure(AgoraLocalUser agoraLocalUser,
                                                     AgoraLocalAudioTrack agoraLocalAudioTrack,
                                                     int error)

      Description copied from interface: `ILocalUserObserver`
      Called when audio track publication fails.
      Specified by:
        `onAudioTrackPublicationFailure` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `agoraLocalAudioTrack` - The local audio track
        `error` - Error code

    - #### onLocalAudioTrackStateChanged

          public void onLocalAudioTrackStateChanged(AgoraLocalUser agoraLocalUser,
                                                    AgoraLocalAudioTrack agoraLocalAudioTrack,
                                                    int state,
                                                    int error)

      Description copied from interface: `ILocalUserObserver`
      Called when local audio track state changes.
      Specified by:
        `onLocalAudioTrackStateChanged` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `agoraLocalAudioTrack` - The local audio track
        `state` - Track state
        `error` - Error code

    - #### onLocalAudioTrackStatistics

          public void onLocalAudioTrackStatistics(AgoraLocalUser agoraLocalUser,
                                                  LocalAudioStats stats)

      Description copied from interface: `ILocalUserObserver`
      Called when local audio track statistics are updated.
      Specified by:
        `onLocalAudioTrackStatistics` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `stats` - Local audio statistics

    - #### onRemoteAudioTrackStatistics

          public void onRemoteAudioTrackStatistics(AgoraLocalUser agoraLocalUser,
                                                   AgoraRemoteAudioTrack agoraRemoteAudioTrack,
                                                   RemoteAudioTrackStats stats)

      Description copied from interface: `ILocalUserObserver`
      Called when remote audio track statistics are updated.
      Specified by:
        `onRemoteAudioTrackStatistics` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `agoraRemoteAudioTrack` - The remote audio track
        `stats` - Remote audio track statistics

    - #### onUserAudioTrackSubscribed

          public void onUserAudioTrackSubscribed(AgoraLocalUser agoraLocalUser,
                                                 java.lang.String userId,
                                                 AgoraRemoteAudioTrack agoraRemoteAudioTrack)

      Description copied from interface: `ILocalUserObserver`
      Called when a user audio track is subscribed.
      Specified by:
        `onUserAudioTrackSubscribed` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `userId` - User ID
        `agoraRemoteAudioTrack` - The remote audio track

    - #### onUserAudioTrackStateChanged

          public void onUserAudioTrackStateChanged(AgoraLocalUser agoraLocalUser,
                                                   java.lang.String userId,
                                                   AgoraRemoteAudioTrack agoraRemoteAudioTrack,
                                                   int state,
                                                   int reason,
                                                   int elapsed)

      Description copied from interface: `ILocalUserObserver`
      Called when user audio track state changes.
      Specified by:
        `onUserAudioTrackStateChanged` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `userId` - User ID
        `agoraRemoteAudioTrack` - The remote audio track
        `state` - Track state
        `reason` - State change reason
        `elapsed` - Elapsed time

    - #### onAudioSubscribeStateChanged

          public void onAudioSubscribeStateChanged(AgoraLocalUser agoraLocalUser,
                                                   java.lang.String channel,
                                                   java.lang.String userId,
                                                   int oldState,
                                                   int newState,
                                                   int elapseSinceLastState)

      Description copied from interface: `ILocalUserObserver`
      Called when audio subscribe state changes.
      Specified by:
        `onAudioSubscribeStateChanged` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `channel` - Channel name
        `userId` - User ID
        `oldState` - Previous state
        `newState` - New state
        `elapseSinceLastState` - Elapsed time since last state change

    - #### onAudioPublishStateChanged

          public void onAudioPublishStateChanged(AgoraLocalUser agoraLocalUser,
                                                 java.lang.String channel,
                                                 int oldState,
                                                 int newState,
                                                 int elapseSinceLastState)

      Description copied from interface: `ILocalUserObserver`
      Called when audio publish state changes.
      Specified by:
        `onAudioPublishStateChanged` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `channel` - Channel name
        `oldState` - Previous state
        `newState` - New state
        `elapseSinceLastState` - Elapsed time since last state change

    - #### onFirstRemoteAudioFrame

          public void onFirstRemoteAudioFrame(AgoraLocalUser agoraLocalUser,
                                              java.lang.String userId,
                                              int elapsed)

      Description copied from interface: `ILocalUserObserver`
      Called when the first remote audio frame is received.
      Specified by:
        `onFirstRemoteAudioFrame` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `userId` - User ID
        `elapsed` - Elapsed time

    - #### onFirstRemoteAudioDecoded

          public void onFirstRemoteAudioDecoded(AgoraLocalUser agoraLocalUser,
                                                java.lang.String userId,
                                                int elapsed)

      Description copied from interface: `ILocalUserObserver`
      Called when the first remote audio frame is decoded.
      Specified by:
        `onFirstRemoteAudioDecoded` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `userId` - User ID
        `elapsed` - Elapsed time

    - #### onVideoTrackPublishSuccess

          public void onVideoTrackPublishSuccess(AgoraLocalUser agoraLocalUser,
                                                 AgoraLocalVideoTrack agoraLocalVideoTrack)

      Description copied from interface: `ILocalUserObserver`
      Called when video track publish succeeds.
      Specified by:
        `onVideoTrackPublishSuccess` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `agoraLocalVideoTrack` - The local video track

    - #### onVideoTrackPublicationFailure

          public void onVideoTrackPublicationFailure(AgoraLocalUser agoraLocalUser,
                                                     AgoraLocalVideoTrack agoraLocalVideoTrack,
                                                     int error)

      Description copied from interface: `ILocalUserObserver`
      Called when video track publication fails.
      Specified by:
        `onVideoTrackPublicationFailure` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `agoraLocalVideoTrack` - The local video track
        `error` - Error code

    - #### onLocalVideoTrackStateChanged

          public void onLocalVideoTrackStateChanged(AgoraLocalUser agoraLocalUser,
                                                    AgoraLocalVideoTrack agoraLocalVideoTrack,
                                                    int state,
                                                    int error)

      Description copied from interface: `ILocalUserObserver`
      Called when local video track state changes.
      Specified by:
        `onLocalVideoTrackStateChanged` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `agoraLocalVideoTrack` - The local video track
        `state` - Track state
        `error` - Error code

    - #### onLocalVideoTrackStatistics

          public void onLocalVideoTrackStatistics(AgoraLocalUser agoraLocalUser,
                                                  AgoraLocalVideoTrack agoraLocalVideoTrack,
                                                  LocalVideoTrackStats stats)

      Description copied from interface: `ILocalUserObserver`
      Called when local video track statistics are updated.
      Specified by:
        `onLocalVideoTrackStatistics` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `agoraLocalVideoTrack` - The local video track
        `stats` - Local video track statistics

    - #### onUserVideoTrackSubscribed

          public void onUserVideoTrackSubscribed(AgoraLocalUser agoraLocalUser,
                                                 java.lang.String userId,
                                                 VideoTrackInfo info,
                                                 AgoraRemoteVideoTrack agoraRemoteVideoTrack)

      Description copied from interface: `ILocalUserObserver`
      Called when a user video track is subscribed.
      Specified by:
        `onUserVideoTrackSubscribed` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `userId` - User ID
        `info` - Video track info
        `agoraRemoteVideoTrack` - The remote video track

    - #### onUserVideoTrackStateChanged

          public void onUserVideoTrackStateChanged(AgoraLocalUser agoraLocalUser,
                                                   java.lang.String userId,
                                                   AgoraRemoteVideoTrack agoraRemoteVideoTrack,
                                                   int state,
                                                   int reason,
                                                   int elapsed)

      Description copied from interface: `ILocalUserObserver`
      Called when user video track state changes.
      Specified by:
        `onUserVideoTrackStateChanged` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `userId` - User ID
        `agoraRemoteVideoTrack` - The remote video track
        `state` - Track state
        `reason` - State change reason
        `elapsed` - Elapsed time

    - #### onRemoteVideoTrackStatistics

          public void onRemoteVideoTrackStatistics(AgoraLocalUser agoraLocalUser,
                                                   AgoraRemoteVideoTrack agoraRemoteVideoTrack,
                                                   RemoteVideoTrackStats stats)

      Description copied from interface: `ILocalUserObserver`
      Called when remote video track statistics are updated.
      Specified by:
        `onRemoteVideoTrackStatistics` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `agoraRemoteVideoTrack` - The remote video track
        `stats` - Remote video track statistics

    - #### onAudioVolumeIndication

          public void onAudioVolumeIndication(AgoraLocalUser agoraLocalUser,
                                              AudioVolumeInfo[] speakers,
                                              int totalVolume)

      Description copied from interface: `ILocalUserObserver`
      Called when audio volume indication is received.
      Specified by:
        `onAudioVolumeIndication` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `speakers` - Audio volume information array
        `totalVolume` - Total volume

    - #### onActiveSpeaker

          public void onActiveSpeaker(AgoraLocalUser agoraLocalUser,
                                      java.lang.String userId)

      Description copied from interface: `ILocalUserObserver`
      Called when an active speaker is detected.
      Specified by:
        `onActiveSpeaker` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `userId` - User ID of the active speaker

    - #### onRemoteVideoStreamInfoUpdated

          public void onRemoteVideoStreamInfoUpdated(AgoraLocalUser agoraLocalUser,
                                                     RemoteVideoStreamInfo info)

      Description copied from interface: `ILocalUserObserver`
      Called when remote video stream info is updated.
      Specified by:
        `onRemoteVideoStreamInfoUpdated` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `info` - Remote video stream info

    - #### onVideoSubscribeStateChanged

          public void onVideoSubscribeStateChanged(AgoraLocalUser agoraLocalUser,
                                                   java.lang.String channel,
                                                   java.lang.String userId,
                                                   int oldState,
                                                   int newState,
                                                   int elapseSinceLastState)

      Description copied from interface: `ILocalUserObserver`
      Called when video subscribe state changes.
      Specified by:
        `onVideoSubscribeStateChanged` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `channel` - Channel name
        `userId` - User ID
        `oldState` - Previous state
        `newState` - New state
        `elapseSinceLastState` - Elapsed time since last state change

    - #### onVideoPublishStateChanged

          public void onVideoPublishStateChanged(AgoraLocalUser agoraLocalUser,
                                                 java.lang.String channel,
                                                 int oldState,
                                                 int newState,
                                                 int elapseSinceLastState)

      Description copied from interface: `ILocalUserObserver`
      Called when video publish state changes.
      Specified by:
        `onVideoPublishStateChanged` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `channel` - Channel name
        `oldState` - Previous state
        `newState` - New state
        `elapseSinceLastState` - Elapsed time since last state change

    - #### onFirstRemoteVideoFrame

          public void onFirstRemoteVideoFrame(AgoraLocalUser agoraLocalUser,
                                              java.lang.String userId,
                                              int width,
                                              int height,
                                              int elapsed)

      Description copied from interface: `ILocalUserObserver`
      Called when the first remote video frame is received.
      Specified by:
        `onFirstRemoteVideoFrame` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `userId` - User ID
        `width` - Video width
        `height` - Video height
        `elapsed` - Elapsed time

    - #### onFirstRemoteVideoDecoded

          public void onFirstRemoteVideoDecoded(AgoraLocalUser agoraLocalUser,
                                                java.lang.String userId,
                                                int width,
                                                int height,
                                                int elapsed)

      Description copied from interface: `ILocalUserObserver`
      Called when the first remote video frame is decoded.
      Specified by:
        `onFirstRemoteVideoDecoded` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `userId` - User ID
        `width` - Video width
        `height` - Video height
        `elapsed` - Elapsed time

    - #### onFirstRemoteVideoFrameRendered

          public void onFirstRemoteVideoFrameRendered(AgoraLocalUser agoraLocalUser,
                                                      java.lang.String userId,
                                                      int width,
                                                      int height,
                                                      int elapsed)

      Description copied from interface: `ILocalUserObserver`
      Called when the first remote video frame is rendered.
      Specified by:
        `onFirstRemoteVideoFrameRendered` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `userId` - User ID
        `width` - Video width
        `height` - Video height
        `elapsed` - Elapsed time

    - #### onVideoSizeChanged

          public void onVideoSizeChanged(AgoraLocalUser agoraLocalUser,
                                         java.lang.String userId,
                                         int width,
                                         int height,
                                         int rotation)

      Description copied from interface: `ILocalUserObserver`
      Called when video size changes.
      Specified by:
        `onVideoSizeChanged` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `userId` - User ID
        `width` - Video width
        `height` - Video height
        `rotation` - Video rotation

    - #### onUserInfoUpdated

          public void onUserInfoUpdated(AgoraLocalUser agoraLocalUser,
                                        java.lang.String userId,
                                        int msg,
                                        int val)

      Description copied from interface: `ILocalUserObserver`
      Called when user info is updated.
      Specified by:
        `onUserInfoUpdated` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `userId` - User ID
        `msg` - Message type
        `val` - Value

    - #### onIntraRequestReceived

          public void onIntraRequestReceived(AgoraLocalUser agoraLocalUser)

      Description copied from interface: `ILocalUserObserver`
      Called when an intra request is received.
      Specified by:
        `onIntraRequestReceived` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance

    - #### onRemoteSubscribeFallbackToAudioOnly

          public void onRemoteSubscribeFallbackToAudioOnly(AgoraLocalUser agoraLocalUser,
                                                           java.lang.String userId,
                                                           int isFallbackOrRecover)

      Description copied from interface: `ILocalUserObserver`
      Called when remote subscribe falls back to audio only or recovers.
      Specified by:
        `onRemoteSubscribeFallbackToAudioOnly` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `userId` - User ID
        `isFallbackOrRecover` - Fallback or recover flag

    - #### onStreamMessage

          public void onStreamMessage(AgoraLocalUser agoraLocalUser,
                                      java.lang.String userId,
                                      int streamId,
                                      byte[] data)

      Description copied from interface: `ILocalUserObserver`
      Called when a stream message is received.
      Specified by:
        `onStreamMessage` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `userId` - User ID
        `streamId` - Stream ID
        `data` - Message data

    - #### onUserStateChanged

          public void onUserStateChanged(AgoraLocalUser agoraLocalUser,
                                         java.lang.String userId,
                                         int state)

      Description copied from interface: `ILocalUserObserver`
      Called when user state changes.
      Specified by:
        `onUserStateChanged` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `userId` - User ID
        `state` - User state

    - #### onAudioMetaDataReceived

          public void onAudioMetaDataReceived(AgoraLocalUser agoraLocalUser,
                                              java.lang.String userId,
                                              byte[] metaData)

      Description copied from interface: `ILocalUserObserver`
      Called when audio metadata is received.
      Specified by:
        `onAudioMetaDataReceived` in interface `ILocalUserObserver`
      Parameters:
        `agoraLocalUser` - The local user instance
        `userId` - User ID
        `metaData` - Metadata bytes

    - #### nativeDestory

          private void nativeDestory(long[] cptrs)

      Native method to destroy native handles.
      Parameters:
        `cptrs` - Array of native handles