TrimToolControllerOptions
@objcMembers
@objc(PESDKTrimToolControllerOptions)
open class TrimToolControllerOptions : TrimToolOptions
Options for configuring a TrimToolController
.
-
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, TrimOverlayAction) -> Void)?
-
Defines all allowed actions. Only buttons for allowed actions are visible. Defaults to show all available actions.
Declaration
Swift
public let allowedTrimOverlayActions: [TrimOverlayAction]
-
This closure is called when the user selects an action.
Declaration
Swift
public let 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 callvideoEditViewController.delegate?.videoEditViewControllerDidFailToGenerateVideo(videoEditViewController)
next which in turn should dismiss the editor. By default it is set to present anUIAlertController
.Declaration
Swift
public let 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 to0.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
public let minimumDuration: TimeInterval
-
Enforces a maximum allowed duration for the edited video for the trim and composition tool if set to a value different from
nil
. SeeVideoEditViewControllerOptions.forceTrimMode
for additional options. Defaults tonil
.Note
The duration of the exported video may be inaccurate if this parameter is defined with high precision (below 0.1 s).Declaration
Swift
public let maximumDuration: TimeInterval?
-
Provides
minimumDuration
andmaximumDuration
as a closed range where its upper bound will be set tominimumDuration
ifmaximumDuration
is smaller thanminimumDuration
.Declaration
Swift
public var durationLimits: ClosedRange<TimeInterval> { get }
-
Creates a new instance of
TrimToolControllerOptions
using the given builder.Declaration
Swift
public init(builder: TrimToolControllerOptionsBuilder)
Parameters
builder
An instance of
TrimToolControllerOptionsBuilder
. -
Enforces a maximum allowed duration for the edited video for the trim and composition tool if set to a value different from
nil
. SeeVideoEditViewControllerOptions.forceTrimMode
for additional options. Defaults tonil
.Declaration
Swift
@objc(maximumDuration) open var _objCMaximumDuration: NSNumber? { get }