JWTrack

@interface JWTrack : NSObject

An object providing info about captions or thumbnails. Supports DFXP (TTML), SRT, WebVTT formats.

  • Path to the captions or thumbnails track file.

    Note

    Captions accept WEBVTT, SRT, and DFXP format, though JW Player strongly suggests using WEBVTT if possible. Thumbnail files must be in WEBVTT format, these VTT files contain links to the actual thumbnail images, which can be in JPG, PNG or GIF format.

    Declaration

    Objective-C

    @property (nonatomic, copy, readwrite) NSString *_Nonnull file;
  • Label to be shown in the player in captions popup.

    Note

    Only for captions. Not shown if only 1 captions track provided.

    Declaration

    Objective-C

    @property (nonatomic, copy, readwrite) NSString *_Nonnull label;
  • String representing kind of track.

    Note

    ‘captions’ and ‘thumbnails’ are currently supported.

    Declaration

    Objective-C

    @property (nonatomic, copy, readwrite, nullable) NSString *kind;
  • If set to yes the player shows this captions track upon launch.

    Note

    Only for captions.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite) 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

    file

    Path to the captions file.

    label

    Label 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

    file

    Path to the captions file.

    label

    Label to be shown in the player in captions popup.

    def

    If set to yes the player shows this captions track upon launch.

  • Factory method that creates JWTrack object with provided thumbnails file.

    See

    file

    Declaration

    Objective-C

    + (nonnull instancetype)trackWithThumbnailsFile:(nonnull NSString *)file;

    Parameters

    file

    Path to the thumbnails file.

  • Inits JWTrack object with provided file and label.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithFile:(nonnull NSString *)file
                                   label:(nonnull NSString *)label;

    Parameters

    file

    Path to the captions file.

    label

    Label 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

    file

    Path to the captions file.

    label

    Label to be shown in the player in captions popup.

    def

    If set to yes the player shows this captions track upon launch.

  • Inits JWTrack object with provided thumbnails file.

    See

    file

    Declaration

    Objective-C

    - (nonnull instancetype)initWithThumbnailsFile:(nonnull NSString *)file;

    Parameters

    file

    Path to the thumbnails file.

  • Unavailable

    Undocumented

    Declaration

    Objective-C

    - (instancetype)init NS_UNAVAILABLE;
  • Unavailable

    Undocumented

    Declaration

    Objective-C

    - (instancetype)new NS_UNAVAILABLE;