Class NetworkConfiguration

  • All Implemented Interfaces:

    
    public final class NetworkConfiguration
    
                        

    Configuration for the player's network stack and retry mechanisms.

    • Constructor Detail

    • Method Detail

      • getMaxRetries

         final Integer getMaxRetries()

        The maximum amount of retries before the player throws a fatal error.

        Default: Integer.MAX_VALUE.

      • getMinimumBackOff

         final Long getMinimumBackOff()

        Sets the initial delay in milliseconds before a retry request occurs. Exponential backoff will be applied on this value.

        Default: 200.

      • getMaximumBackOff

         final Long getMaximumBackOff()

        Sets the maximum amount of delay in milliseconds between retry requests.

        Default: 30000.

      • getUseHttpEngine

         final Boolean getUseHttpEngine()

        Whether the player should use android.net.http.HttpEngine or Cronet for its network stack, if available.

        By default, the player uses android.net.http.HttpEngine (on Android 14 and higher) or Cronet (when added as a library to your app) for all its network requests, taking advantage of HTTP/2 and HTTP/3 support for optimal media streaming. When neither of these APIs are available, the player falls back to HTTP/1.1 using java.net.HttpURLConnection.

        Note: Some APIs such as com.theoplayer.android.api.settings.SslSettings.setKeyStore are not supported when using the modern network stack.

        Default: true

        Since:

        v9.10.0