# AudioTrack Class

    public class AudioTrack : Track, Equatable, CustomStringConvertible

Audio track metadata and available renditions.

### Lifecycle

- `init(id:source:primary:roles:properties:label:language:channels:channelConfig:)`

  Creates an audio track descriptor.

  #### Declaration

  Swift

      public init(
          id: String,
          source: String = "",
          primary: Bool = false,
          roles: Roles = Roles(),
          properties: Properties = Properties(),
          label: String = "",
          language: String = "",
          channels: Int32 = -1,
          channelConfig: Int32 = -1)

  #### Parameters

  `id` | Stable track identifier.
  `source` | Source/adaptation-set identifier.
  `primary` | Whether this track is marked primary.
  `roles` | Role metadata map.
  `properties` | Extra property metadata map.
  `label` | User-visible track label.
  `language` | Language code.
  `channels` | Audio channel count.
  `channelConfig` | Channel configuration value/mask.

### Public

- `trackType`

  Track type discriminator.

  #### Declaration

  Swift

      public let trackType: TrackType

- `id`

  Track identifier.

  #### Declaration

  Swift

      public let id: String

- `source`

  Source group identifier (provider-defined).

  #### Declaration

  Swift

      public let source: String

- `primary`

  Whether this is marked as primary track.

  #### Declaration

  Swift

      public let primary: Bool

- `roles`

  Role metadata.

  #### Declaration

  Swift

      public let roles: Roles

- `properties`

  Extra property metadata.

  #### Declaration

  Swift

      public let properties: Properties

- `label`

  User-visible label.

  #### Declaration

  Swift

      public let label: String

- `language`

  Language code for this audio track.

  #### Declaration

  Swift

      public let language: String

- `channels`

  Number of audio channels.

  #### Declaration

  Swift

      public let channels: Int32

- `channelConfig`

  Channel configuration mask/value.

  #### Declaration

  Swift

      public let channelConfig: Int32

- `renditions`

  Available renditions for this audio track.

  #### Declaration

  Swift

      public var renditions: [AudioRendition]

- `==(_:_:)`

  Compares two audio tracks field-by-field.

  #### Declaration

  Swift

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

- `addRendition(_:)`

  Adds a rendition to this audio track.

  #### Declaration

  Swift

      public func addRendition(_ rendition: AudioRendition)

- `description`

  Human-readable diagnostic representation.

  #### Declaration

  Swift

      public var description: String { get }