JWRelatedContentConfigurationBuilder

@objcMembers
public class JWRelatedContentConfigurationBuilder : NSObject, JWBuilder

The builder for JWRelatedContentConfiguration.

  • Declaration

    Swift

    public typealias Output = JWRelatedContentConfiguration
  • Builds a JWRelatedContentConfiguration structure.

    Throws

    throws An error if the configuration is not setup properly.

    Declaration

    Swift

    public func build() -> JWRelatedContentConfiguration
  • Sets the related content url using a URL.

    Declaration

    Swift

    @discardableResult
    public func url(_ url: URL) -> JWRelatedContentConfigurationBuilder

    Parameters

    url

    The URL of the related content.

    Return Value

    The builder, so setters can be chained.

  • Sets the related content heading using a String. The default value is “Next up”.

    Note

    The string provided is displayed as a literal, and is not looked up in a localized string table.

    Declaration

    Swift

    @discardableResult
    public func heading(_ heading: String) -> JWRelatedContentConfigurationBuilder

    Parameters

    heading

    The heading String.

    Return Value

    The builder, so setters can be chained.

  • Sets the related content autoplayMessage using a String. The default value is “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.

    Note

    The string provided is displayed as a literal, and is not looked up in a localized string table.

    Declaration

    Swift

    @discardableResult
    public func autoplayMessage(_ message: String) -> JWRelatedContentConfigurationBuilder

    Parameters

    message

    The string message.

    Return Value

    The builder, so setters can be chained.

  • Sets the related content onComplete action using a JWRelatedOnComplete. The default value is .none.

    Declaration

    Swift

    @discardableResult
    public func onComplete(_ relatedOnComplete: JWRelatedOnComplete) -> JWRelatedContentConfigurationBuilder

    Parameters

    relatedOnComplete

    the onComplete action

    Return Value

    The builder, so setters can be chained.

  • Sets the related content onClick action using a JWRelatedOnClick. The default value is .play.

    Declaration

    Swift

    @discardableResult
    public func onClick(_ relatedOnClick: JWRelatedOnClick) -> JWRelatedContentConfigurationBuilder

    Parameters

    relatedOnClick

    the onClick action

    Return Value

    The builder, so setters can be chained.

  • Sets the related content autoplayTimer using a Int. The default value is 10 seconds.

    Declaration

    Swift

    @discardableResult
    public func autoplayTimer(_ timer: Int) -> JWRelatedContentConfigurationBuilder

    Parameters

    timer

    the number of seconds of the timer.

    Return Value

    The builder, so setters can be chained.