JWPlayerView

@objcMembers
public class JWPlayerView : UIView, JWPlayerViewProtocol, ViewabilityHandlerDelegate

A view for displaying a player. It automatically handles enlarging the player to the size of this container view, and displaying the player.

  • Undocumented

    Declaration

    Swift

    public override static var layerClass: AnyClass { get }
  • The player associated with the view.

    Declaration

    Swift

    public var player: JWPlayer { get }
  • The delegate which will receive events related to the JWPlayerView.

    Declaration

    Swift

    public weak var delegate: JWPlayerViewDelegate? { get set }
  • Declaration

    Swift

    public var allowsPictureInPicturePlayback: Bool { get set }
  • This is the currently utilized caption style for side-loaded captions.

    What is set here is not necessarily what will be used. If a caption style is designated in a JSON configuration, the style in JSON will take priority. Furthermore, if the user’s accessibility settings do not allow specific settings to be overridden by the video, the user’s settings will take priority.

    Declaration

    Swift

    public var captionStyle: JWCaptionStyle? { get set }
  • The amount of space to inset the captions from the edges of the player. The default value is 0.

    Declaration

    Swift

    public var captionInsets: UIEdgeInsets { get set }
  • Declaration

    Swift

    public var videoRect: CGRect { get }
  • The picture in picture controller for the player.

    Declaration

    Swift

    public var pictureInPictureController: AVPictureInPictureController? { get }
  • Indicates how to display the video content within the bounds of the view. The default value is resizeAspect.

    Declaration

    Swift

    public var videoGravity: JWVideoGravity { get set }
  • Initializes and returns a newly allocated view object with the specified frame rectangle.

    Declaration

    Swift

    public override init(frame: CGRect)

    Parameters

    frame

    The frame rectangle for the view.

  • Undocumented

    Declaration

    Swift

    public override func didMoveToWindow()
  • Lays out subviews.

    Declaration

    Swift

    public override func layoutSubviews()