CameraViewControllerOptionsBuilder
@objc(PESDKCameraViewControllerOptionsBuilder) open class CameraViewControllerOptionsBuilder: NSObject
The default CameraViewControllerOptionsBuilder
for CameraViewControllerOptions
.
-
The views background color. In video mode the colors alpha value is reduced to 0.3. Defaults to the global background color.
Declaration
Swift
open var backgroundColor: UIColor?
-
Use this closure to configure the flash button. Defaults to an empty implementation.
Declaration
Swift
open var flashButtonConfigurationClosure: ButtonConfigurationClosure?
-
Use this closure to configure the switch camera button. Defaults to an empty implementation.
Declaration
Swift
open var switchCameraButtonConfigurationClosure: ButtonConfigurationClosure?
-
Use this closure to configure the camera roll button. Defaults to an empty implementation.
Declaration
Swift
open var cameraRollButtonConfigurationClosure: ButtonConfigurationClosure?
-
Use this closure to configure the action button in photo mode. Defaults to an empty implementation.
Declaration
Swift
open var photoActionButtonConfigurationClosure: ButtonConfigurationClosure?
-
Use this closure to configure the filter selector button. Defaults to an empty implementation.
Declaration
Swift
open var filterSelectorButtonConfigurationClosure: ButtonConfigurationClosure?
-
Use this closure to configure the timelabel. Defaults to an empty implementation.
Declaration
Swift
open var timeLabelConfigurationClosure: ((UILabel) -> Void)?
-
Use this closure to configure the filter intensity slider. Defaults to an empty implementation.
Declaration
Swift
open var filterIntensitySliderConfigurationClosure: SliderConfigurationClosure?
-
Use this closure to configure the given recording mode button. By default the buttons light up in yellow, when selected.
Declaration
Swift
open var recordingModeButtonConfigurationClosure: ((Button, RecordingMode) -> Void)?
-
Enable/Disable permanent crop to square. Disabled by default.
Declaration
Swift
open var cropToSquare = false
-
The maximum length of a video. If set to 0 the length is unlimited.
Declaration
Swift
open var maximumVideoLength = 0
-
Enable/Disable tap to focus on the camera preview image. Enabled by default.
Declaration
Swift
open var tapToFocusEnabled = true
-
Show/Hide the camera roll button. Enabled by default.
Declaration
Swift
open var showCameraRoll = true
-
Enable/Disable filter bottom drawer. Enabled by default.
Declaration
Swift
open var showFilters = true
-
Enable/Disable filter intensity slider.
Declaration
Swift
open var showFilterIntensitySlider = true
-
The initial intensity of the filters.
Declaration
Swift
open var initialFilterIntensity = CGFloat(1)
-
Allowed camera positions. Defaults to all available positions and falls back to supported position if only one exists. To set this option from Obj-C see
allowedCameraPositionsAsNSNumbers
.Declaration
Swift
open var allowedCameraPositions: [AVCaptureDevicePosition] = [.back, .front]
-
Allowed flash modes. Defaults to all available modes. Duplicate values are not removed and may lead to unexpected behaviour. The first option is selected on launch, although the view controller tries to match the previous torch mode on record mode changes. To set this option from Obj-C see
allowedFlashModesAsNSNumbers
.Declaration
Swift
open var allowedFlashModes: [AVCaptureFlashMode] = [.auto, .on, .off]
-
Allowed torch modes. Defaults to all available modes. Duplicate values are not removed and may lead to unexpected behaviour. The first option is selected on launch, although the view controller tries to match the previous flash mode on record mode changes. To set this option from Obj-C see
allowedTorchModesAsNSNumbers
.Declaration
Swift
open var allowedTorchModes: [AVCaptureTorchMode] = [.auto, .on, .off]
-
Supported recording modes (e.g. .Photo or .Video). Defaults to all available modes. Duplicate values are not removed and may lead to unexpected behaviour. The first option is selected on launch. To set this option from Obj-C see
allowedRecordingModesAsNSNumbers
.Declaration
Swift
open var allowedRecordingModes: [RecordingMode] = [.photo, .video]
-
The video output settings to use for video recording. If
nil
, the recommended video settings for file typeAVFileTypeQuickTimeMovie
will be used.Declaration
Swift
open var videoOutputSettings: [String: AnyObject]?
-
The video output settings to use for video recording. If
nil
, the recommended audio settings for file typeAVFileTypeQuickTimeMovie
will be used.Declaration
Swift
open var audioOutputSettings: [String: AnyObject]?
-
The file type to use for video recording. Default is
AVFileTypeQuickTimeMovie
. - Note: If you change this, you will most likely also want to changevideoOutputSettings
andaudioOutputSettings
.Declaration
Swift
open var videoRecordingFileType: String = AVFileTypeQuickTimeMovie
-
The extension to use for video files. Default is
mov
.Declaration
Swift
open var videoRecordingFileExtension: String = "mov"
-
Use this closure to further configure the asset writer that is created for video recording.
Declaration
Swift
open var assetWriterConfigurationClosure: ((AVAssetWriter) -> Void)?
-
An array of
AVCaptureDevicePosition
raw values wrapped in NSNumbers. Setting this property overrides any previously set values inallowedCameraPositions
with the corresponding unwrapped values.Declaration
Swift
open var allowedCameraPositionsAsNSNumbers: [NSNumber]
-
An array of
AVCaptureFlashMode
raw values wrapped in NSNumbers. Setting this property overrides any previously set values inallowedFlashModes
with the corresponding unwrapped values.Declaration
Swift
open var allowedFlashModesAsNSNumbers: [NSNumber]
-
An array of
AVCaptureTorchMode
raw values wrapped in NSNumbers. Setting this property overrides any previously set values inallowedFlashModes
with the corresponding unwrapped values.Declaration
Swift
open var allowedTorchModesAsNSNumbers: [NSNumber]
-
An array of
RecordingMode
raw values wrapped in NSNumbers. Setting this property overrides any previously set values inallowedRecordingModes
with the corresponding unwrapped values.Declaration
Swift
open var allowedRecordingModesAsNSNumbers: [NSNumber]