Instance Method

supportsSessionPreset(_:)

Returns a Boolean value that indicates whether the receiver can be used in a capture session configured with the given preset.

Declaration

func supportsSessionPreset(_ preset: AVCaptureSession.Preset) -> Bool

Parameters

preset

A capture session preset.

Return Value

true if the receiver can be used with preset, otherwise false.

Discussion

An AVCaptureSession instance can be associated with a preset that configures its inputs and outputs to fulfill common use cases. You can use this method to determine if the receiver can be used in a capture session with the given preset. For a list of preset constants, see AVCaptureSession.

See Also

Inspecting Device Characteristics

var isConnected: Bool

Indicates whether the device is currently connected.

var position: AVCaptureDevice.Position

Indicates the physical position of the device hardware on the system.

func hasMediaType(AVMediaType) -> Bool

Returns a Boolean value that indicates whether the device provides media with a given type.

var modelID: String

The model ID of the device.

var localizedName: String

A localized, human-readable name for the receiver.

var uniqueID: String

An ID unique to the model of device corresponding to the receiver.

var lensAperture: Float

The size of the lens diaphragm.

var deviceType: AVCaptureDevice.DeviceType

The general type of the device, such as a built-in microphone or wide-angle camera.

var manufacturer: String

A human-readable string describing the manufacturer of the device.