CompositionToolControllerOptionsBuilder

@objcMembers
@objc(PESDKCompositionToolControllerOptionsBuilder)
open class CompositionToolControllerOptionsBuilder : ToolControllerOptionsBuilder

The default CompositionToolControllerOptionsBuilder for CompositionToolControllerOptions.

  • 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

    open var overlayButtonConfigurationClosure: ((OverlayButton, CompositionOverlayAction) -> Void)?
  • Defines all allowed actions. Only buttons for allowed actions are visible. Defaults to show all available actions.

    Declaration

    Swift

    open var allowedCompositionOverlayActions: [CompositionOverlayAction]
  • This closure is called when the user selects an action.

    Declaration

    Swift

    open var 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 an UIAlertController.

    Declaration

    Swift

    open var compositionTooShortConfirmationClosure: ((VideoEditViewController, @escaping () -> Void) -> Void)?
  • The insets used to layout the overlay buttons in their container. The .top value is ignored.

    Declaration

    Swift

    open var 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 an UIImagePickerController to add personal video clips to the video composition. Default is true.

    Declaration

    Swift

    @available(*, deprecated, renamed: "videoClipLibraryMode", message: "Use `videoClipLibraryMode = .personal` instead.")
    open var personalVideoClipsEnabled: Bool { get set }
  • The mode determines which library type should be displayed when the user wants to add a VideoClip within the CompositionToolController. Default is set to .personal.

    Declaration

    Swift

    open var videoClipLibraryMode: VideoClipLibraryMode
  • Creates a new instance of CompositionToolControllerOptionsBuilder initialized with the given options.

    Declaration

    Swift

    public init(options: CompositionToolControllerOptions)

    Parameters

    options
  • An array of CompositionOverlayAction raw values wrapped in NSNumbers. Setting this property overrides any previously set values in allowedCompositionOverlayActions with the corresponding CompositionOverlayAction values.

    Declaration

    Swift

    @objc(allowedCompositionOverlayActions)
    open var _objCallowedCompositionOverlayActions: [NSNumber] { get set }