Rendition Class

public class Rendition : Equatable

Base rendition metadata shared by audio/video rendition variants.

Lifecycle

  • 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
  • Parent track identifier.

    Declaration

    Swift

    public var trackId: String
  • Peak bitrate in bits per second.

    Declaration

    Swift

    public let bitrate: Int64
  • Codec string (e.g. avc1, hvc1, mp4a).

    Declaration

    Swift

    public let codec: String
  • Role metadata.

    Declaration

    Swift

    public let roles: Roles
  • Extra property metadata.

    Declaration

    Swift

    public let properties: Properties
  • Whether rendition is DRM-protected.

    Declaration

    Swift

    public let protected: Bool
  • Whether rendition is supported by current platform/engine.

    Declaration

    Swift

    public let supported: Bool
  • Whether rendition was filtered out by policy.

    Declaration

    Swift

    public let filtered: Bool
  • Whether rendition is currently blocked from selection.

    Declaration

    Swift

    public let blocked: Bool
  • Whether DRM license is expected for playback.

    Declaration

    Swift

    public let drmLicenseExpected: Bool
  • Whether DRM license is currently available.

    Declaration

    Swift

    public let drmLicenseAvailable: Bool
  • Whether rendition can currently be selected.

    Declaration

    Swift

    public let selectable: Bool
  • DRM info entries associated with this rendition.

    Declaration

    Swift

    public let drmInfo: [DrmInfo]
  • 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