AbrConfiguration Structure

public struct AbrConfiguration : Codable, Hashable

The ABR Configuration

Remark

Usable in the castLabs Player only. Has no effect on AVPlayer.

Public

  • The bandwidth estimation in bits per second that is used when the bandwidth estimator reports that it can not estimate due to lack of information. This is usually used for the initial quality selection when no network estimation was collected yet.

    Remark

    Default value is 500,000.

    Declaration

    Swift

    public var maxInitialBitrate: Int64
  • The minimum length of content buffered (in milliseconds) before a quality increase is permitted.

    By default, we we expect to have at least 10 seconds of buffered data before we can switch up the quality. That gives some safe guards around building up a stable buffer when the bandwidth estimation is not very accurate.

    Remark

    Default value is 10,000 milliseconds.

    Declaration

    Swift

    public var minDurationForQualityIncreaseMs: Int64
  • The maximum length of content buffered (in milliseconds) before a quality decrease is permitted.

    Similar to the min duration for quality increase. By default we will not switch down the quality if we have more than 25 seconds of buffer. That avoids that the player will react to short fluctuations in the network capacity. Decreasing this value will prevent down switches longer, but increase the chance for a buffer under run.

    Remark

    Default value is 25,000 milliseconds.

    Declaration

    Swift

    public var maxDurationForQualityDecreaseMs: Int64
  • The fraction of the bandwidth estimation that we consider to calculate the effective bandwidth.

    Remark

    Default value is 1.0.

    Declaration

    Swift

    public var bandwidthFraction: Double
  • The weight used for the sliding percentile bandwidth estimator.

    Remark

    Default value is 2000.

    Declaration

    Swift

    public var percentileWeight: Int32
  • The desired percentile, expressed as a fraction in the range (0,1].

    Remark

    Default value is 0.5.

    Declaration

    Swift

    public var percentile: Double
  • The min number of totally transferred bytes before the ABR calculations are considered reliable.

    Remark

    Default value is 262,144 (1024 * 256).

    Declaration

    Swift

    public var minSampledBytes: Int64
  • A value between 0 and 1 that is used as a penalty when a buffer degradation or a download time issue us detected.

    In that case the assumption is that the current bandwidth estimate is not enough, since the buffer is getting smaller or became already too small to provide enough time to download the next segment of a selected rendition. permit the player to re-build some of its buffer.

    Remark

    Default value is 0.2.

    Declaration

    Swift

    public var degradationPenalty: Double
  • The recovery that is applied on each selection after a degradationPenalty was applied. This removes the penalty over time.

    Remark

    Default value is 0.05.

    Declaration

    Swift

    public var degradationRecovery: Double
  • The minimum number of segments observed before buffer degradation detection is permitted.

    Remark

    Default value is 4.

    Declaration

    Swift

    public var minDegradationSamples: Int64