JWPlayerView
@objcMembers
@MainActor
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
@MainActor public override static var layerClass: AnyClass { get }
-
The player associated with the view.
Declaration
Swift
@MainActor public var player: JWPlayer { get }
-
The delegate which will receive events related to the JWPlayerView.
Declaration
Swift
@MainActor public weak var delegate: JWPlayerViewDelegate? { get set }
-
Declaration
Swift
@MainActor 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
@MainActor 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
@MainActor public var captionInsets: UIEdgeInsets { get set }
-
Declaration
Swift
@MainActor public var videoRect: CGRect { get }
-
The picture in picture controller for the player.
Declaration
Swift
@MainActor 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
@MainActor public var videoGravity: JWVideoGravity { get set }
-
Initializes and returns a newly allocated view object with the specified frame rectangle.
Declaration
Swift
@MainActor public override init(frame: CGRect)
Parameters
frame
The frame rectangle for the view.
-
Undocumented
Declaration
Swift
@MainActor public override func didMoveToWindow()
-
Lays out subviews.
Declaration
Swift
@MainActor public override func layoutSubviews()