SubtitleTrack
@objcMembers
@objc(BMPSubtitleTrack)
public class SubtitleTrack : Track
Describes a subtitle track.
-
Type of the SubtitleTrack. Default is WebVTT.
Declaration
Swift
public let format: SubtitleFormat -
The IETF BCP 47 language tag associated with the subtitle track.
Declaration
Swift
public let language: String? -
The subtitle track controller for this track.
Declaration
Swift
public let controller: SubtitleTrackController -
Tells if a subtitle track is forced. If set to true it means that the player should automatically select and switch this subtitle according to the selected audio language. Forced subtitles do not appear in
BitmovinPlayer.getAvailableSubtitles.Declaration
Swift
public internal(set) var isForced: Bool { get } -
Creates a new subtitle track based on the given URL and provided metadata.
Declaration
Swift
public init( url: URL?, format: SubtitleFormat, label: String, identifier: String, isDefaultTrack: Bool, language: String?, forced: Bool )Parameters
urlThe URL to the timed file, e.g. WebVTT file.
formatType of the subtitle track file, WebVTT or TTML.
labelThe label for this track.
identifierThe unique identifier for this track.
isDefaultTrackIf set to
true, this track would be considered as default.languageThe IETF BCP 47 language tag associated with this track
forcedIf set to
true, this track would be considered as forced subtitle track.Return Value
A new subtitle track initialized with the given subtitle URL and the provided metadata.
-
Creates a new subtitle track based on the given URL and provided metadata.
Declaration
Swift
public convenience init( url: URL?, label: String, identifier: String, isDefaultTrack: Bool, language: String? )Parameters
urlThe URL to the timed file, e.g. WebVTT file.
labelThe label for this track.
identifierThe unique identifier for this track.
isDefaultTrackIf set to
true, this track would be considered as default.languageThe IETF BCP 47 language tag associated with this track
Return Value
A new subtitle track initialized with the given subtitle URL and the provided metadata.
-
Creates a new subtitle track based on the given URL and provided metadata.
Declaration
Swift
public convenience init( url: URL?, format: SubtitleFormat, label: String, identifier: String, isDefaultTrack: Bool, language: String? )Parameters
urlThe URL to the timed file, e.g. WebVTT file.
formatType of the subtitle track file, WebVTT or TTML.
labelThe label for this track.
identifierThe unique identifier for this track.
isDefaultTrackIf set to
true, this track would be considered as default.languageThe IETF BCP 47 language tag associated with this track
Return Value
A new subtitle track initialized with the given subtitle URL and the provided metadata.
-
Creates a new subtitle track based on the given URL and provided metadata.
Declaration
Swift
public convenience init( url: URL?, label: String, identifier: String, isDefaultTrack: Bool, language: String?, forced: Bool )Parameters
urlThe URL to the timed file, e.g. WebVTT file.
labelThe label for this track.
identifierThe unique identifier for this track.
isDefaultTrackIf set to
true, this track would be considered as default.languageThe IETF BCP 47 language tag associated with this track
forcedIf set to
true, this track would be considered as forced subtitle track.Return Value
A new subtitle track initialized with the given subtitle URL and the provided metadata.
SubtitleTrack Class Reference