Contents

sourceDeviceType

The device type of the source camera that provides data to the port.

Declaration

var sourceDeviceType: AVCaptureDevice.DeviceType? { get }

Discussion

All ports contained in an input’s ports property have the same source device type, which each equal to the deviceType property of the input’s device.

When working with virtual devices such as the builtInDualCamera in an AVCaptureMultiCamSession, it’s possible to stream media from the virtual device’s constituent device streams by discovering and connecting hidden ports. In the case of the builtInDualCamera, its constituent devices are the wide-angle and telephoto cameras.

By calling ports(for:sourceDeviceType:sourceDevicePosition:):, you may discover ports originating from one or more of the virtual device’s constituent devices and then make connections using those ports. Constituent device ports are never present in their owning virtual device input’s ports array.

See Also

Inspecting an input port