JWSkippableTimeRangeBuilder

@available(tvOS 14, *)
@available(iOS, unavailable)
@objcMembers
public class JWSkippableTimeRangeBuilder : NSObject, JWBuilder

The builder for creating a JWSkippableTimeRange object.

  • Declaration

    Swift

    public typealias Output = JWSkippableTimeRange
  • Builds a skippable time range based off the settings provided.

    Throws

    throws An error if the time range is not setup properly or the seek destination is not set.

    Declaration

    Swift

    public func build() throws -> JWSkippableTimeRange
  • Sets the time range during which to display the skip button.

    Declaration

    Swift

    @discardableResult
    public func buttonDisplayTime(_ timeRange: JWTimeRange) -> JWSkippableTimeRangeBuilder

    Parameters

    timeRange

    The beginning and end time.

    Return Value

    The builder, so setters can be chained.

  • Sets the time in the video to seek to when the skip button is tapped.

    Declaration

    Swift

    @discardableResult
    public func seekTo(time seconds: TimeInterval) -> JWSkippableTimeRangeBuilder

    Parameters

    seconds

    The position to see to in the video, expressed in seconds from the beginning of the media.

    Return Value

    The builder, so setters can be chained.

  • Sets the text to be displayed on the skip button.

    Declaration

    Swift

    @discardableResult
    public func buttonText(_ text: String) -> JWSkippableTimeRangeBuilder

    Parameters

    text

    The text to display on the skip button.

    Return Value

    The builder, so setters can be chained.