BMPSubtitleTrack
Objective-C
@interface BMPSubtitleTrack : BMPTrack
Swift
class SubtitleTrack : Track
Describes a subtitle track.
-
Type of the SubtitleTrack. Default is WebVTT.
Declaration
Objective-C
@property (nonatomic, readonly) BMPSubtitleFormat format;Swift
var format: SubtitleFormat { get } -
The IETF BCP 47 language tag associated with the subtitle track.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *language;Swift
var language: String? { get } -
The subtitle track controller for this track.
Declaration
Objective-C
@property (nonatomic, strong, readonly, nonnull) id<BMPSubtitleTrackController> controller;Swift
var controller: SubtitleTrackController { get } -
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
Objective-C
@property (nonatomic, readonly, getter=isForced) BOOL forced;Swift
var isForced: Bool { get } -
Creates a new subtitle track based on the given URL and provided metadata.
Declaration
Objective-C
- (nonnull instancetype)initWithUrl:(nullable NSURL *)url label:(nonnull NSString *)label identifier:(nonnull NSString *)identifier isDefaultTrack:(BOOL)isDefaultTrack language:(nullable NSString *)language;Swift
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 YES, 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
Objective-C
- (nonnull instancetype)initWithUrl:(nullable NSURL *)url format:(BMPSubtitleFormat)format label:(nonnull NSString *)label identifier:(nonnull NSString *)identifier isDefaultTrack:(BOOL)isDefaultTrack language:(nullable NSString *)language;Swift
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 YES, 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
Objective-C
- (nonnull instancetype)initWithUrl:(nullable NSURL *)url format:(BMPSubtitleFormat)format label:(nonnull NSString *)label identifier:(nonnull NSString *)identifier isDefaultTrack:(BOOL)isDefaultTrack language:(nullable NSString *)language forced:(BOOL)forced;Swift
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 YES, this track would be considered as default.
languageThe IETF BCP 47 language tag associated with this track
forcedIf set to YES, 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
Objective-C
- (nonnull instancetype)initWithUrl:(nullable NSURL *)url label:(nonnull NSString *)label identifier:(nonnull NSString *)identifier isDefaultTrack:(BOOL)isDefaultTrack language:(nullable NSString *)language forced:(BOOL)forced;Swift
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 YES, this track would be considered as default.
languageThe IETF BCP 47 language tag associated with this track
forcedIf set to YES, 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.
BMPSubtitleTrack Class Reference