JWTrack
@interface JWTrack : NSObject
An object providing info about captions. Supports DFXP (TTML), SRT, WebVTT formats.
-
Path to the captions file.
Declaration
Objective-C
@property (readwrite, copy, nonatomic) NSString *_Nonnull file; -
Label to be shown in the player in captions popup.
Note
not shown if only 1 captions track provided.Declaration
Objective-C
@property (readwrite, copy, nonatomic) NSString *_Nonnull label; -
String representing kind of track.
Note
only ‘captions’ currently supported.Declaration
Objective-C
@property (readwrite, copy, nonatomic, nullable) NSString *kind; -
If set to yes the player shows this captions track upon launch.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) BOOL defaultTrack;
-
Factory method that creates JWTrack object with provided file and label.
Declaration
Objective-C
+ (nonnull instancetype)trackWithFile:(nonnull NSString *)file label:(nonnull NSString *)label;Parameters
filePath to the captions file.
labelLabel to be shown in the player in captions popup.
-
Factory method that creates JWTrack object with provided file and label and sets current captions track as default.
Declaration
Objective-C
+ (nonnull instancetype)trackWithFile:(nonnull NSString *)file label:(nonnull NSString *)label isDefault:(BOOL)def;Parameters
filePath to the captions file.
labelLabel to be shown in the player in captions popup.
defIf set to yes the player shows this captions track upon launch.
-
Inits JWTrack object with provided file and label.
Declaration
Objective-C
- (nonnull instancetype)initWithFile:(nonnull NSString *)file label:(nonnull NSString *)label;Parameters
filePath to the captions file.
labelLabel to be shown in the player in captions popup.
-
Inits JWTrack object with provided file and label and sets current captions track as default.
Declaration
Objective-C
- (nonnull instancetype)initWithFile:(nonnull NSString *)file label:(nonnull NSString *)label isDefault:(BOOL)def;Parameters
filePath to the captions file.
labelLabel to be shown in the player in captions popup.
defIf set to yes the player shows this captions track upon launch.
-
Unavailable
Undocumented
Declaration
Objective-C
- (instancetype)init NS_UNAVAILABLE;
JWTrack Class Reference