JWExternalPlaybackSettingsBuilder

public class JWExternalPlaybackSettingsBuilder : NSObject, JWBuilder

A builder for creating instances of JWExternalPlaybackSettings.

  • Declaration

    Swift

    public typealias Output = JWExternalPlaybackSettings
  • Builds a JWExternalPlaybackSettings structure.

    If this method is called multiple times, the same instance of JWExternalPlaybackSettings is returned.

    Throws

    An error if the style is not setup properly.

    Declaration

    Swift

    public func build() throws -> JWExternalPlaybackSettings

    Return Value

    A JWExternalPlaybackSettings object.

  • Sets whether the video is allowed to play over AirPlay. The default value is true.

    Declaration

    Swift

    @discardableResult
    public func playbackEnabled(_ enabled: Bool) -> JWExternalPlaybackSettingsBuilder

    Parameters

    enabled

    A boolean denoting whether AirPlay is enabled.

    Return Value

    The builder, so setters can be chained.

  • The video gravity of the player for external playback mode only.

    Declaration

    Swift

    @discardableResult
    public func videoGravity(_ gravity: JWVideoGravity) -> JWExternalPlaybackSettingsBuilder

    Parameters

    gravity

    The desired gravity.

    Return Value

    The builder, so setters can be chained.

  • A Boolean value that indicates whether the player should automatically switch to external playback mode while the external screen mode is active.

    The player automatically switches back to the external screen mode once video playback concludes. A brief transition may be visible on the external display when automatically switching between the two modes. The default value of this property is false. The value of this property has no effect if allowsExternalPlayback is false.

    Declaration

    Swift

    @discardableResult
    public func usesExternalPlaybackWhileExternalScreenIsActive(_ usesExternalPlaybackWhileExternalScreenIsActive: Bool) -> JWExternalPlaybackSettingsBuilder

    Parameters

    usesExternalPlaybackWhileExternalScreenIsActive

    A boolean denoting the desire behavior with AirPlay devices.

    Return Value

    The builder, so setters can be chained.