io.agora.rtc

## Class AgoraLocalVideoTrack

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

-     public class AgoraLocalVideoTrack
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private long` | `cptr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AgoraLocalVideoTrack(long cptr)` Constructor for AgoraLocalVideoTrack.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `destroy()` Destroys the local video track.
    `void` | `destroyStatistics(LocalVideoTrackStats stats)` Destroys the provided LocalVideoTrackStats object.
    `int` | `enableSimulcastStream(int enabled, SimulcastStreamConfig config)` Enables or disables the simulcast stream.
    `long` | `getNativeHandle()` Gets the native handle of the local video track.
    `int` | `getState()` Gets the current state of the local video track.
    `LocalVideoTrackStats` | `getStatistics()` Retrieves the statistics of the local video track.
    `private void` | `nativeDestroy(long cptr)`
    `private void` | `nativeDestroyStatistics(long cptr, LocalVideoTrackStats stats)`
    `private int` | `nativeEnableSimulcastStream(long cptr, int enabled, SimulcastStreamConfig config)`
    `private int` | `nativeGetState(long cptr)`
    `private LocalVideoTrackStats` | `nativeGetStatistics(long cptr)`
    `private void` | `nativeSetEnabled(long cptr, int enable)`
    `private int` | `nativeSetVideoEncoderConfig(long cptr, VideoEncoderConfig config)`
    `void` | `setEnabled(int enable)` Enables or disables the local video track.
    `int` | `setVideoEncoderConfig(VideoEncoderConfig config)` Sets the video encoder configuration.

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

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

- - ### Field Detail

    - #### cptr

          private long cptr

  - ### Constructor Detail

    - #### AgoraLocalVideoTrack

          public AgoraLocalVideoTrack(long cptr)

      Constructor for AgoraLocalVideoTrack.
      Parameters:
        `cptr` - Pointer to the native video track object.

  - ### Method Detail

    - #### getNativeHandle

          public long getNativeHandle()

      Gets the native handle of the local video track.
      Returns:
        The native handle of the local video track.

    - #### destroy

          public void destroy()

      Destroys the local video track. Ensures that the native resources are released.

    - #### setEnabled

          public void setEnabled(int enable)

      Enables or disables the local video track.
      Parameters:
        `enable` - 1 to enable, 0 to disable.

    - #### setVideoEncoderConfig

          public int setVideoEncoderConfig(VideoEncoderConfig config)

      Sets the video encoder configuration.
      Parameters:
        `config` - The video encoder configuration to set.
      Returns:
        0 on success, <0 on failure.

    - #### enableSimulcastStream

          public int enableSimulcastStream(int enabled,
                                           SimulcastStreamConfig config)

      Enables or disables the simulcast stream.
      Parameters:
        `enabled` - 1 to enable, 0 to disable.
        `config` - The simulcast stream configuration.
      Returns:
        0 on success, <0 on failure.

    - #### getState

          public int getState()

      Gets the current state of the local video track.
      Returns:
        The state of the video track.

    - #### getStatistics

          public LocalVideoTrackStats getStatistics()

      Retrieves the statistics of the local video track.
      Returns:
        An instance of LocalVideoTrackStats containing the statistics.

    - #### destroyStatistics

          public void destroyStatistics(LocalVideoTrackStats stats)

      Destroys the provided LocalVideoTrackStats object.
      Parameters:
        `stats` - The LocalVideoTrackStats object to be destroyed.

    - #### nativeDestroy

          private void nativeDestroy(long cptr)

    - #### nativeSetEnabled

          private void nativeSetEnabled(long cptr,
                                        int enable)

    - #### nativeSetVideoEncoderConfig

          private int nativeSetVideoEncoderConfig(long cptr,
                                                  VideoEncoderConfig config)

    - #### nativeEnableSimulcastStream

          private int nativeEnableSimulcastStream(long cptr,
                                                  int enabled,
                                                  SimulcastStreamConfig config)

    - #### nativeGetState

          private int nativeGetState(long cptr)

    - #### nativeGetStatistics

          private LocalVideoTrackStats nativeGetStatistics(long cptr)

    - #### nativeDestroyStatistics

          private void nativeDestroyStatistics(long cptr,
                                               LocalVideoTrackStats stats)