TrimToolControllerOptionsBuilder

@objcMembers
@objc(PESDKTrimToolControllerOptionsBuilder)
open class TrimToolControllerOptionsBuilder : TrimToolOptionsBuilder

The default TrimToolControllerOptionsBuilder for TrimToolControllerOptions.

  • 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, TrimOverlayAction) -> Void)?
  • Defines all allowed actions. Only buttons for allowed actions are visible. Defaults to show all available actions.

    Declaration

    Swift

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

    Declaration

    Swift

    open var trimOverlayActionSelectedClosure: ((TrimOverlayAction) -> Void)?
  • If set this closure is called right after starting the editor when the input video or video composition is too short and the minimumDuration limit cannot be met either because the trim tool is used or because the composition tool is configured that additional clips cannot be added (CompositionToolControllerOptions.videoClipLibraryMode == .none). You can for example use this to present an alert view informing the user that the video is too short. You have to call the passed closure when you have confirmation by the user to continue with program execution which will call videoEditViewController.delegate?.videoEditViewControllerDidFailToGenerateVideo(videoEditViewController) next which in turn should dismiss the editor. By default it is set to present an UIAlertController.

    Declaration

    Swift

    open var videoTooShortConfirmationClosure: ((VideoEditViewController, @escaping () -> Void) -> Void)?
  • Enforces a minimum allowed duration for the edited video for the trim and composition tool. The minimum allowed value is 0.5 seconds. See VideoEditViewControllerOptions.forceTrimMode for additional options. Defaults to 0.5.

    Note

    The duration of the exported video may be inaccurate if this parameter is defined with high precision (below 0.1 s).

    Declaration

    Swift

    open var minimumDuration: TimeInterval { get set }
  • Enforces a maximum allowed duration for the edited video for the trim and composition tool if set to a value different from nil. See VideoEditViewControllerOptions.forceTrimMode for additional options. Defaults to nil.

    Note

    The duration of the exported video may be inaccurate if this parameter is defined with high precision (below 0.1 s).

    Declaration

    Swift

    open var maximumDuration: TimeInterval?
  • Creates a new instance of TrimToolControllerOptionsBuilder initialized with the given options.

    Declaration

    Swift

    public init(options: TrimToolControllerOptions)

    Parameters

    options
  • Enforces a maximum allowed duration for the edited video for the trim and composition tool if set to a value different from nil. See VideoEditViewControllerOptions.forceTrimMode for additional options. Defaults to nil.

    Declaration

    Swift

    @objc(maximumDuration)
    open var _objCMaximumDuration: NSNumber? { get set }
  • An array of TrimOverlayAction raw values wrapped in NSNumbers. Setting this property overrides any previously set values in allowedTrimOverlayActions with the corresponding TrimOverlayAction values.

    Declaration

    Swift

    @objc(allowedTrimOverlayActions)
    open var _objCallowedTrimOverlayActions: [NSNumber] { get set }