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.
    `boolean` | `mEnableHttp3` Use http3 to request, supported standards:RFC 9114(HTTP3) and RFC 9000(QUIC v1), false by default If request failed, it will automatically downgrade to normal http.
    `int` | `mEnableHttpDns` whether enable http dns, -1 : as global setting, 0: disable
    `boolean` | `mEnableLocalCache` Enable or disable local cahe.
    `boolean` | `mEnableLowLatencyMode` Used to set specific chip low-latency mode on its hardware decoder, to lower decoder latency and finally lower client-to-client latency.
    `boolean` | `mEnableSEI` Indicate whether SEI is enabled.
    `boolean` | `mEnableStrictAuthMode` For media that enabled URL authorization(HLS protocol), when local cache is enabled, we can choose different auth mode: Non Strict Mode(false): Auth is cached.
    `boolean` | `mEnableStrictFlvHeader` Used to fast stream start when playing pure audio or pure video in RTMP/FLV live stream.
    `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

    - #### mEnableHttp3

          public boolean mEnableHttp3

      Use http3 to request, supported standards:RFC 9114(HTTP3) and RFC 9000(QUIC v1), false by default If request failed, it will automatically downgrade to normal http.

    - #### mEnableStrictFlvHeader

          public boolean mEnableStrictFlvHeader

      Used to fast stream start when playing pure audio or pure video in RTMP/FLV live stream. If live stream header states only audio or only video and the stream content really contains the same single stream, enable this option can fast start the stream. Default value is false

    - #### mEnableLowLatencyMode

          public boolean mEnableLowLatencyMode

      Used to set specific chip low-latency mode on its hardware decoder, to lower decoder latency and finally lower client-to-client latency. Default is false.

    - #### mEnableStrictAuthMode

          public boolean mEnableStrictAuthMode

      For media that enabled URL authorization(HLS protocol), when local cache is enabled, we can choose different auth mode: Non Strict Mode(false): Auth is cached. If last play cached part of the media, and next play to non-cache part, player will use old auth to request, which may fail if the auth timeout configuration in the server is very short. Strict Mode(true): Auth is not cached. Every play will do the auth verification, so when there is no network, media cannot be played. Default is false.

  - ### 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` -