JWCinematicViewController

This view controller creates a sleek, minimalist interface more consistent with a cinematic experience akin to what you would see for viewing movies and long media.

Note

The view created by this controller is intended for full screen use only.
  • The player instance.

    Declaration

    Swift

    public var player: JWPlayerProtocol { get }
  • The view displaying the video content.

    Declaration

    Swift

    public var playerView: JWPlayerViewProtocol { get }
  • A delegate receiving state changes from the view controller.

    Declaration

    Swift

    public weak var delegate: JWPlayerCinematicViewControllerDelegate?
  • Enables the lock screen controls to be synchronized with this player. The default is true.

    Declaration

    Swift

    public var enableLockScreenControls: Bool { get set }
  • Available playback rates.

    This property is automatically sorted. If an empty array is specified, 1.0 becomes the only available option. Rates must be greater than 0 and less than or equal to 4.0. Invalid rates are removed from the array.

    The default rates are: [0.5, 1.0, 1.25, 1.5, 2.0]

    Declaration

    Swift

    public var playbackRates: [Double] { get set }
  • The number of seconds to wait when fading the interface. The default is 3 seconds.

    Note

    This only applies when interfaceBehavior is .normal.

    Declaration

    Swift

    public var interfaceFadeDelay: TimeInterval { get set }
  • The poster image to display when there is no Internet connection. By default, it displays the poster image of the current video.

    Declaration

    Swift

    public var offlinePosterImage: UIImage? { get set }
  • The message to display when the internet connection is lost.

    Note

    The default value is “This video cannot be played because of a problem with your internet connection.” which corresponds to the localizable string jwplayer_errors_bad_connection.

    Declaration

    Swift

    public var offlineMessage: String { get set }
  • The desc the player is initialized with for the ad interface.

    Declaration

    Swift

    public var adInterfaceStyle: JWAdInterfaceStyle { get set }
  • A Boolean value that determines whether the player view allows Picture in Picture playback.

    Note

    By default, this is value is true.

    Attention

    canStartPictureInPictureAutomaticallyFromInline is not set to true when enabling this property, Picture-in-Picture mode should only be expected to be initiated when using the UI button designated for this.

    Declaration

    Swift

    public var allowsPictureInPicturePlayback: Bool { get set }
  • Sets a custom logo to display on the player.

    Declaration

    Swift

    public var logo: JWLogo? { get set }
  • The behavior desired for the interface. By default, this is .normal.

    Declaration

    Swift

    public var interfaceBehavior: JWInterfaceBehavior { get set }
  • The style defining the Next Up card and its behavior.

    Note

    If nil is set no Next Up card will be displayed.

    Declaration

    Swift

    public var nextUpStyle: JWNextUpStyle? { get set }

Initializers

  • Undocumented

    Declaration

    Swift

    public init()
  • Undocumented

    Declaration

    Swift

    public required init?(coder aDecoder: NSCoder)
  • Undocumented

    Declaration

    Swift

    open override func viewDidLoad()

Customize Player Interface

  • Sets the font of a group of labels on the player.

    Declaration

    Swift

    public func setFont(_ font: UIFont?, labels: [JWLabelType])

    Parameters

    font

    The font to set the labels to. If nil, the default is used.

    labels

    The labels to set the font of.

  • Sets the font of a label on the player.

    Declaration

    Swift

    public func setFont(_ font: UIFont?, label: JWLabelType)

    Parameters

    font

    The font to set the label to. If nil, the default is used.

    label

    The label to set the font of.

  • Sets the text color of a group of labels on the player.

    Declaration

    Swift

    public func setTextColor(_ color: UIColor?, labels: [JWLabelType])

    Parameters

    color

    The color to set the labels’ text color to.

    labels

    The labels to set the text color of.

  • Sets the text color of a label on the player.

    Declaration

    Swift

    public func setTextColor(_ color: UIColor?, label: JWLabelType)

    Parameters

    color

    The color to set the label’s text color to.

    label

    The label to set the text color of.

  • Sets the font of a group of buttons on the player.

    Declaration

    Swift

    public func setFont(_ font: UIFont?, forState state: UIControl.State, buttons: [JWButtonType])

    Parameters

    font

    The font to set the buttons to. If nil, the default is used.

    state

    The state for the font to be applied to.

    buttons

    The buttons to set the font of.

  • Sets the font of a button on the player.

    Declaration

    Swift

    public func setFont(_ font: UIFont?, forState state: UIControl.State, button: JWButtonType)

    Parameters

    font

    The font to set the button to. If nil, the default is used.

    state

    The state for the font to be applied to.

    button

    The button to set the font of.

  • Sets the title color of a group of buttons on the player.

    Declaration

    Swift

    public func setTitleColor(_ color: UIColor?, forState state: UIControl.State, buttons: [JWButtonType])

    Parameters

    color

    The color to set the buttons’ title color to.

    state

    The state for the color to be applied to.

    buttons

    The buttons to set the title color of.

  • Sets the title color of a button on the player.

    Declaration

    Swift

    public func setTitleColor(_ color: UIColor?, forState state: UIControl.State, button: JWButtonType)

    Parameters

    color

    The color to set the button’s title color to.

    state

    The state for the color to be applied to.

    button

    The button to set the title color of.

  • Sets the tint color of a group of buttons on the player.

    Declaration

    Swift

    public func setTintColor(_ color: UIColor?, buttons: [JWButtonType])

    Parameters

    color

    The color to set the buttons’ color to. If nil, the default is used.

    buttons

    The buttons to set the tint color of.

  • Sets the tint color of a button on the player.

    Declaration

    Swift

    public func setTintColor(_ color: UIColor?, button: JWButtonType)

    Parameters

    color

    The color to set the button’s color to. If nil, the default is used.

    button

    The button to set the tint color of.

  • Sets the background color of a group of views on the player.

    Declaration

    Swift

    public func setBackgroundColor(_ color: UIColor?, views: [JWViewType])

    Parameters

    color

    The color to set the views’ background color to. If nil, the default is used.

    views

    The views to set the background color of.

  • Sets the background color of a view on the player.

    Declaration

    Swift

    public func setBackgroundColor(_ color: UIColor?, view: JWViewType)

    Parameters

    color

    The color to set the view’s background color to. If nil, the default is used.

    view

    The view to set the background color of.

  • Called after the view controller is added or removed from a container view controller. For more information, refer to UIViewController documentation.

    Declaration

    Swift

    open override func didMove(toParent parent: UIViewController?)

    Parameters

    parent

    The parent view controller, or nil if there is no parent.

Player Events