S2BSubtitle

public struct S2BSubtitle

A segment of a .srt file.

  • Index of the subtitle.

    Declaration

    Swift

    public let index: Int
  • Time when the subtitle appears.

    Declaration

    Swift

    public let startTime: TimeInterval
  • Time when the subtitle disappears.

    Declaration

    Swift

    public let endTime: TimeInterval
  • Actual content of the subtitle.

    Declaration

    Swift

    public let contents: [String]
  • Initialize a subtitle with given information.

    Declaration

    Swift

    public init(index: Int, from start: TimeInterval, to end: TimeInterval, contents: [String])

    Parameters

    index

    the index of the subtitle.

    start

    time of which the subtitle appears.

    end

    time of which the subtitle disappears.

    contents

    the actual content of the subtitle.

  • Initialize a subtitle with given information.

    Declaration

    Swift

    public init(index: Int, from start: TimeInterval, to end: TimeInterval, contents: String...)

    Parameters

    index

    the index of the subtitle.

    start

    time of which the subtitle appears.

    end

    time of which the subtitle disappears.

    contents

    the actual content of the subtitle.