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 }
-
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
public 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
public var captionInsets: UIEdgeInsets { get set }
-
Declaration
Swift
public var videoRect: CGRect { get }
-
The picture in picture controller for the player.
Note
Picture in picture works in iOS 14 and above for iPhones, and iOS 13 and above for iPads.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()