PictureInPicture_Objc
@objc(THEOplayerPictureInPicture)
public protocol PictureInPicture_Objc
Helps configure the settings when PresentationMode.pictureInPicture is active.
-
The current
PictureInPictureCornerthe PiP view is displayed in.Precondition
The presentation mode of the player must bePresentationMode.pictureInPicture.Declaration
Swift
@objc(currentCorner) var currentCorner_Objc: PictureInPictureCorner { get } -
Configures the picture-in-picture (PiP) view.
Declaration
Swift
@objc(configureWithMovable:defaultCorner:scale:visibility:margin:) func configure_Objc(movable: Bool, defaultCorner: PictureInPictureCorner, scale: Float, visibility: NSNumber?, margin: THEOMargins?)Parameters
movableIndicates wheter or not the PiP view is movable.
defaultCornerIndicates the default corner at which the PiP view will appear when entering PiP mode.
scaleIndicates the scale of the PiP view, defaults to 0.33.
visibilityThe maximum percentage of the original player position that should be visible to enable picture-in-picture automatically, from 0 to 1. If not configured, picture-in-picture can only be turned on by setting
presentationModetopictureInPicture. Supports double-precision floating-point format.marginThe
THEOMarginsvalue indicating the distance between the PiP view and the screen. -
Configures the picture-in-picture (PiP) view
Declaration
Swift
func configure(movable: Bool, defaultCorner: PictureInPictureCorner, scale: Float)Parameters
movableIndicates whether the PiP view is movable.
defaultCornerIndicates the default corner at which the PiP view will appear when entering PiP mode.
scaleIndicates the scale of the PiP view, defaults to 0.33.
-
Configures the picture-in-picture (PiP) view.
Declaration
Swift
func configure(movable: Bool, defaultCorner: PictureInPictureCorner, scale: Float, visibility: NSNumber?)Parameters
movableIndicates whether the PiP view is movable.
defaultCornerIndicates the default corner at which the PiP view will appear when entering PiP mode.
scaleIndicates the scale of the PiP view, defaults to 0.33.
visibilityThe maximum percentage of the original player position that should be visible to enable picture-in-picture automatically, from 0 to 1. If not configured, picture-in-picture can only be turned on by setting
presentationModetopictureInPicture. Supports double-precision floating-point format. -
Configures the picture-in-picture (PiP) view.
Declaration
Swift
func configure(movable: Bool, defaultCorner: PictureInPictureCorner, scale: Float, margin: THEOMargins)Parameters
movableIndicates whether the PiP view is movable.
defaultCornerIndicates the default corner at which the PiP view will appear when entering PiP mode.
scaleIndicates the scale of the PiP view, defaults to 0.33.
marginThe
THEOMarginsvalue indicating the distance between the PiP view and the screen. -
The protocol that defines the methods to respond to Picture in Picture events.
Remark
For more informations check https://developer.apple.com/documentation/avkit/avpictureinpicturecontrollerdelegate. Only supported whenPiPConfiguration.nativePictureInPictureis set totrue.Note
For additional methods, the delegate can conform to typeAVPictureInPictureControllerDelegateExtended.Declaration
Swift
@available(iOS 14.0, tvOS 14.0, *) var nativePictureInPictureDelegate: AVPictureInPictureControllerDelegate? { get set } -
Sets the picture-in-picture configuration dynamically.
Declaration
Swift
func configure(configuration: PiPConfiguration)Parameters
configurationThe
PipConfigurationobject which describes the configuration of the picture-in-picture feature.
PictureInPicture_Objc Protocol Reference