Instance Property

sourceDeviceType

The device type of the source camera providing the photo.

Declaration

var sourceDeviceType: AVCaptureDevice.DeviceType? { get }

Discussion

When capturing a photo using a virtual device, you may query this property to find out the source type of the photo. For example, on a dual camera, resulting photos have a source device type of builtInDualCamera or builtInTelephotoCamera. For all other types of capture, the source device type is the same as the device type of the capture device connected to the photo output.

This method returns nil if the source of the photo is not a capture device.

See Also

Inspecting an Input Port

var isEnabled: Bool

Indicates whether the port is enabled.

var input: AVCaptureInput

The input object that owns the port.

var mediaType: AVMediaType

The port’s media type.

var formatDescription: CMFormatDescription?

A description of the port format.

var clock: CMClock?

An object representing the capture device’s own clock.

var sourceDevicePosition: AVCaptureDevice.Position

The position of the source device providing input through this port.