AudioTrack Class

public class AudioTrack : Track, Equatable, CustomStringConvertible

Audio track metadata and available renditions.

Lifecycle

  • 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

  • Track type discriminator.

    Declaration

    Swift

    public let trackType: TrackType
  • id

    Track identifier.

    Declaration

    Swift

    public let id: String
  • Source group identifier (provider-defined).

    Declaration

    Swift

    public let source: String
  • Whether this is marked as primary track.

    Declaration

    Swift

    public let primary: Bool
  • Role metadata.

    Declaration

    Swift

    public let roles: Roles
  • Extra property metadata.

    Declaration

    Swift

    public let properties: Properties
  • User-visible label.

    Declaration

    Swift

    public let label: String
  • Language code for this audio track.

    Declaration

    Swift

    public let language: String
  • Number of audio channels.

    Declaration

    Swift

    public let channels: Int32
  • Channel configuration mask/value.

    Declaration

    Swift

    public let channelConfig: Int32
  • 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
  • Adds a rendition to this audio track.

    Declaration

    Swift

    public func addRendition(_ rendition: AudioRendition)
  • Human-readable diagnostic representation.

    Declaration

    Swift

    public var description: String { get }