# Rendition Class

    public class Rendition : Equatable

Base rendition metadata shared by audio/video rendition variants.

### Lifecycle

- `init(id:trackId:bitrate:codec:roles:properties:protected:supported:filtered:blocked:drmLicenseExpected:drmLicenseAvailable:selectable:drmInfo:sampleRate:)`

  Creates a rendition descriptor.

  #### Declaration

  Swift

      public init(
          id: String,
          trackId: String,
          bitrate: Int64 = -1,
          codec: String = "",
          roles: Roles = Roles(),
          properties: Properties = Properties(),
          protected: Bool = false,
          supported: Bool = false,
          filtered: Bool = false,
          blocked: Bool = false,
          drmLicenseExpected: Bool = false,
          drmLicenseAvailable: Bool = false,
          selectable: Bool = false,
          drmInfo: [DrmInfo] = [DrmInfo](),
          sampleRate: Int64 = -1)

  #### Parameters

  `id` | Stable rendition identifier.
  `trackId` | Parent track identifier.
  `bitrate` | Peak bitrate in bits per second.
  `codec` | Codec identifier string.
  `roles` | Role metadata map.
  `properties` | Extra property metadata map.
  `protected` | Whether rendition is DRM-protected.
  `supported` | Whether rendition is supported by current runtime.
  `filtered` | Whether rendition was filtered by policy.
  `blocked` | Whether rendition is blocked from selection.
  `drmLicenseExpected` | Whether license is expected.
  `drmLicenseAvailable` | Whether license is currently available.
  `selectable` | Whether rendition is currently selectable.
  `drmInfo` | DRM metadata records.
  `sampleRate` | Audio sample rate in Hz when applicable.

### Public

- `id`

  Stable rendition identifier.

  #### Declaration

  Swift

      public var id: String

- `trackId`

  Parent track identifier.

  #### Declaration

  Swift

      public var trackId: String

- `bitrate`

  Peak bitrate in bits per second.

  #### Declaration

  Swift

      public let bitrate: Int64

- `codec`

  Codec string (e.g. avc1, hvc1, mp4a).

  #### Declaration

  Swift

      public let codec: String

- `roles`

  Role metadata.

  #### Declaration

  Swift

      public let roles: Roles

- `properties`

  Extra property metadata.

  #### Declaration

  Swift

      public let properties: Properties

- `protected`

  Whether rendition is DRM-protected.

  #### Declaration

  Swift

      public let protected: Bool

- `supported`

  Whether rendition is supported by current platform/engine.

  #### Declaration

  Swift

      public let supported: Bool

- `filtered`

  Whether rendition was filtered out by policy.

  #### Declaration

  Swift

      public let filtered: Bool

- `blocked`

  Whether rendition is currently blocked from selection.

  #### Declaration

  Swift

      public let blocked: Bool

- `drmLicenseExpected`

  Whether DRM license is expected for playback.

  #### Declaration

  Swift

      public let drmLicenseExpected: Bool

- `drmLicenseAvailable`

  Whether DRM license is currently available.

  #### Declaration

  Swift

      public let drmLicenseAvailable: Bool

- `selectable`

  Whether rendition can currently be selected.

  #### Declaration

  Swift

      public let selectable: Bool

- `drmInfo`

  DRM info entries associated with this rendition.

  #### Declaration

  Swift

      public let drmInfo: [DrmInfo]

- `sampleRate`

  Audio sample rate in Hz where applicable.

  #### Declaration

  Swift

      public let sampleRate: Int64

- `==(_:_:)`

  Compares two renditions field-by-field.

  #### Declaration

  Swift

      public static func == (lhs: Rendition, rhs: Rendition) -> Bool