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
indexthe index of the subtitle.
starttime of which the subtitle appears.
endtime of which the subtitle disappears.
contentsthe 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
indexthe index of the subtitle.
starttime of which the subtitle appears.
endtime of which the subtitle disappears.
contentsthe actual content of the subtitle.
-
SubRip representation of the subtitle.
Declaration
Swift
public var description: String
View on GitHub
Install in Dash
S2BSubtitle Structure Reference