JWRelatedConfig

@interface JWRelatedConfig : NSObject

An object providing information about the way related videos are handled by the player.

Configuring the related overlay

  • (Required) Location of an RSS or JSON file containing a feed of related videos.

    Note

    Must be an url to a RSS or JSON file containing a feed of related videos. See: https://support.jwplayer.com/customer/portal/articles/1483102#implementing-related

    Declaration

    Objective-C

    @property (nonatomic, copy, readwrite) NSString *_Nonnull file;
  • Configure the recommendations user interface. Does not apply to manual playlists. Defaults to the shelf (JWRelatedDisplayModeShelf).

    Note

    JWRelatedDisplayModeShelf Adds a horizontal bar of thumbnails above the control bar, which allows viewers to browse recommended videos throughout the playback experience. The shelf can be collapsed into a “More Videos” button, which appears above the control bar. Due to size constraints, small players fall back to JWRelatedDisplayModeOverlay mode.

    Note

    JWRelatedDisplayModeOverlay Adds a “more videos” icon to the control bar. When clicked, an overlay takes over the player, pausing playback.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        JWRelatedDisplayMode displayMode;
  • The behavior of our related videos overlay when a single video or playlist is completed. Defaults to Show (JWRelatedOnCompleteShow).

    Note

    JWRelatedOnCompleteShow Display the related overlay (default).

    Note

    JWRelatedOnCompleteHide Replay button and related icon will appear.

    Note

    JWRelatedOnCompleteAutoplay Automatically play the next video in your related feed after 10 seconds.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        JWRelatedOnComplete onComplete;
  • The behavior when a related video is selected. Defaults to play (JWRelatedOnClickPlay).

    Note

    JWRelatedOnClickPlay Plays the next video within the current player.

    Note

    JWRelatedOnClickLink Redirects the page to the url specified in the related item’s link field.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        JWRelatedOnClick onClick;
  • Single line heading displayed above the grid with related videos. Generally contains a short call-to-action. Default: “Next up”

    Declaration

    Objective-C

    @property (nonatomic, copy, readwrite, nullable) NSString *heading;
  • The number of seconds to wait before playing the next related video in your content list. Defaults to 10 seconds. Set to 0 to have your next related content to play immediately.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        NSUInteger autoplayTimer;
  • A custom message that appears during autoplay. Defaults to “title will play in xx seconds”. Note: xx will be replaced by the countdown timer Note: title will be replaced by the next title in the related feed.

    Declaration

    Objective-C

    @property (nonatomic, copy, readwrite, nullable) NSString *autoplayMessage;