CompositionToolControllerOptions
@objcMembers
@objc(PESDKCompositionToolControllerOptions)
open class CompositionToolControllerOptions : ToolControllerOptions
Options for configuring a CompositionToolController
.
-
This closure allows further configuration of the overlay buttons. The closure is called for each button and has the button and its corresponding enum value as parameters.
Declaration
Swift
public let overlayButtonConfigurationClosure: ((OverlayButton, CompositionOverlayAction) -> Void)?
-
Defines all allowed actions. Only buttons for allowed actions are visible. Defaults to show all available actions.
Declaration
Swift
public let allowedCompositionOverlayActions: [CompositionOverlayAction]
-
This closure is called when the user selects an action.
Declaration
Swift
public let compositionOverlayActionSelectedClosure: ((CompositionOverlayAction) -> Void)?
-
If set this closure is called when the user trys to export a video composition which is too short to meet the
TrimToolControllerOptions.minimumDuration
limit but the composition could be adjusted by adding or trimming video clips to fulfill this requirement. You can for example use this to present an alert view informing the user that the video composition is too short. You have to call the passed closure when you have confirmation by the user to continue with program execution which will open the composition tool automatically. By default it is set to present anUIAlertController
.Declaration
Swift
public let compositionTooShortConfirmationClosure: ((VideoEditViewController, @escaping () -> Void) -> Void)?
-
The insets used to layout the overlay buttons in their container. The
.top
value is ignored.Declaration
Swift
public let overlayButtonInsets: UIEdgeInsets
-
Whether the user can add personal video clips from the device’s video library. If
true
an action button is added as last item in the composition menu which modally presents anUIImagePickerController
to add personal video clips to the video composition. Default istrue
.Declaration
Swift
@available(*, deprecated, renamed: "videoClipLibraryMode", message: "Use `videoClipLibraryMode = .personal` instead.") public var personalVideoClipsEnabled: Bool { get }
-
The mode determines which library type should be displayed when the user wants to add a
VideoClip
within theCompositionToolController
. Default is set to.personal
.Declaration
Swift
public let videoClipLibraryMode: VideoClipLibraryMode
-
Creates a new instance of
CompositionToolControllerOptions
using the given builder.Declaration
Swift
public init(builder: CompositionToolControllerOptionsBuilder)
Parameters
builder
An instance of
CompositionToolControllerOptionsBuilder
.