Interface RateLimiter


public interface RateLimiter
Limit downloads speeds with implementations of this interface. This is exposed by the debug plugin. One the debug plugin is registered and the rate limiter is enabled (see DebugPlugin.Builder.enableRateLimiter(boolean, long)), you can get the limiter at runtime using:
 
        DebugPlugin debugPlugin = PlayerSDK.getPlugin(DebugPlugin.class);
                if (debugPlugin != null) {
                        RateLimiter rateLimiter = debugPlugin.getRateLimiter();
      }
 
 
Since:
4.2.6
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Get the current rate limit in bps.
    void
    setLimit(long limitBps)
    Set the limit that will be passed to the next data source created by this builder.
  • Method Details

    • setLimit

      void setLimit(long limitBps)
      Set the limit that will be passed to the next data source created by this builder.
      Parameters:
      limitBps - The limit in bits per second
    • getLimit

      long getLimit()
      Get the current rate limit in bps.
      Returns:
      The current rate limit in bps