com.aliyun.player.nativeclass

## Class PlayerConfig

- java.lang.Object
- - com.aliyun.player.nativeclass.PlayerConfig

-     public class PlayerConfig
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `boolean` | `mClearFrameWhenStop` Indicate whether to clear the player surface when playback is stopped.
    `boolean` | `mDisableAudio` Disable audio track.
    `boolean` | `mDisableVideo` Disable video track.
    `int` | `mEnableHttpDns` whether enable http dns, -1 : as global setting, 0: disable
    `boolean` | `mEnableLocalCache` Enable or disable local cahe.
    `boolean` | `mEnableSEI` Indicate whether SEI is enabled.
    `boolean` | `mEnableVideoBufferRender` Indicate whether MediaCodec Buffer Render is enabled.
    `boolean` | `mEnableVideoTunnelRender` Indicate whether TunnelRender is enabled.
    `int` | `mHighBufferDuration` Maximum buffer time.
    `java.lang.String` | `mHttpProxy` HTTP proxy.
    `int` | `mLiveStartIndex` The start playing index of fragments, when HLS is live, .
    `long` | `mMaxBackwardBufferDurationMs` max backward buffer duration.
    `int` | `mMaxBufferDuration` Maximum buffer size.
    `int` | `mMaxDelayTime` Maximum delay time.
    `int` | `mMaxProbeSize` Maximum probe size.
    `int` | `mNetworkRetryCount` The maximum network reconnection attempts.
    `int` | `mNetworkTimeout` Network connection timeout time.
    `int` | `mPositionTimerIntervalMs` Set the frequencies of Progress.
    `boolean` | `mPreferAudio` prefer audio playback; prefer audio playback when under insufficient network bandwidth.
    `java.lang.String` | `mReferrer` Referer.
    `int` | `mStartBufferDuration` The size of the data that the player must buffer before it can start playing the media.
    `java.lang.String` | `mUserAgent` Set a request UserAgent.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String[]` | `getCustomHeaders()` Get custom set headers.
    `void` | `setCustomHeaders(java.lang.String[] headers)` Set custom headers

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

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

- - ### Field Detail

    - #### mHttpProxy

          public java.lang.String mHttpProxy

      HTTP proxy. Example: "http://ip:port".

    - #### mReferrer

          public java.lang.String mReferrer

      Referer.

    - #### mNetworkTimeout

          public int mNetworkTimeout

      Network connection timeout time. Unit: milliseconds.

    - #### mMaxDelayTime

          public int mMaxDelayTime

      Maximum delay time. Note: This parameter is only valid for broadcasting. Unit: milliseconds.

    - #### mMaxBufferDuration

          public int mMaxBufferDuration

      Maximum buffer size. Unit: milliseconds.

    - #### mHighBufferDuration

          public int mHighBufferDuration

      Maximum buffer time. Unit: milliseconds.

    - #### mStartBufferDuration

          public int mStartBufferDuration

      The size of the data that the player must buffer before it can start playing the media. Unit: milliseconds.

    - #### mMaxProbeSize

          public int mMaxProbeSize

      Maximum probe size. Unit: bytes. Default: -1.

    - #### mClearFrameWhenStop

          public boolean mClearFrameWhenStop

      Indicate whether to clear the player surface when playback is stopped. Default: false.

    - #### mEnableVideoTunnelRender

          public boolean mEnableVideoTunnelRender

      Indicate whether TunnelRender is enabled.

    - #### mEnableVideoBufferRender

          public boolean mEnableVideoBufferRender

      Indicate whether MediaCodec Buffer Render is enabled.

    - #### mEnableSEI

          public boolean mEnableSEI

      Indicate whether SEI is enabled.

    - #### mUserAgent

          public java.lang.String mUserAgent

      Set a request UserAgent.

    - #### mNetworkRetryCount

          public int mNetworkRetryCount

      The maximum network reconnection attempts. networkTimeout specifies the reconnection interval. networkRetryCount=0 indicates that automatic reconnection is disabled. The reconnection policy depends on the app. Default: 2.

    - #### mLiveStartIndex

          public int mLiveStartIndex

      The start playing index of fragments, when HLS is live, .

    - #### mDisableAudio

          public boolean mDisableAudio

      Disable audio track.

    - #### mDisableVideo

          public boolean mDisableVideo

      Disable video track.

    - #### mPositionTimerIntervalMs

          public int mPositionTimerIntervalMs

      Set the frequencies of Progress. Includes the current position and the buffer position.

    - #### mMaxBackwardBufferDurationMs

          public long mMaxBackwardBufferDurationMs

      max backward buffer duration.

    - #### mPreferAudio

          public boolean mPreferAudio

      prefer audio playback; prefer audio playback when under insufficient network bandwidth. At present, it is only effective in dash live stream (the video has been switched to the lowest bit rate)

    - #### mEnableLocalCache

          public boolean mEnableLocalCache

      Enable or disable local cahe.

    - #### mEnableHttpDns

          public int mEnableHttpDns

      whether enable http dns, -1 : as global setting, 0: disable

  - ### Method Detail

    - #### getCustomHeaders

          public java.lang.String[] getCustomHeaders()

      Get custom set headers.
      Returns:

    - #### setCustomHeaders

          public void setCustomHeaders(java.lang.String[] headers)

      Set custom headers
      Parameters:
        `headers` -