JWPlayerViewProtocol

@objc
public protocol JWPlayerViewProtocol

Methods and properties for interfacing with the view of a JWPlayer instance.

  • The currently defined style for captions. If nil, it reverts to default settings as specified within the SDK or the user’s accessibility settings.

    Declaration

    Swift

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

    Declaration

    Swift

    var captionInsets: UIEdgeInsets { get set }
  • The picture in picture controller for the player.

    Declaration

    Swift

    var pictureInPictureController: AVPictureInPictureController? { get }
  • How to display video content within the bounds of a view.

    Declaration

    Swift

    var videoGravity: JWVideoGravity { get set }
  • Determines if the player view allows Picture in Picture playback.

    Note

    The default value is true.

    Attention

    canStartPictureInPictureAutomaticallyFromInline is not set to true when enabling this property, Picture in Picture mode should only be initiated when using a dedicated UI button.

    Declaration

    Swift

    var allowsPictureInPicturePlayback: Bool { get set }
  • Returns the region where the video is being rendered.

    Declaration

    Swift

    var videoRect: CGRect { get }