# Download Class

    open class Download : Codable

Download

### only for DASH streams

- `fairplayKeyURIs`

  TODO: Merge this in drm config above? we collect here all the key URIs found in the attribute URI of EXT-X-KEY and EXT-X-SESSION-KEY

  #### Declaration

  Swift

      public var fairplayKeyURIs: [String]

- `preferredBitrate`

  Set your preferred video bitrate to be downloaded.

  The lowest media bitrate greater than or equal to this value will be selected for download. If no suitable media bitrate is found, the highest media bitrate will be selected.

  Remark

  Value is expressed in bps.

  Remark

  Only for HLS streams.

  #### Declaration

  Swift

      public var preferredBitrate: Int?

- `averageBitrate`

  Download average bitrate read from main playlist If present in the playlist, will be used for download size estimation in bytes. Otherwise the peak bitrate will be used for calculations.

  Remark

  Value is expressed in bps.

  Remark

  Only for HLS streams.

  #### Declaration

  Swift

      public var averageBitrate: Int?

### Private

- `init(from:)`

  #### Declaration

  Swift

      public required init(from decoder: Decoder) throws

- `encode(to:)`

  #### Declaration

  Swift

      public func encode(to encoder: Encoder) throws