Caption

public struct Caption : XMLRepresentable

A caption or subtitle with custom text elements.

  • The texts of the caption.

    Declaration

    Swift

    public var texts: [Text]
  • The text style definitions of the caption.

    Declaration

    Swift

    public var textStyleDefinitions: [TextStyleDefinition]
  • A note associated with the caption.

    Declaration

    Swift

    public var note: String?
  • The lane of the caption.

    Declaration

    Swift

    public var lane: Int?
  • The offset of the caption.

    Declaration

    Swift

    public var offset: CMTime?
  • The name of the caption.

    Declaration

    Swift

    public var name: String?
  • The start time of the caption.

    Declaration

    Swift

    public var start: CMTime?
  • The duration of the caption.

    Declaration

    Swift

    public var duration: CMTime
  • A Boolean value that indicates whether the caption is enabled.

    Declaration

    Swift

    public var isEnabled: Bool { get set }
  • Assigns a role to the underlying media component. The format is role-name?captionFormat=captionFormat.subrole.

    Declaration

    Swift

    public var role: String?
  • Initializes a new caption.

    Declaration

    Swift

    public init(lane: Int? = nil, offset: CMTime = .zero, name: String? = nil, start: CMTime? = nil, duration: CMTime, role: String? = nil)

    Parameters

    lane

    The lane of the caption.

    offset

    The offset of the caption.

    name

    The name of the caption.

    start

    The start time of the caption.

    duration

    The duration of the caption.

    role

    The role of the caption.